Re: Understanding (and getting rid) of optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will return a

2008-09-26 Thread hofer
On Sep 26, 6:21 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > hofer wrote: > > Hi, > > > I get following warning with a python script: > > > optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will > > return a signed string in Python 2.4 and up > &

Re: Understanding (and getting rid) of optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will return a

2008-09-26 Thread Peter Otten
hofer wrote: > Hi, > > I get following warning with a python script: > > > optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will > return a signed string in Python 2.4 and up > > > my code: > from optparse import OptionParser > >

Understanding (and getting rid) of optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will return a

2008-09-26 Thread hofer
Hi, I get following warning with a python script: optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will return a signed string in Python 2.4 and up my code: from optparse import OptionParser if __name__ == '__main__': parser = OptionParser() parser.add_option(&#x

Re: Retry: Question about FutureWarning

2007-08-20 Thread Gabriel Genellina
En Tue, 14 Aug 2007 22:44:17 -0300, Steven W. Orr <[EMAIL PROTECTED]> escribi�: > The shell compile command I use to generate both the .pyc and the .pyo > files is: > > python=/usr/bin/python2.3 > i_python () > { > $python -c "import $1" > $python -O -c "import $1" > } This is irrel

Re: Retry: Question about FutureWarning

2007-08-15 Thread Peter Otten
de the module because it is issued during its compilation, not its execution: $ cat tmp.py import warnings warnings.filterwarnings("ignore", category=FutureWarning) print "FutureWarning switched off" warnings.warn("yadda", category=FutureWarning) 0xffff $ rm tmp.py

Re: Retry: Question about FutureWarning

2007-08-15 Thread Steven W. Orr
e of -1 is. ;-) On Tuesday, Aug 14th 2007 at 18:49 -0700, quoth Erik Max Francis: =>Steven W. Orr wrote: => =>> M1.py:268: FutureWarning: hex/oct constants > sys.maxint will =>> return positive values in Python 2.4 and up =>>StartTime = safe_dict_get ( dic, 'start

Re: Retry: Question about FutureWarning

2007-08-15 Thread A.T.Hofkamp
On 2007-08-15, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Aug 14, 8:49 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > > So if by '0x' you meant -1, then change this line to use -1. > Otherwise, if you really meant 4294967295L, leave it at 0x and > move on. A third option is to

Re: Retry: Question about FutureWarning

2007-08-15 Thread Paul McGuire
On Aug 14, 8:49 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Steven W. Orr wrote: > > M1.py:268: FutureWarning: hex/oct constants > sys.maxint will > > return positive values in Python 2.4 and up > >StartTime = safe_dict_get ( dic, 'starttime'

Re: Retry: Question about FutureWarning

2007-08-14 Thread Erik Max Francis
Steven W. Orr wrote: > M1.py:268: FutureWarning: hex/oct constants > sys.maxint will > return positive values in Python 2.4 and up >StartTime = safe_dict_get ( dic, 'starttime', 0x ) ... > import warnings > warnings.filterwarnings('ignore&

Retry: Question about FutureWarning

2007-08-14 Thread Steven W. Orr
n=/usr/bin/python2.3 i_python () { $python -c "import $1" $python -O -c "import $1" } i_python M1 i_python M2 i_python M3 i_python M4 When M1 is compiled, there's no problem. The same for when I compile M2 and M3. But when M4 is compiled, I get the following message:

Question about FutureWarning

2007-08-14 Thread Steven W. Orr
same for when I compile M2 and M3. But when M4 is compiled, I get the following message: M1.py:268: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up StartTime = safe_dict_get ( dic, 'starttime', 0x ) I get the message twice,

Re: optparse.py: FutureWarning error

2005-06-09 Thread John Abel
Magnus Lycka wrote: >John Abel wrote: > > >>Magnus Lycka wrote: >> >> > > > >>As a programmer on Win32, and *nix platforms, I agree with needing >>better tools. however, I find cygwin a pita. For tools such as grep >>and find, try this http://unxutils.sourceforge.net/. No need for cyg

Re: optparse.py: FutureWarning error

2005-06-09 Thread Magnus Lycka
John Abel wrote: > Magnus Lycka wrote: > As a programmer on Win32, and *nix platforms, I agree with needing > better tools. however, I find cygwin a pita. For tools such as grep > and find, try this http://unxutils.sourceforge.net/. No need for cygwin > ( though that's not say cygwin isn't u

Re: optparse.py: FutureWarning error

2005-06-08 Thread Kent Johnson
Kent Johnson wrote: > Terry Reedy wrote: > >> "Kent Johnson" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>> Terry Reedy wrote: >>> "kosuke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > man python --- > > COMMAND LINE OPTIONS

Re: optparse.py: FutureWarning error

2005-06-08 Thread John Abel
Magnus Lycka wrote: >Terry Reedy wrote: > > >>This should REALLY be on the doc page of the Python site. >> >> >Agreed. > > > >>It is really time to stop pretending that the only Python users >>that count have a *nix on their desk. >> >> >I agree with this too, but if you're a program

Re: optparse.py: FutureWarning error

2005-06-08 Thread Magnus Lycka
Terry Reedy wrote: > This should REALLY be on the doc page of the Python site. Agreed. > It is really time to stop pretending that the only Python users > that count have a *nix on their desk. I agree with this too, but if you're a programmer on the Windows platform with possibility to install s

Re: optparse.py: FutureWarning error

2005-06-03 Thread Kent Johnson
Terry Reedy wrote: > "Kent Johnson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Terry Reedy wrote: >> >>>"kosuke" <[EMAIL PROTECTED]> wrote in message >>>news:[EMAIL PROTECTED] >>> >>> man python --- COMMAND LINE OPTIONS >>> >>> >>>This should REALLY be on the d

Re: optparse.py: FutureWarning error

2005-06-03 Thread Terry Reedy
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: >> "kosuke" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>>man python --- >>> >>>COMMAND LINE OPTIONS >> >> >> This should REALLY be on the doc page of the Python site. > > Hear,

Re: optparse.py: FutureWarning error

2005-06-03 Thread Michael Hoffman
John Machin wrote: > Michael Hoffman wrote: > >> Terry Reedy wrote: >> >>> c) Check to see if Python has a startup option for suppressing warnings >>> >>> As to c) python -h gives a list indicating what I thought, that -W >>> controls warnings, but gives insufficient info for me to use it, and >

Re: optparse.py: FutureWarning error

2005-06-03 Thread Kent Johnson
Terry Reedy wrote: > "kosuke" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>man python --- >> >>COMMAND LINE OPTIONS > > > This should REALLY be on the doc page of the Python site. Hear, hear! I never even knew this existed! Where should it go in the docs? In the Language

Re: optparse.py: FutureWarning error

2005-06-03 Thread Terry Reedy
"kosuke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > man python --- > > COMMAND LINE OPTIONS This should REALLY be on the doc page of the Python site. I remember asking for this about 7 years ago and being ridiculed for only having Windows. It is really time to stop pretend

Re: optparse.py: FutureWarning error

2005-06-02 Thread kosuke
man python --- COMMAND LINE OPTIONS -c command Specify the command to execute (see next section). This terminates the option list (following options are passed as arguments to the command). -d Turn on parser debugging output (for wizards only, depen

Re: optparse.py: FutureWarning error

2005-06-02 Thread John Machin
Michael Hoffman wrote: > Terry Reedy wrote: > >> c) Check to see if Python has a startup option for suppressing warnings >> >> As to c) python -h gives a list indicating what I thought, that -W >> controls warnings, but gives insufficient info for me to use it, and I >> didn't find any more in t

