Re: Multiple versions of Python coexisting in the same OS

2010-07-26 Thread Thomas Jollans
On 07/26/2010 06:36 AM, Edward Diener wrote: > On 7/25/2010 10:42 PM, David Robinow wrote: >> On Sun, Jul 25, 2010 at 8:40 PM, Edward Diener >> wrote: >>> On 7/25/2010 5:57 PM, Thomas Jollans wrote: >>> So if a standard library module ( or distributed library ) executes a >>> call >>> internally

Re: Multiple versions of Python coexisting in the same OS

2010-07-26 Thread Gelonida
On 07/26/2010 06:36 AM, Edward Diener wrote: > > I start a Python script for version X by going to X's root directory and > invoking 'python someScript.py' from the command line. Does that not > sound reasonable ? Do you have an example of two (not self written) applications requiring to change t

Re: Multiple versions of Python coexisting in the same OS

2010-07-26 Thread Gelonida
On 07/25/2010 10:39 PM, MRAB wrote: > News123 wrote: >> Thus my idea of having a pystarter with a config file >> mentioning which directories (tools) should use which python executable >> > I think that's the wrong way round. A pystarter should ask the _tool_ > which version of Python it needs.

Re: Multiple versions of Python coexisting in the same OS

2010-07-26 Thread Gelonida
>> >> Thus my idea of having a pystarter with a config file >> mentioning which directories (tools) should use which python executable > > Well, good luck ! I don;t know how this is resolved for you when some > scripts executes 'python xxx yyy' or 'someScript.py yyy'. both could be resolved with

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Steven D'Aprano
On Mon, 26 Jul 2010 00:36:47 -0400, Edward Diener wrote: > On 7/25/2010 10:42 PM, David Robinow wrote: [...] >> Edward, I'm having a really hard time understanding your problem. Could >> you give an example of some real code that is causing you difficulty? > > I start a Python script for version

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 10:42 PM, David Robinow wrote: On Sun, Jul 25, 2010 at 8:40 PM, Edward Diener wrote: On 7/25/2010 5:57 PM, Thomas Jollans wrote: So if a standard library module ( or distributed library ) executes a call internally to 'python xxx yyy' or executes a call internally to 'someScript.p

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 8:41 PM, Steven D'Aprano wrote: On Sun, 25 Jul 2010 15:19:53 -0400, Edward Diener wrote: On 7/25/2010 10:03 AM, Thomas Jollans wrote: On 07/25/2010 02:46 PM, Edward Diener wrote: The problem with this is that you forget that a script can invoke Python internally. So whether one u

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread David Robinow
On Sun, Jul 25, 2010 at 8:40 PM, Edward Diener wrote: > On 7/25/2010 5:57 PM, Thomas Jollans wrote: > So if a standard library module ( or distributed library ) executes a call > internally to 'python xxx yyy' or executes a call internally to > 'someScript.py yyy', you're fine with multiple co-exi

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Steven D'Aprano
On Sun, 25 Jul 2010 15:19:53 -0400, Edward Diener wrote: > On 7/25/2010 10:03 AM, Thomas Jollans wrote: >> On 07/25/2010 02:46 PM, Edward Diener wrote: >>> The problem with this is that you forget that a script can invoke >>> Python internally. So whether one uses the console or file association >

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 5:57 PM, Thomas Jollans wrote: On 07/25/2010 11:10 PM, Edward Diener wrote: On 7/25/2010 3:39 PM, Christian Heimes wrote: Am 25.07.2010 21:32, schrieb Thomas Jollans: If a script uses sys.executable instead of "python", there is no problem, at all. It's true that sys.executable

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Thomas Jollans
On 07/25/2010 11:10 PM, Edward Diener wrote: > On 7/25/2010 3:39 PM, Christian Heimes wrote: >> Am 25.07.2010 21:32, schrieb Thomas Jollans: >>> If a script uses sys.executable instead of "python", there is no >>> problem, at all. >> >> It's true that sys.executable is the best way if you have to s

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 4:26 PM, News123 wrote: On 07/25/2010 10:18 PM, Thomas Jollans wrote: On 07/25/2010 10:04 PM, News123 wrote: sOn 07/25/2010 09:39 PM, Christian Heimes wrote: Am 25.07.2010 21:32, schrieb Thomas Jollans: If a script uses sys.executable instead of "python", there is no problem, at

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 4:22 PM, News123 wrote: On 07/25/2010 09:33 PM, Edward Diener wrote: On 7/25/2010 10:31 AM, News123 wrote: On 07/25/2010 02:46 PM, Edward Diener wrote: On 7/25/2010 6:07 AM, Gelonida wrote: How does a 'pystarter' program know where the file's location is which is being invoked

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 3:39 PM, Christian Heimes wrote: Am 25.07.2010 21:32, schrieb Thomas Jollans: If a script uses sys.executable instead of "python", there is no problem, at all. It's true that sys.executable is the best way if you have to start a new Python interpreter. However sys.executable may n

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 3:32 PM, Thomas Jollans wrote: On 07/25/2010 09:19 PM, Edward Diener wrote: On 7/25/2010 10:03 AM, Thomas Jollans wrote: On 07/25/2010 02:46 PM, Edward Diener wrote: The problem with this is that you forget that a script can invoke Python internally. So whether one uses the consol

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread MRAB
News123 wrote: On 07/25/2010 09:33 PM, Edward Diener wrote: On 7/25/2010 10:31 AM, News123 wrote: On 07/25/2010 02:46 PM, Edward Diener wrote: On 7/25/2010 6:07 AM, Gelonida wrote: How does a 'pystarter' program know where the file's location is which is being invoked ? the file's locatio

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread News123
On 07/25/2010 10:18 PM, Thomas Jollans wrote: > On 07/25/2010 10:04 PM, News123 wrote: >> sOn 07/25/2010 09:39 PM, Christian Heimes wrote: >>> Am 25.07.2010 21:32, schrieb Thomas Jollans: If a script uses sys.executable instead of "python", there is no problem, at all. >> >> >> sys.execut

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread News123
On 07/25/2010 09:33 PM, Edward Diener wrote: > On 7/25/2010 10:31 AM, News123 wrote: >> On 07/25/2010 02:46 PM, Edward Diener wrote: >>> On 7/25/2010 6:07 AM, Gelonida wrote: > > How does a 'pystarter' program know where the file's location is which > is being invoked ? the file's location would

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Thomas Jollans
On 07/25/2010 10:04 PM, News123 wrote: > sOn 07/25/2010 09:39 PM, Christian Heimes wrote: >> Am 25.07.2010 21:32, schrieb Thomas Jollans: >>> If a script uses sys.executable instead of "python", there is no >>> problem, at all. > > > sys.executable will not work with scripts converted with py2e

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread News123
sOn 07/25/2010 09:39 PM, Christian Heimes wrote: > Am 25.07.2010 21:32, schrieb Thomas Jollans: >> If a script uses sys.executable instead of "python", there is no >> problem, at all. sys.executable will not work with scripts converted with py2exe, as sys.executable will not be the executable o

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Thomas Jollans
On 07/25/2010 09:39 PM, Christian Heimes wrote: > Am 25.07.2010 21:32, schrieb Thomas Jollans: >> If a script uses sys.executable instead of "python", there is no >> problem, at all. > > It's true that sys.executable is the best way if you have to start a new > Python interpreter. However sys.exec

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Christian Heimes
Am 25.07.2010 21:32, schrieb Thomas Jollans: > If a script uses sys.executable instead of "python", there is no > problem, at all. It's true that sys.executable is the best way if you have to start a new Python interpreter. However sys.executable may not be set for NT services. So there may be a p

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 10:31 AM, News123 wrote: On 07/25/2010 02:46 PM, Edward Diener wrote: On 7/25/2010 6:07 AM, Gelonida wrote: There the windows solution could be something like a small 'pystarter' program, which would decide depending on the file's location / the file's first line which python sho

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Thomas Jollans
On 07/25/2010 09:19 PM, Edward Diener wrote: > On 7/25/2010 10:03 AM, Thomas Jollans wrote: >> On 07/25/2010 02:46 PM, Edward Diener wrote: >>> The problem with this is that you forget that a script can invoke Python >>> internally. So whether one uses the console or file association method >>> of

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Thomas Jollans
On 07/25/2010 09:12 PM, Edward Diener wrote: > On 7/25/2010 1:51 PM, Joel Goldstick wrote: >> There is this: >> http://pypi.python.org/pypi/virtualenv > > It appears to be only for Linux. I don't know where you get that impression from. I don't know how well it works on which platforms, but the f

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 10:03 AM, Thomas Jollans wrote: On 07/25/2010 02:46 PM, Edward Diener wrote: The problem with this is that you forget that a script can invoke Python internally. So whether one uses the console or file association method of invoking Python externally, any already written script can

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 1:51 PM, Joel Goldstick wrote: Edward Diener wrote: Are there any documents about multiple versionsof Python coexisting in the same OS ( Windows in my case ) and what pitfalls to look out for ? I have already run into a number of them. I installed Python 2.7 and 3.1.2 into completel

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Joel Goldstick
Edward Diener wrote: Are there any documents about multiple versionsof Python coexisting in the same OS ( Windows in my case ) and what pitfalls to look out for ? I have already run into a number of them. I installed Python 2.7 and 3.1.2 into completely folders, but immediately ran into serious

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Gelonida
On 07/25/2010 02:46 PM, Edward Diener wrote: > On 7/25/2010 6:07 AM, Gelonida wrote: >> Hi Edward, >> >> There the windows solution could be something like a small 'pystarter' >> program, which would decide depending on the file's location / the >> file's first line which python should be started.

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread News123
On 07/25/2010 02:46 PM, Edward Diener wrote: > On 7/25/2010 6:07 AM, Gelonida wrote: >> There the windows solution could be something like a small 'pystarter' >> program, which would decide depending on the file's location / the >> file's first line which python should be started. > > This does n

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Thomas Jollans
On 07/25/2010 02:46 PM, Edward Diener wrote: > The problem with this is that you forget that a script can invoke Python > internally. So whether one uses the console or file association method > of invoking Python externally, any already written script can use either > internally. Maybe it's just

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 2:20 AM, Steven D'Aprano wrote: On Sat, 24 Jul 2010 22:03:48 -0700, Chris Rebert wrote: Are the .py and .pyc extensions the only ones which are associated with Python or are there others, for a normal Python installation in Windows ? There's also .pyw Also .pyo .py = Python so

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Edward Diener
On 7/25/2010 6:07 AM, Gelonida wrote: Hi Edward, On 07/25/2010 04:40 AM, Edward Diener wrote: I found the solutions too exotic for actual use, and completely ineffectual for the cases I originally cited. The people in that thread seem to have completely forgotten that Python can be invoked ext

