aboutsummaryrefslogtreecommitdiffstats
path: root/readpass.py
diff options
context:
space:
mode:
authorhploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b>2007-06-08 02:10:18 +0000
committerhploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b>2007-06-08 02:10:18 +0000
commitd1d2698111f1642348f70b1e8bc46607f91ca364 (patch)
tree500abcd5fa8e295ff3612b0261e436417fe75c9c /readpass.py
parent3fa2f884191bcbac2994fcba964bbceb1087bc10 (diff)
start GUI code
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@225 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'readpass.py')
-rwxr-xr-xreadpass.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/readpass.py b/readpass.py
index c6c50f5..b439b1f 100755
--- a/readpass.py
+++ b/readpass.py
@@ -4,10 +4,19 @@
from utils import pycsc
import utils, cards, TLV_utils, sys, binascii, time, traceback
+OPTIONS = "G"
+LONG_OPTIONS = ["no-gui"]
+
+use_gui = True
+
if __name__ == "__main__":
c = utils.CommandLineArgumentHelper()
- (options, arguments) = c.getopt(sys.argv[1:])
+ (options, arguments) = c.getopt(sys.argv[1:], OPTIONS, LONG_OPTIONS)
+
+ for option, value in options:
+ if option in ("-G","--no-gui"):
+ use_gui = False
pycsc_card = c.connect()
card = cards.new_card_object(pycsc_card)
@@ -22,3 +31,9 @@ if __name__ == "__main__":
else:
p = cards.passport_application.Passport.from_card(card)
+ if use_gui:
+ import gui
+
+ g = gui.PassportGUI()
+ g.set_passport(p)
+ g.run()