Python version dilemma

C. Michael Pilato cmpilato at typhoon.xnet.com
Mon Aug 27 20:56:30 CEST 2001


I would be shocked if this is the first time the following question
has been posted to this list, but I'm willing to risk asking it again
anyway.

I have a set of scripts that use 2.1 syntax.  Now, I'd really like
these scripts to, when run by the 1.5 interpreter, gracefully state
that version 2 is required.  However, my code fails during the
compilation stage with the 1.5 interpreter (SyntaxError's and such),
and so never gets the chanced to execute a code portion that might
print a pretty (or at least useful) error message.

Is there *any way* to do what I'm trying to do.  A few hours of Google
searching and book reading has turned up nothing thus far.

Please send responses to cmpilato at collab.net.




More information about the Python-list mailing list