Re: Multiple versions of Python coexisting in the same OS

2010-07-25 Thread Gelonida
Hi Edward, On 07/25/2010 04:40 AM, Edward Diener wrote: > I found the solutions too exotic for actual use, and completely > ineffectual for the cases I originally cited. The people in that thread > seem to have completely forgotten that Python can be invoked externally > and internally both throu

Re: Multiple versions of Python coexisting in the same OS

2010-07-24 Thread Steven D'Aprano
On Sat, 24 Jul 2010 22:03:48 -0700, Chris Rebert wrote: >> Are the .py and .pyc extensions the only ones which are associated with >> Python or are there others, for a normal Python installation in Windows >> ? > > There's also .pyw Also .pyo .py = Python source code, usually associated with c

Re: Multiple versions of Python coexisting in the same OS

2010-07-24 Thread Chris Rebert
On Sat, Jul 24, 2010 at 7:40 PM, Edward Diener wrote: > On 7/24/2010 6:25 AM, Mark Lawrence wrote: >> On 24/07/2010 04:17, Edward Diener wrote: >>> Are there any documents about multiple versionsof Python coexisting in >>> the same OS ( Windows in my case ) and what pitfalls to look out for ? I >>

Re: Multiple versions of Python coexisting in the same OS

2010-07-24 Thread Edward Diener
On 7/24/2010 6:25 AM, Mark Lawrence wrote: On 24/07/2010 04:17, Edward Diener wrote: Are there any documents about multiple versionsof Python coexisting in the same OS ( Windows in my case ) and what pitfalls to look out for ? I have already run into a number of them. I installed Python 2.7 and

Re: Multiple versions of Python coexisting in the same OS

2010-07-24 Thread Edward Diener
On 7/24/2010 6:25 AM, Mark Lawrence wrote: On 24/07/2010 04:17, Edward Diener wrote: Are there any documents about multiple versionsof Python coexisting in the same OS ( Windows in my case ) and what pitfalls to look out for ? I have already run into a number of them. I installed Python 2.7 and

Re: Multiple versions of Python coexisting in the same OS

2010-07-24 Thread Mark Lawrence
On 24/07/2010 04:17, Edward Diener wrote: Are there any documents about multiple versionsof Python coexisting in the same OS ( Windows in my case ) and what pitfalls to look out for ? I have already run into a number of them. I installed Python 2.7 and 3.1.2 into completely folders, but immediate

Multiple versions of Python coexisting in the same OS

2010-07-23 Thread Edward Diener
Are there any documents about multiple versionsof Python coexisting in the same OS ( Windows in my case ) and what pitfalls to look out for ? I have already run into a number of them. I installed Python 2.7 and 3.1.2 into completely folders, but immediately ran into serious problems executing a