12 Jun
2002
12 Jun
'02
6:44 p.m.
Alec Munro writes:
Any idea how I can use Python to call a file two directories up? So if my python script is at: /root/blah/cgi/someScript
And I want it to return the file: /root/nah/someFile What do you mean with "call" or "return"?
I assume you are in a Python Script. Then you can (usually) access "root.nah.someFile" by "context.nah.someFile". In order for this to work, "/root/nah" must be "nearest" (with respect to acquisition search order) "nah" to "context". It would, e.g., not work from "/root/blah/nah/someScript". Dieter