From: duplo Date: Tue, 7 Apr 2009 08:23:53 +0000 (+0000) Subject: Add parameter handling X-Git-Tag: 2.1.0~211 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=df2795a44344fbb1a9cec920115e155cefcfb2fc;p=bertos.git Add parameter handling git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2471 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos.py b/wizard/bertos.py index a92a054b..a6529abe 100755 --- a/wizard/bertos.py +++ b/wizard/bertos.py @@ -58,8 +58,18 @@ def main(): if newer("bertos.qrc", "bertos.rcc"): os.system("rcc -binary bertos.qrc -o bertos.rcc") QResource.registerResource("bertos.rcc") - showStartPage() - sys.exit(app.exec_()) + if "--create" in sys.argv and "--edit" not in sys.argv: + newProject() + elif "--edit" in sys.argv and "--create" not in sys.argv: + editProject() + elif "--create" in sys.argv and "--edit" in sys.argv: + ## TODO: need an explaining message + print " ".join(sys.argv) + print "Invalid usage!" + pass + else: + showStartPage() + sys.exit(app.exec_()) if __name__ == '__main__': main()