[gstreamer-bugs] [Bug 549879] gst-python managing sys.argv while it shouldn't

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Fri Apr 3 14:12:13 PDT 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=549879

  GStreamer | gst-python | Ver: 0.10.12




------- Comment #12 from Tobias Mueller  2009-04-03 21:12 UTC -------
Heya,

(In reply to comment #10)
> So yeah it would allow you to do something like this:
> """
> import pygst
> pygst.require('0.10')
> pygst.will_handle_init
> import gst
> <do your arg parsing BUT YOU CAN NOT DO ANYTHING ELSE>
> gst.init
> <start using/mentionning the gst module symbols>
> """
> 
> Is it really that much more flexible than:
> """
> import pygst
> pygst.require('0.10')
> <do your arg parsing>
> import gst
> <start using/mentionning the gst module symbols>
> """
> 
Yes. For various reasons, the most important one being that many python
programs organize their imports on the top. You wouldn't force them to change
that.
Another one, that it's not very pythonic to have modules implicitly use
sys.argv when importing.

If I programmed with pygst, it'd annoy me pretty much :) But also: I don't
really care.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=549879.




More information about the Gstreamer-bugs mailing list