From: Tim Golden on
On 28/06/2010 09:29, John Bokma wrote:
> Tim Golden<mail(a)timgolden.me.uk> writes:
>
>> On 28/06/2010 00:03, Eric_Dexter(a)msn.com wrote:
>>> It should be easier to have a large number of python versions on one
>>> machine... I am realy fond of 2.5 so I am probily going to start
>>> compiling them or just include the python2.5 exe if I port stuff and
>>> settle it that way..
>>
>> I have Python versions 2.1-2.7 and 3.0-3.2 installed on my Windows
>> box without any problems. I don't often have to use the full range
>> (mostly, in fact, for confirming that my unit tests still run on
>> my few released modules). But I certainly do use several different
>> ones each day where I have to make sure I'm running the same version
>> as the user who's experiencing a problem.
>>
>> One technique I find particularly handy is to create a pythonxx.exe
>> hardlink in my c:\tools (which is always on my path), pointing to
>> c:\pythonxx\python.exe in turn. Then it's just a matter of: python25
>> my-script.py
>> Even without that, it's only a question of c:\python25\python my-script.py
>> if I need to.
>>
>> I have in the past used a crude shebang-alike Python pre-processor
>> which hands off to the right version. It's a bit sluggish, though,
>> and that outweighed for me the slight convenience. YMMV
>
> You might want to look into the assoc command to (temporarily) associate
> .py& co with a different version of Python.
>

Thanks for the idea. ISTR playing around with this in the past. Ultimately,
though, it's typically a one-off run I'm doing (possibly repeated several
times while I fix the problem!) and the assoc will affect all open sessions
even if I revert it later, so I haven't gone down that route.

I do have a version-switcher script which makes whichever Python exe
runs it the default / on the path / etc. which is a sort of poor man's
virtualenv. (And predates virtualenv, in my defence). But even that I
use rarely.

TJG
From: geremy condra on
On Mon, Jun 28, 2010 at 4:23 AM, John Bokma <john(a)castleamber.com> wrote:
> geremy condra <debatem1(a)gmail.com> writes:
>
>> On Sun, Jun 27, 2010 at 10:35 PM, John Bokma <john(a)castleamber.com> wrote:
>
> [..]
>
>>> I've used several operating systems over many years and each OS has its
>>> own issues. I am currently using mostly Linux and it's far from the
>>> flawless OS some people seem to think it is. While it's true that some
>>> things are easier on OS A than on OS B changing your operating system
>>> because one (minor) thing "doesn't work" is often not an option.
>>
>> Sure, linux has its flaws- but it does include a working shell OOTB, which
>> is what raised this question in the first place.
>
> As mentioned already by someone else, install bash on Windows and
> problem solved (it can be installed without Cygwin).
>
>>> On top of that, I don't think it's that hard to make a small program
>>> that one associates with .py files which checks the first line and feeds
>>> the .py to the correct version of Python based on the information in the
>>> aformentioned first line.
>>
>> I could spend my time reinventing all kinds of wheels. I'm just not sure
>> why I'd want to.
>
> It's clear that you are not interested in running Windows. But the world
> is not limited to what you want. There are people out there who are
> /not/ interested to switch to a different OS just because it's the
> easiest option to /you/.

I'm starting to think that you aren't actually reading what I'm writing
and are instead in the fantasyland where I've advocated something
other than doing what seems easiest and most convenient at the
time. In fact, you seem to be laboring under the false belief that I
have advocated the utter ruination of microsoft, its products, and
your way of life. Since I don't make a habit of that, and in any
event certainly haven't done so in this thread, I have to assume
that any further protestation on my part will only be met with a
correspondingly greater failure to comprehend on yours. As a
result, I'm bowing out. Thanks for the lively discussion.

Geremy Condra
From: John Bokma on
geremy condra <debatem1(a)gmail.com> writes:

> I'm starting to think

Great, about time.

Based on your previous reply I had the feeling you're a condescending
prick, but now I am conviced, so *ploink*!

--
John Bokma j3b

Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development
From: Thomas Jollans on
On 06/28/2010 03:21 AM, Stephen Hansen wrote:
> On 6/27/10 6:11 PM, geremy condra wrote:
>> On Sun, Jun 27, 2010 at 8:50 PM, Grant
>> Edwards<invalid(a)invalid.invalid> wrote:
>>> If you install a real shell on Windows, then the hash-bang line works
>>> fine. :)
>>
>> Might as well spare yourself the trouble and install linux or *bsd. It's
>> probably easier.
>
> Not at all, bash via msys is trivial to install and use.
>

Installing Linux is still a LOT easier than installing a working MSYS
since you get proper package management with proper dependency
resolution, while with MSYS, you end up downloading dozens of different
inter-dependent GNU packages one-by-one until anything works. At least
that's what it looked like a couple of months ago.

Granted, cygwin has a nice installer.
From: Aaron Watters on
On Jun 26, 9:06 pm, Steven D'Aprano <st...(a)REMOVE-THIS-
cybersource.com.au> wrote:
> ....
> I didn't notice this level of angst when Python made equally significant
> changes going from 1.5 to 2.0... admittedly Python 1.5 code would work
> unchanged in 2.0, but the 2.x series introduced MUCH bigger additions to
> Python than anything 3.0 and 3.1 have added, and anyone taking advantage
> of those changes is implicitly writing code which is not backwards

As a historical note, Python was a lot less pervasive then.
Nevertheless there were some subtle but significant
breakages in 1-->2 which caused a lot of people to throw up their
hands
and give up. The abandonment of regex comes to mind, and there
were others.

I personally earned income a couple years ago
as a contractor supporting Python 1.x
applications which were put into cryogenic preservation when
the developers decided to abandon Python in favor of a less
chaotic platform, like Java or C# or even (got help us) Perl.

I apologize if I pontificate.
-- Aaron Watters