Hi,
I'm using a computer with a Linux CentOS Operating system, which uses python 2.3 and known to break if python is upgraded to 2.5. Since i need to run 2.5 scripts on that machine, some people in a linux forum recommended to compile 2.5 on that machine and have two python interpreters installed. so now, when i type "python" i still get the 2.3 version, and when i type "python2" i get the new version. to make sure it works i created a simple script called CheckVersion.py :
when run with python2 it outputs that the version is 2.5 and when run using "python" it outpus 2.3. so far so good. but, when i set up a crontab job:
* * * * * python2 CheckVersion.py > /usr/local/testLog
suddenly i see that somehow the output is that of the 2.3 version...
why is that? the only thing i can think of is that somehow because crontab has different PATH vars the python2.5 interpreter imports the 2.3 sys module... but that sounds rather odd. any ideas?
I'm using a computer with a Linux CentOS Operating system, which uses python 2.3 and known to break if python is upgraded to 2.5. Since i need to run 2.5 scripts on that machine, some people in a linux forum recommended to compile 2.5 on that machine and have two python interpreters installed. so now, when i type "python" i still get the 2.3 version, and when i type "python2" i get the new version. to make sure it works i created a simple script called CheckVersion.py :
Code:
import sys print sys.version
* * * * * python2 CheckVersion.py > /usr/local/testLog
suddenly i see that somehow the output is that of the 2.3 version...
why is that? the only thing i can think of is that somehow because crontab has different PATH vars the python2.5 interpreter imports the 2.3 sys module... but that sounds rather odd. any ideas?
Comment