Re: optparse.py: FutureWarning error

2005-06-02 Thread Michael Hoffman
Terry Reedy wrote: > c) Check to see if Python has a startup option for suppressing warnings > > As to c) python -h gives a list indicating what I thought, that -W controls > warnings, but gives insufficient info for me to use it, and I didn't find > any more in the docs. I hope someone else c

Re: optparse.py: FutureWarning error

2005-06-02 Thread Terry Reedy
"kosuke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I keep getting the following error/warning message when using the > python based program getmail4: > > /usr/lib/python2.3/optparse.py:668: FutureWarning: %u/%o/%x/%X of > negative int will retur

optparse.py: FutureWarning error

2005-06-02 Thread kosuke
I keep getting the following error/warning message when using the python based program getmail4: /usr/lib/python2.3/optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will return a signed string in Python 2.4 and up return ("<%s at 0x%x: %r>" I'm using python2.3.

FutureWarning in win32com?

2005-05-11 Thread Chris Curvey
Hi all, When trying to automate IE thru win32com (using PAMIE), I'm getting this message out C:\Program Files\Plone 2\Python\lib\site-packages\win32com\client\dynamic.py:463 : FutureWarning: %u/%o/%x/%X of negative int will return a signed string in Pyth on 2.4 and up debug_attr_print(&qu

Re: How to get rid of FutureWarning: hex/oct constants...

2005-04-05 Thread J Correia
Assuming you're just trying to get rid of the message each time the program runs, the following suppresses it: import warnings warnings.filterwarnings('ignore', category=FutureWarning) HTH, -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get rid of FutureWarning: hex/oct constants...

2005-03-27 Thread Bengt Richter
On Sun, 27 Mar 2005 12:48:46 +0200, =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> >>> hex(-2*0x4000+0x40047a80) >> __main__:1: FutureWarning: hex()/oct() of negative int will return a signed >&

Re: How to get rid of FutureWarning: hex/oct constants...

2005-03-27 Thread "Martin v. Löwis"
Bengt Richter wrote: >>> hex(-2*0x4000+0x40047a80) __main__:1: FutureWarning: hex()/oct() of negative int will return a signed string in Python 2.4 and up '0xc0047a80' That "signed string" is a unary minus expression using an absolute value forced by

Re: How to get rid of FutureWarning: hex/oct constants...

2005-03-24 Thread Bengt Richter
On Fri, 25 Mar 2005 03:35:29 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: >On Thu, 24 Mar 2005 23:21:39 -, Grant Edwards <[EMAIL PROTECTED]> wrote: > >>How do I get rid of the following warning? >> >> .py:233: FutureWarning: hex/oct constants > sys.maxint w

Re: How to get rid of FutureWarning: hex/oct constants...

2005-03-24 Thread Bengt Richter
On Thu, 24 Mar 2005 23:21:39 -, Grant Edwards <[EMAIL PROTECTED]> wrote: >How do I get rid of the following warning? > > .py:233: FutureWarning: hex/oct constants > sys.maxint will return > positive values in Python 2.4 and up > fcntl.ioctl(self.dev.fileno(),0xc004

Re: How to get rid of FutureWarning: hex/oct constants...

2005-03-24 Thread Peter Hansen
Grant Edwards wrote: Too much work. I'd have to go upgrade a half-dozen machines. I guess I'll just live with the warning. It sort of sucks that you get warned about something which you can't fix. I'm pretty sure you can disable warnings in the warnings module. Check the docs or archives. -Peter

Re: How to get rid of FutureWarning: hex/oct constants...

2005-03-24 Thread Grant Edwards
h work. I'd have to go upgrade a half-dozen machines. I guess I'll just live with the warning. It sort of sucks that you get warned about something which you can't fix. >> .py:233: FutureWarning: hex/oct constants > sys.maxint will return >> positive values in Pyth

Re: How to get rid of FutureWarning: hex/oct constants...

2005-03-24 Thread Terry Reedy
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How do I get rid of the following warning? Switch to 2.4? Or is there a command line switch to do so? > .py:233: FutureWarning: hex/oct constants > sys.maxint will return > positive

How to get rid of FutureWarning: hex/oct constants...

2005-03-24 Thread Grant Edwards
How do I get rid of the following warning? .py:233: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",i,0,0)) I tried using 0xc0047a80L. That got rid of the warning, but

Re: FutureWarning

2004-12-27 Thread Bengt Richter
On Fri, 24 Dec 2004 10:10:38 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: >Egor Bolonev wrote: >> = >> C:\Documents and Settings\ŠÕÀ³\My >> Documents\Scripts\octopus_eye\1\oct_eye_db.py: >> 213: FutureWarning: hex()/oct() of negative int will

Re: FutureWarning

2004-12-24 Thread Peter Hansen
Egor Bolonev wrote: = C:\Documents and Settings\┼уюЁ\My Documents\Scripts\octopus_eye\1\oct_eye_db.py: 213: FutureWarning: hex()/oct() of negative int will return a signed string in P ython 2.4 and up if hex(binascii.crc32(data))[0] == '-': = hex() w

RE: FutureWarning

2004-12-24 Thread Batista, Facundo
Title: RE: FutureWarning [Egor Bolonev] #- = #- C:\Documents and Settings\+уюЁ\My #- Documents\Scripts\octopus_eye\1\oct_eye_db.py: #- 213: FutureWarning: hex()/oct() of negative int will return #- a signed #- string in P #- ython 2.4 and up #-    if hex(binascii.crc32

FutureWarning

2004-12-24 Thread Egor Bolonev
= C:\Documents and Settings\┼уюЁ\My Documents\Scripts\octopus_eye\1\oct_eye_db.py: 213: FutureWarning: hex()/oct() of negative int will return a signed string in P ython 2.4 and up if hex(binascii.crc32(data))[0] == '-': = hex() will return numbers