I've got Python 2.3, 2.4 and 2.5 installed on a Windows XP machine.. I currently have Python 2.5 in my path, and there are no other versions of Python in the path.
I'm trying to run a program which expects Python 2.4 or later to be installed, because there is a call to logging.BasicConfig(arg1, arg2) which is passed two arguments In Python 2.3, logging.BasicConfig() did not take any arguments. When I run this python script, the following exception is thrown, implying that it is being executed with Python 2.3 So I've added this print statement to the main function, which shows the logging module is being imported from the Python 2.3 directory print"\nlogging.__file__ = %s" % logging.__file__ logging.__file__ = C:\Python23\lib\logging\__init__.pyc Traceback (most recent call last): File "c:\Project\myscript.py", line 584, in ? main(sys.argv) File "c:\Project\myscript.py", line 518, in main logging.basicConfig(level=config.verbosity,format='%(message)s') TypeError: basicConfig() takes no arguments (2 given) The really odd thing is when I bring up the python interpreter at the same command prompt where i ran the script above, Python 2.5 is invoked, as seen by Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.version '2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]' How is it that running a script invokes Python 2.3, but running the interpreter without the script invoked Python 2.5? _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor