You can have 2 python installations in two different directories, e.g.
c:\something\python3.1
c:\something\python2.5
and you add e.g. a file into each of your bot dirs, that tag the dir
according to the python version you like to use, e.g. create files
names '.\runpy31' or '.\runpy25'
then do something like the following for 'something.py':
import os
exec = ' '.join(sys.argv[1:])
if os.path.exists('.\runpy25'):
os.system('c:\something\python3.5 %s' % exec)
elif os.path.exists('.\runpy31'):
os.system('c:\something\python3.1 %s' % exec)
else:
print "Unable to detect wished python version!"
This should more or less do the job you wanted... ;)
Greetings
DrTrigon
Am 19.09.2010 13:16, schrieb BinĂ¡ris:
For some reason, I should install Python 3.1 on my
Windows XP, and I
want to keep 2.5 for pywikibot. Now, I am looking for some easy and
comfortable way to separate them. I mean, if I type "something.py" at
the command prompt in my Pywikipedia directory, then the script should
run under 2.5, and if I type this in another directory, then it should
run under 3.1. Is it possible?
--
BinĂ¡ris
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l