diff options
Diffstat (limited to '')
-rwxr-xr-x | portato.py | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -16,11 +16,10 @@ from portato.constants import VERSION, FRONTENDS, STD_FRONTEND import sys if __name__ == "__main__": -# import pychecker.checker uimod = STD_FRONTEND - if len(sys.argv) > 1: - if sys.argv[1] in ("--help","--version","-h","-v"): + for arg in sys.argv[1:]: + if arg in ("--help","--version","-h","-v"): print """Portato %s Copyright (C) 2006-2007 René 'Necoro' Neumann This is free software. You may redistribute copies of it under the terms of @@ -29,8 +28,16 @@ There is NO WARRANTY, to the extent permitted by law. Written by René 'Necoro' Neumann <necoro@necoro.net>""" % VERSION sys.exit(0) - else: - uimod = sys.argv[1] + + if arg == "--check": # run pychecker + import os + os.environ['PYCHECKER'] = "--limit 50" + import pychecker.checker + continue + + uimod = arg + break + if uimod in FRONTENDS: try: exec ("from portato.gui.%s import run" % uimod) |