summaryrefslogtreecommitdiff
path: root/portato.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato.py')
-rwxr-xr-xportato.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/portato.py b/portato.py
index 0d357ea..4db4b0e 100755
--- a/portato.py
+++ b/portato.py
@@ -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)