gstrreamer and optparse

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

gstrreamer and optparse

Nicolas Bertrand-4
Hello,
I facing some problems using gst and optparse under python . When I use
the -h option in my app , I have the help options of gstreamer not of my
app.
I use python 2.6 and python-gst 0.10.17-1 under ubuntu karmic

Do you have and idea of how I can display my options instead of
gstreamer one ?

Here after the sample code :

from optparse import OptionParser
from optparse import make_option
import gst

if __name__ == '__main__' :

    option_list = [

        make_option("-f", "--file",

                action="store", type="string", dest="filename",

                help=u'"Luciole project file (.xml) to load', metavar="FILE"),

        make_option("-v", "--verbose",

                action="store_true", dest="is_verbose", default=False,

                help=u'Toogle verbosity')]

    usage = "usage: %prog [options] "

    parser = OptionParser(option_list=option_list,usage=usage)

    (options, args2) = parser.parse_args()


The output is :

Usage:

  test_opt_gst.py [OPTION...] - GStreamer initialization

Help Options:

  -h, --help                        Show help options

  --help-all                        Show all help options

  --help-gst                        Show GStreamer Options


Thanks in advance
Cheers

Nico

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstrreamer and optparse

Pedro Algarvio, aka, s0undt3ch
I'm having the same issue.

Pedro Algarvio.
Reply | Threaded
Open this post in threaded view
|

Re: gstrreamer and optparse

Philippe Normand
On Tue, 2010-12-28 at 22:59 -0800, Pedro Algarvio, aka, s0undt3ch wrote:
> I'm having the same issue.
>
> Pedro Algarvio.

A workaround would be to import gst after you parsed the options with
optparse.

Philippe


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstrreamer and optparse

Pedro Algarvio, aka, s0undt3ch
On 29/12/10 08:58, Philippe Normand [via GStreamer-devel] wrote:

> On Tue, 2010-12-28 at 22:59 -0800, Pedro Algarvio, aka, s0undt3ch wrote:
>> I'm having the same issue.
>>
>> Pedro Algarvio.
>
> A workaround would be to import gst after you parsed the options with
> optparse.
>
> Philippe
>
>
> ------------------------------------------------------------------------------
>
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment,
> and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email] </user/SendEmail.jtp?type=node&node=3166872&i=0>
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
> ------------------------------------------------------------------------
> View message @
> http://gstreamer-devel.966125.n4.nabble.com/gstrreamer-and-optparse-tp966512p3166872.html
> To unsubscribe from gstrreamer and optparse, click here
> <
>
That's what I'm currently doing, but this does not seem the proper
behaviour of a library.

Regards,
Pedro Algarvio