[Pcsclite-cvs-commit] r2413 - in trunk/pycsc: . examples

Ludovic Rousseau rousseau at alioth.debian.org
Wed Feb 21 15:01:00 CET 2007


Author: rousseau
Date: 2007-02-21 15:00:58 +0100 (Wed, 21 Feb 2007)
New Revision: 2413

Added:
   trunk/pycsc/examples/
   trunk/pycsc/examples/example2.py
Log:
high level API example


Added: trunk/pycsc/examples/example2.py
===================================================================
--- trunk/pycsc/examples/example2.py	2007-02-21 13:59:57 UTC (rev 2412)
+++ trunk/pycsc/examples/example2.py	2007-02-21 14:00:58 UTC (rev 2413)
@@ -0,0 +1,18 @@
+#! /usr/bin/env python
+
+import PyCSC
+
+p = PyCSC.PyCSCLib()
+print p.listReaders()
+
+card = p.card()
+print "Connected to reader: " + card.readerName
+
+print "ATR: " + card.atr
+
+apdu = "00A40000023F00"
+print "Transmit: " + apdu
+(resp, sw) = card.transmit(apdu)
+print "resp: " + resp
+print "sw: %s (%s)" % (sw, card.iso7816(sw))
+


Property changes on: trunk/pycsc/examples/example2.py
___________________________________________________________________
Name: svn:executable
   + *




More information about the Pcsclite-cvs-commit mailing list