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 >> string in Python 2.4 >> and up >> '0xc0047a8

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 the inadequacy of the literal represe

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 will return >> positive values in P

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(),0xc0047a80,struct.pack("HBB",i,0

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
On 2005-03-25, Terry Reedy <[EMAIL PROTECTED]> wrote: > > "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? Too much work. I'd have to go upgrade a half-dozen

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 values in Python 2.4 and up TJR