[Pcsclite-muscle] An alternate Python library for PC/SC Lite
Ludovic Rousseau
ludovic.rousseau
Mon Dec 8 00:10:18 PST 2014
Hello,
2014-12-08 4:39 GMT+01:00 <russell+muscle at stuart.id.au>:
> Python-pcsclite is a set of Python2 bindings for the PC/SC lite library. It is hosted on Sourceforge:
>
> http://python-pcsclite.sourceforge.net/
>
> Complete documentation is available at:
>
> http://python-pcsclite.sourceforge.net/doc/html/
>
> A review of python-pcsclite was posted by Ludovic Rousseau in his blog, where he compared it to Pyscard:
>
> http://ludovicrousseau.blogspot.fr/2014/12/pcsc-sample-in-python-using-python.html
>
> The blog post correctly observes that Python-pcsclite does the same job as pyscard, so the choice is a matter of taste. The main difference is python-pcsclite providers a fairly direct implementation of the PC/SC lite C library, whereas pyscard provides it's own abstractions. Users of the PC/SC C library should find python-pcsclite fairly familiar territory - it's just the C bindings with the some of the methods for shooting yourself in the foot removed.
pyscard also has a low level API that is a copy of the WinSCard API.
See the "Low level API" example at
http://ludovicrousseau.blogspot.fr/2010/04/pcsc-sample-in-python.html
It is even more direct implementation of PC/SC than python-pcsclite :-)
> Since pyscard's abstractions operate at a higher level and so can be simpler to use. However python-pcsclite comes with a iso7816 library that operates at a higher level again - it decodes the responses from smart card commands. The accompanying usimtool program provides a command line interface to the iso7816 library. It can do things like dump the directory tree, read and write files, and unlock the SIM using PIN1 and PIN2. Simple smart card jobs can be done by calling usimtool from a shell script. Usimtool and iso7816.py are shipped as examples for python-pcsclite.
Usimtool looks to be very powerfull. Maybe you could document it
better with examples of use cases and make it a "real" application and
not just a sample?
> Finally, a note to the whoever who maintains http://pcsclite.alioth.debian.org/musclecard.com : The one python library listed there has broken links. It would be nice if the entry was replaced by pointers to pyscard and python-pcsclite.
http://pcsclite.alioth.debian.org/musclecard.com is a static copy of
the previous (now dead) muscle web site. I do not plan to make changes
to this web site. It is like a museum now.
I think the Pycsc Python wrapper, written by JL Giraud, is even older
than the 2 other wrappers.
If needed, an archived version of the pycsc web page is at
http://web.archive.org/web/20090206074834/http://homepage.mac.com/jlgiraud/pycsc/Pycsc.html
Regards,
--
Dr. Ludovic Rousseau
More information about the pcsclite-muscle
mailing list