Did I find the right examples for you? yes no

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)
Main utility function

Function to help instantiate a WurflProcessor class or subclass with
additional command line options.

@param processor_class: The WurflProcessor class or a subclass.
@type processor_class: WurflProcessor
@param device_handler_class: A reference to a subclass of DeviceHandler.
@type device_handler_class: DeviceHandler
@param option_parser: An instance of OptionParser. The dictionary from(more...)

        def main(processor_class, device_handler_class, option_parser):
    """
    Main utility function

    Function to help instantiate a WurflProcessor class or subclass with
    additional command line options.

    @param processor_class: The WurflProcessor class or a subclass.
    @type processor_class: WurflProcessor
    @param device_handler_class: A reference to a subclass of DeviceHandler.
    @type device_handler_class: DeviceHandler
    @param option_parser: An instance of OptionParser. The dictionary from
                          this object will be passed to processor_class in
                          the keyword 'option'.
    @type option_parser: OptionParser.OptionParser
    """
    options, args = option_parser.parse_args()

    if args:
        wurflxml = args[0]
    else:
        print >> sys.stderr, op.get_usage()
        sys.exit(1)

    wurfl = processor_class(wurflxml, device_handler=device_handler_class,
                            options=options.__dict__)
    wurfl.process()
        


src/m/o/mobile.sniffer-1.0.0/mobile/sniffer/wurlf/wurfl2python.py   mobile.sniffer(Download)
from time import ctime
 
from pywurfl.wurflprocessor import DeviceHandler, WurflProcessor, op, main
 
 
    op.add_option("-o", "--output", dest="outfile", default=None,
                  help="The name of the module to produce.")
    main(WurflPythonWriter, DeviceSerializer, op)
 

src/d/j/django-ua-mapper-HEAD/ua_mapper/management/commands/wurfl2python.py   django-ua-mapper(Download)
from time import ctime
 
from pywurfl.wurflprocessor import DeviceHandler, WurflProcessor, op, main
 
 
    op.add_option("-o", "--output", dest="outfile", default=None,
                  help="The name of the module to produce.")
    main(WurflPythonWriter, DeviceSerializer, op)
 

src/w/s/wsgi-ua-mapper-0.0.4/ua_mapper/wurfl2python.py   wsgi-ua-mapper(Download)
from time import ctime
 
from pywurfl.wurflprocessor import DeviceHandler, WurflProcessor, op, main
 
 
    op.add_option("-o", "--output", dest="outfile", default=None,
                  help="The name of the module to produce.")
    main(WurflPythonWriter, DeviceSerializer, op)
 

src/p/y/pywurfl-7.2.1/bin/wurfl2python.py   pywurfl(Download)
from time import ctime
 
from pywurfl.wurflprocessor import DeviceHandler, WurflProcessor, op, main
 
 
    op.add_option("-o", "--output", dest="outfile", default=None,
                  help="The name of the module to produce.")
    main(WurflPythonWriter, DeviceSerializer, op)