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

hofer blabla at dungeon.de
Fri Sep 26 13:41:40 EDT 2008


On Sep 26, 6:21 pm, Peter Otten <__pete... at web.de> 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
>
> You can print options.__dict__ instead of options with little loss of
> information, or turn the warning off
>
> python -Wignore::FutureWarning myscript.py
>
> Peter

Thanks a lot Peter,

Any trick to disable warnings just for a given range of code?


bye H




More information about the Python-list mailing list