[gt-users] warnings
Brent Pedersen
bpederse at gmail.com
Wed Jan 6 17:20:47 CET 2010
On Wed, Jan 6, 2010 at 4:46 AM, Sascha Steinbiss
<steinbiss at zbh.uni-hamburg.de> wrote:
> On 01/05/2010 06:21 PM, Brent Pedersen wrote:
>> hi,
>
> Hi Brent,
>
>> how can i turn off warnings from within python.
>> when i do:
>>
>> import gt
>> f = gt.FeatureIndexMemory()
>> f.add_gff3file("some.gff")
>>
>> it gives the warnings about:
>> warning: seqid "2" on line 2 in file "some.gff" has not been
>> previously introduced with a "##sequence-region" line, create such a
>> line automatically
>
> I just added support for toggling this from Python (from C it's
> trivial). From now on, you can just use gt.warning_disable().
> My test case was:
>
> #!/usr/bin/python
> import gt
> import sys
> f = gt.FeatureIndexMemory()
> print "disabling warnings"
> gt.warning_disable()
> f.add_gff3file((sys.argv)[1])
> print "re-enabling warnings"
> gt.warning_enable_default()
> f.add_gff3file((sys.argv)[1])
>
> and it worked:
>
> $ ./testwarn.py ../../gt_stuff/user_examples/example.gff3
> disabling warnings
> re-enabling warnings
> warning: skipping blank line 13 in file
> "../../gt_stuff/user_examples/example.gff3"
> $
>
> The new code is in the git master or the unstable tarball.
>
>> i also made the change pasted below to stop problems (segfaults) i was
>> having when running under modwsgi/apache:
> [snip]
>
> Thanks a lot. I will have a look at that and integrate it (though I do
> not really get what is fundamentally different now compared to the old
> code).
>
> Sascha
>
> --
> Sascha Steinbiss
> Center for Bioinformatics
> University of Hamburg
> Bundesstr. 43
> 20146 Hamburg
> Germany
>
> Email: steinbiss at zbh.uni-hamburg.de
> URL: http://www.zbh.uni-hamburg.de/steinbiss
> Phone: +49 (40) 42838 7322
> FAX: +49 (40) 42838 7312
>
> _______________________________________________
> gt-users mailing list
> gt-users at genometools.org
> http://genometools.org/mailman/listinfo/gt-users
>
hi, thanks!
i'm not sure why the patch i pasted is different either. there's
something really odd going on between apache
and gt or ctypes.
-brent
More information about the gt-users
mailing list