aboutsummaryrefslogtreecommitdiffstats
path: root/cyberflex-shell.py
diff options
context:
space:
mode:
authorhenryk <henryk@f711b948-2313-0410-aaa9-d29f33439f0b>2005-10-12 02:09:15 +0000
committerhenryk <henryk@f711b948-2313-0410-aaa9-d29f33439f0b>2005-10-12 02:09:15 +0000
commit31225977e2479e061dd92635df98c353aaeb78f6 (patch)
tree243b95e6b79daae23ff7be94dec5eae11d2de838 /cyberflex-shell.py
parent6003cc1fc01413cd7825ea0c9cdb9dd5d60a3828 (diff)
Cardmultiplexer object. Should allow to dynamically bind and unbind classes from a card object.
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@43 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'cyberflex-shell.py')
-rwxr-xr-xcyberflex-shell.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cyberflex-shell.py b/cyberflex-shell.py
index 3b80391..b398986 100755
--- a/cyberflex-shell.py
+++ b/cyberflex-shell.py
@@ -36,9 +36,10 @@ if __name__ == "__main__":
print "Card present: %s" % ((newState[0]['EventState'] & pycsc.SCARD_STATE_PRESENT) and "yes" or "no")
print "ATR: %s" % utils.hexdump(newState[0]['Atr'], short = True)
- card_class = cards.find_class(newState[0]['Atr'])
- card = card_class()
+ pycsc_card = pycsc.pycsc(protocol = pycsc.SCARD_PROTOCOL_ANY)
+ card = cards.new_card_object(pycsc_card)
+
shell = Shell("cyberflex-shell")
shell.register_commands(card, COMMANDS)
shell.register_commands(card)