Re: help with warning formatting

2005-03-11 Thread jasmin
> import warnings
> warnings.warn('foo')
>
> % python t.py
> t.py:2: UserWarning: foo
>   warnings.warn('foo')
>
> Is there a way to just issue the warning message itself, or to at
least
> suppress printing the line where the warning occurred ("
> warnings.warn('foo')" in the example)?

In case anyone else is searching for a solution to this the following
sort of works in Python 2.1:

warnings.warn_explicit('foo', UserWarning, '', '')

:: UserWarning: foo

I'm new to Python so if there is a better way to do this please let me
know.

Jasmin

-- 
http://mail.python.org/mailman/listinfo/python-list


%%% Anuksha navel & smootched by the Hero V----? %%%

2010-02-22 Thread jasmin sweety
%%% Anuksha navel & smootched by the Hero V? %%%

http://sites.google.com/site/hifiprofile/
http://sites.google.com/site/hifiprofile/
http://sites.google.com/site/hifiprofile/
http://sites.google.com/site/hifiprofile/
-- 
http://mail.python.org/mailman/listinfo/python-list