Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How do I disable warnings?

Reply
Thread Tools

How do I disable warnings?

 
 
Grant Edwards
Guest
Posts: n/a
 
      09-10-2007
I've read the documentation for the warnings module, but I'm
still unable to figure out how to disable a warning.

I'd like to disable this warning:

Warning: 'with' will become a reserved keyword in Python 2.6

AFAICT, the following should work. But, it doesn't.

import warnings
warnings.filterwarnings('ignore',".*'with' will become a reserved keyword.*")

What am I doing wrong?

--
Grant Edwards grante Yow! And then we could sit
at on the hoods of cars at
visi.com stop lights!
 
Reply With Quote
 
 
 
 
attn.steven.kuo@gmail.com
Guest
Posts: n/a
 
      09-10-2007
On Sep 10, 12:34 pm, Grant Edwards <(E-Mail Removed)> wrote:
> I've read the documentation for the warnings module, but I'm
> still unable to figure out how to disable a warning.
>
> I'd like to disable this warning:
>
> Warning: 'with' will become a reserved keyword in Python 2.6
>
> AFAICT, the following should work. But, it doesn't.
>
> import warnings
> warnings.filterwarnings('ignore',".*'with' will become a reserved keyword.*")
>
> What am I doing wrong?
>



That looks to be a compile-time warning. Refer to a
previous discussion here:

http://groups.google.com/group/comp....604b477ad31ef3

--
Hope this helps,
Steven


 
Reply With Quote
 
 
 
 
Grant Edwards
Guest
Posts: n/a
 
      09-10-2007
On 2007-09-10, http://www.velocityreviews.com/forums/(E-Mail Removed) <(E-Mail Removed)> wrote:

>> I'd like to disable this warning:
>>
>> Warning: 'with' will become a reserved keyword in Python 2.6
>>
>> AFAICT, the following should work. But, it doesn't.
>>
>> import warnings
>> warnings.filterwarnings('ignore',".*'with' will become a reserved keyword.*")
>>
>> What am I doing wrong?

>
> That looks to be a compile-time warning.


Doh! Of course it's a compile-time warning.

> Refer to a previous discussion here:
>
> http://groups.google.com/group/comp....604b477ad31ef3


Thanks.

--
Grant Edwards grante Yow! The Osmonds! You are
at all Osmonds!! Throwing up
visi.com on a freeway at dawn!!!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Disable Wireless Connection at Start-Up? Guy Quinn Wireless Networking 3 11-10-2009 04:41 PM
unable to disable network connection Peter Welk Wireless Networking 5 10-15-2007 09:39 AM
How to disable Wireless Network Connection w/o losing Network Brid =?Utf-8?B?SGF0bW9u?= Wireless Networking 1 12-16-2004 07:37 PM
Disable Broadcast??? Ben Wireless Networking 5 08-01-2004 09:12 PM



Advertisments