Re: #!/usr/bin/env python > 2.4?

2007-03-23 Thread Jon Ribbens
In article <[EMAIL PROTECTED]>, Gabriel Genellina wrote: > Uh... I never thought it was an implied formula there - that F0 had to > come from 1.5 = 15 = 0xF. > I think it should be stated much more clearly. I'm not sure what you're saying. You are correct that the documentation is rather vague.

Re: #!/usr/bin/env python > 2.4?

2007-03-22 Thread Gabriel Genellina
En Wed, 21 Mar 2007 14:42:53 -0300, Jon Ribbens <[EMAIL PROTECTED]> escribió: > In article <[EMAIL PROTECTED]>, Sion Arrowsmith > wrote: >> Jon Ribbens <[EMAIL PROTECTED]> wrote: >>> if sys.hexversion < 0x020400f0: >>>... error ... >> >> "Readability counts." >> >> if sys.version_info <

Re: #!/usr/bin/env python > 2.4?

2007-03-22 Thread Gabriel Genellina
En Wed, 21 Mar 2007 07:07:20 -0300, Jon Ribbens <[EMAIL PROTECTED]> escribió: > In article <[EMAIL PROTECTED]>, Stargaming wrote: >> from sys import version_info >> if version_info[0] < 2 or version_info[1] < 4: >> raise RuntimeError("You need at least python2.4 to run this >> script") >

Re: #!/usr/bin/env python > 2.4?

2007-03-22 Thread starGaming
On Mar 22, 5:23 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > > I don't see any problem with:: > > > if version_info[0] <= 2 and version_info[1] < 4: > > raise RuntimeError() > > What if the version number is 1.5? Ah, now I get your pro

Re: #!/usr/bin/env python > 2.4?

2007-03-22 Thread Jon Ribbens
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I don't see any problem with:: > > if version_info[0] <= 2 and version_info[1] < 4: > raise RuntimeError() What if the version number is 1.5? -- http://mail.python.org/mailman/listinfo/python-list

Re: #!/usr/bin/env python > 2.4?

2007-03-22 Thread starGaming
On Mar 21, 11:11 pm, Sander Steffann <[EMAIL PROTECTED]> wrote: > Hi, > > Op 21-mrt-2007, om 20:41 heeft [EMAIL PROTECTED] het volgende > geschreven: > > > > > On Mar 21, 11:07 am, Jon Ribbens <[EMAIL PROTECTED]> wrote: > >> In article <[EMAIL PROTECTED]>, Stargaming wrote: > >>> from sys import ve

Re: #!/usr/bin/env python > 2.4?

2007-03-21 Thread Sander Steffann
Hi, Op 21-mrt-2007, om 20:41 heeft [EMAIL PROTECTED] het volgende geschreven: > On Mar 21, 11:07 am, Jon Ribbens <[EMAIL PROTECTED]> wrote: >> In article <[EMAIL PROTECTED]>, Stargaming wrote: >>> from sys import version_info >>> if version_info[0] < 2 or version_info[1] < 4: >>> raise Run

Re: #!/usr/bin/env python > 2.4?

2007-03-21 Thread starGaming
On Mar 21, 11:07 am, Jon Ribbens <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, Stargaming wrote: > > from sys import version_info > > if version_info[0] < 2 or version_info[1] < 4: > > raise RuntimeError("You need at least python2.4 to run this script") > > That'll fail when the

Re: #!/usr/bin/env python > 2.4?

2007-03-21 Thread Jon Ribbens
In article <[EMAIL PROTECTED]>, Sion Arrowsmith wrote: > Jon Ribbens <[EMAIL PROTECTED]> wrote: >> if sys.hexversion < 0x020400f0: >>... error ... > > "Readability counts." > > if sys.version_info < (2, 4): > ... error ... Maybe you should suggest a patch to the Python documentation th

Re: #!/usr/bin/env python > 2.4?

2007-03-21 Thread Sion Arrowsmith
Jon Ribbens <[EMAIL PROTECTED]> wrote: >You want: > > if sys.hexversion < 0x020400f0: >... error ... "Readability counts." if sys.version_info < (2, 4): ... error ... -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ ___ | "Frankly I have no feelings towards penguins o

Re: #!/usr/bin/env python > 2.4?

2007-03-21 Thread Jon Ribbens
In article <[EMAIL PROTECTED]>, Stargaming wrote: > from sys import version_info > if version_info[0] < 2 or version_info[1] < 4: > raise RuntimeError("You need at least python2.4 to run this script") That'll fail when the major version number is increased (i.e. Python 3.0). You want: if

Re: #!/usr/bin/env python > 2.4?

2007-03-20 Thread rh0dium
On Mar 20, 12:30 pm, Stargaming <[EMAIL PROTECTED]> wrote: > > from sys import version_info > if version_info[0] < 2 or version_info[1] < 4: > raise RuntimeError("You need at least python2.4 to run this script") This is great!! > > IMO you shouldn't struggle with it too hard. If the user's p

Re: #!/usr/bin/env python > 2.4?

2007-03-20 Thread Stargaming
rh0dium schrieb: >>Python usually installs so the latest version gets linked as >>/usr/bin/python. HTere's no need to bind your scripts to a particular >>version. >> >>regards > > > True - but that entirely depends on your path. Example: > > Redhat (RHEL3) ships with python2.3 in /usr/bin > Add

Re: #!/usr/bin/env python > 2.4?

2007-03-20 Thread rh0dium
> Python usually installs so the latest version gets linked as > /usr/bin/python. HTere's no need to bind your scripts to a particular > version. > > regards True - but that entirely depends on your path. Example: Redhat (RHEL3) ships with python2.3 in /usr/bin Adding an 2.5 version to /usr/loc

Re: #!/usr/bin/env python > 2.4?

2007-03-20 Thread Steve Holden
> out. Great now how do I put /usr/bin/env python>2.4? > > Or can you suggest a better way to skin this cat? > > Thanks again!! > The usual way is something like #!/usr/bin/env python Python usually installs so the latest version gets linked as /usr/bin/python. HTere'

#!/usr/bin/env python > 2.4?

2007-03-20 Thread rh0dium
log.debug("I LOVE LOGGING") if __name__ == '__main__': sys.exit(main(loglevel=LOGLEVEL)) -------- But now you guys continued to make this cool language and 2.5 came out. Great now how do I put /usr/bin/env python>2.4? Or can you suggest a better way to skin this cat? Thanks again!! -- http://mail.python.org/mailman/listinfo/python-list