In fact, it may. os.getcwd() depend from where the script is called.
mbp-chris:tmp chris$ cat bug320126.py #!/usr/bin/python import os print os.getcwd()
mbp-chris:tmp chris$ ./bug320126.py /private/tmp mbp-chris:tmp chris$ mkdir foo mbp-chris:tmp chris$ cd foo/ mbp-chris:foo chris$ ../bug320126.py /private/tmp/foo mbp-chris:foo chris$
In fact, it may.
os.getcwd() depend from where the script is called.
mbp-chris:tmp chris$ cat bug320126.py
#!/usr/bin/python
import os
print os.getcwd()
mbp-chris:tmp chris$ ./bug320126.py
/private/tmp
mbp-chris:tmp chris$ mkdir foo
mbp-chris:tmp chris$ cd foo/
mbp-chris:foo chris$ ../bug320126.py
/private/tmp/foo
mbp-chris:foo chris$