When I run the following script in IDLE
import os
print(os.getcwd())
I get output as
D:\testtool
but when I run from cmd prompt, I get
c:\Python33>python D:\testtool\current_dir.py
c:\Python33
How …
I run a python shell from crontab every minute:
* * * * * /home/udi/foo/bar.py
/home/udi/foo has some necessary subdirectories, like /home/udi/foo/log and /home/udi/foo/config, which /home/udi/foo/bar.py refers to.
The …
I have a python script that is under this directory:
work/project/test/a.py
Inside a.py, I use subprocess.POPEN to launch the process from another directory,
work/to_launch/file1.pl, file2.py, file3.py, ...
Python Code:
…