AnsweredAssumed Answered

Scripts only work if in same folderas other files

Question asked by recurvata on Mar 15, 2012
Latest reply on Mar 20, 2012 by recurvata
I'm not sure if this question is directly related to ArcMap, but since that's mostly what I use Python for I'll give it a shot.
When I write a script in Python, it runs fine if it's in the same folder as the file(s), such as the mxd, it references. If the script is in another folder, it doesn't run, at least not correctly.
This happens with scripts for ArcMap, as well as other projects. For example, I have a script to print directories and files in a folder. If the script is in that folder, it runs fine. If it's in another folder, it only prints its own name (a copy is in the other folder, so original is still there).
This doesn't happen when running something in ArcMap itself, either a script or python window.
One last thing: the sysadmin didn't install Python from the ArcMap discs. I manually installed it according to other posts in the forums, and everything looks ok, V. 2,6, etc, but maybe I missed something, like setting the right path?
Anyway, thanks for any help, and sorry if this isn't really an ArcMap python issue.

Outcomes