#!/usr/bin/env python import gtk, pygtk from optparse import OptionParser from DrPrintGui.MainWin import MainWin from DrPrintBackend import Backend if __name__ == "__main__": ## Analyze comand line options usage = "usage: %prog [options] [file]" parser = OptionParser(usage=usage) parser.add_option("-u", "--user", dest="user",default=None, help = "set username to use for the ssh connection", metavar="user") (option, args) = parser.parse_args() if len(args) > 0: filename = args[0] else: filename = None ## Load the Backend that will perform ## all the hard work without being seen ## by the end user. That is -- the sad ## story of every backend. backend = Backend() ## ...and then the main win! The one ## that will try to attract end user ## with her .. ( find a good word ) ## P.S.: We give her a backend, without ## it she will be useless. mw = MainWin(backend = backend, user = option.user, filename = filename) ## Show all :) mw.show() ## ..and let's go! gtk.main()