You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(10) |
Feb
(10) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(17) |
Sep
(9) |
Oct
(10) |
Nov
(2) |
Dec
(5) |
2009 |
Jan
(17) |
Feb
(8) |
Mar
(10) |
Apr
(1) |
May
|
Jun
(11) |
Jul
(18) |
Aug
|
Sep
|
Oct
(10) |
Nov
(40) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
(5) |
Mar
(13) |
Apr
(14) |
May
(27) |
Jun
(86) |
Jul
(1) |
Aug
(12) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(5) |
2011 |
Jan
|
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(11) |
Aug
(1) |
Sep
(3) |
Oct
(65) |
Nov
|
Dec
(1) |
2012 |
Jan
(1) |
Feb
(4) |
Mar
(6) |
Apr
(6) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
(12) |
Oct
(3) |
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(1) |
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(1) |
Nov
(24) |
Dec
(10) |
2015 |
Jan
(1) |
Feb
(10) |
Mar
|
Apr
|
May
(1) |
Jun
(15) |
Jul
(4) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <jda...@us...> - 2011-10-16 10:11:10
|
Revision: 550 http://pyscard.svn.sourceforge.net/pyscard/?rev=550&view=rev Author: jdaussel Date: 2011-10-16 10:11:04 +0000 (Sun, 16 Oct 2011) Log Message: ----------- Replaced has_keys() by in (pep8) Modified Paths: -------------- trunk/pyscard/src/smartcard/reader/ReaderFactory.py Modified: trunk/pyscard/src/smartcard/reader/ReaderFactory.py =================================================================== --- trunk/pyscard/src/smartcard/reader/ReaderFactory.py 2011-10-16 10:09:24 UTC (rev 549) +++ trunk/pyscard/src/smartcard/reader/ReaderFactory.py 2011-10-16 10:11:04 UTC (rev 550) @@ -48,7 +48,7 @@ @param clazz: the reader class name @param readername: the reader name """ - if not ReaderFactory.factories.has_key(clazz): + if not clazz in ReaderFactory.factories: ReaderFactory.factories[clazz] = get_class(clazz).Factory() return ReaderFactory.factories[clazz].create(readername) createReader = staticmethod(createReader) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2011-10-16 10:09:30
|
Revision: 549 http://pyscard.svn.sourceforge.net/pyscard/?rev=549&view=rev Author: jdaussel Date: 2011-10-16 10:09:24 +0000 (Sun, 16 Oct 2011) Log Message: ----------- Replaced has_keys() by in (pep8) Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py 2011-10-16 10:05:45 UTC (rev 548) +++ trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py 2011-10-16 10:09:24 UTC (rev 549) @@ -118,7 +118,7 @@ readerstates = {} readernames = self.getReaderNames() for reader in readernames: - if not readerstates.has_key(reader): + if not reader in readerstates: readerstates[reader] = (reader, SCARD_STATE_UNAWARE) # remove dictionary entry for readers that disappeared @@ -172,7 +172,7 @@ # create a dictionary entry for new readers readernames = self.getReaderNames() for reader in readernames: - if not readerstates.has_key(reader): + if not reader in readerstates: readerstates[reader] = (reader, SCARD_STATE_UNAWARE) # remove dictionary entry for readers that disappeared @@ -263,7 +263,7 @@ readernames = self.getReaderNames() for reader in readernames: # create a dictionary entry for new readers - if not readerstates.has_key(reader): + if not reader in readerstates: readerstates[reader] = (reader, SCARD_STATE_UNAWARE) # remove dictionary entry for readers that disappeared for oldreader in readerstates.keys(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2011-10-16 10:05:51
|
Revision: 548 http://pyscard.svn.sourceforge.net/pyscard/?rev=548&view=rev Author: jdaussel Date: 2011-10-16 10:05:45 +0000 (Sun, 16 Oct 2011) Log Message: ----------- Replaced backticks with repr() Modified Paths: -------------- trunk/pyscard/src/smartcard/Card.py Modified: trunk/pyscard/src/smartcard/Card.py =================================================================== --- trunk/pyscard/src/smartcard/Card.py 2011-10-16 09:27:05 UTC (rev 547) +++ trunk/pyscard/src/smartcard/Card.py 2011-10-16 10:05:45 UTC (rev 548) @@ -46,7 +46,7 @@ """Return True if self==other (same reader and same atr). Return False otherwise.""" if isinstance(other, Card): - return (self.atr == other.atr and `self.reader` == `other.reader`) + return (self.atr == other.atr and repr(self.reader) == repr(other.reader)) else: return False This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2011-10-16 09:27:11
|
Revision: 547 http://pyscard.svn.sourceforge.net/pyscard/?rev=547&view=rev Author: jdaussel Date: 2011-10-16 09:27:05 +0000 (Sun, 16 Oct 2011) Log Message: ----------- Make pep8 happy by replacing has_key with in Modified Paths: -------------- trunk/pyscard/src/smartcard/ATR.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py Modified: trunk/pyscard/src/smartcard/ATR.py =================================================================== --- trunk/pyscard/src/smartcard/ATR.py 2011-10-16 09:15:29 UTC (rev 546) +++ trunk/pyscard/src/smartcard/ATR.py 2011-10-16 09:27:05 UTC (rev 547) @@ -235,17 +235,17 @@ def isT0Supported(self): """Return True if T=0 is supported.""" protocols = self.getSupportedProtocols() - return protocols.has_key('T=0') + return 'T=0' in protocols def isT1Supported(self): """Return True if T=1 is supported.""" protocols = self.getSupportedProtocols() - return protocols.has_key('T=1') + return 'T=1' in protocols def isT15Supported(self): """Return True if T=15 is supported.""" protocols = self.getSupportedProtocols() - return protocols.has_key('T=15') + return 'T=15' in protocols def dump(self): """Dump the details of an ATR.""" Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py 2011-10-16 09:15:29 UTC (rev 546) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py 2011-10-16 09:27:05 UTC (rev 547) @@ -88,7 +88,6 @@ for i in newstates: printstate(i) - finally: hresult = SCardReleaseContext(hcontext) if hresult != SCARD_S_SUCCESS: Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py 2011-10-16 09:15:29 UTC (rev 546) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py 2011-10-16 09:27:05 UTC (rev 547) @@ -37,7 +37,6 @@ znewcardPrimGuid = smartcard.guid.strToGUID('{128F3806-4F70-4ccf-977A-60C390664840}') znewcardSecGuid = smartcard.guid.strToGUID('{EB7F69EA-BA20-47d0-8C50-11CFDEB63BBE}') - try: hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) if hresult != SCARD_S_SUCCESS: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2011-10-16 09:15:35
|
Revision: 546 http://pyscard.svn.sourceforge.net/pyscard/?rev=546&view=rev Author: jdaussel Date: 2011-10-16 09:15:29 +0000 (Sun, 16 Oct 2011) Log Message: ----------- Added parseATR to project files Modified Paths: -------------- trunk/pyscard/tools/vslick/pyscard.vpj Modified: trunk/pyscard/tools/vslick/pyscard.vpj =================================================================== --- trunk/pyscard/tools/vslick/pyscard.vpj 2011-10-16 08:47:12 UTC (rev 545) +++ trunk/pyscard/tools/vslick/pyscard.vpj 2011-10-16 09:15:29 UTC (rev 546) @@ -327,6 +327,13 @@ <F N="../../src/smartcard/Examples/wx/readerviewer/readerviewer.py"/> <F N="../../src/smartcard/Examples/wx/readerviewer/setup.py"/> </Folder> + <Folder + Name="parseATR" + Filters=""> + <F N="../../../contrib/parseATR/parseATR.py"/> + <F N="../../../contrib/parseATR/parseATRhtml.py"/> + <F N="../../../contrib/parseATR/stress_test.py"/> + </Folder> </Folder> <Folder Name="Generated files" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2011-10-16 08:47:18
|
Revision: 545 http://pyscard.svn.sourceforge.net/pyscard/?rev=545&view=rev Author: jdaussel Date: 2011-10-16 08:47:12 +0000 (Sun, 16 Oct 2011) Log Message: ----------- Release date of 1.6.14 to October 2011 Modified Paths: -------------- trunk/pyscard/src/README trunk/pyscard/src/smartcard/ChangeLog trunk/pyscard/src/smartcard/README trunk/pyscard/src/smartcard/doc/framework-samples.html trunk/pyscard/src/smartcard/doc/index.html trunk/pyscard/src/smartcard/doc/scard-samples.html Modified: trunk/pyscard/src/README =================================================================== --- trunk/pyscard/src/README 2011-10-12 13:34:56 UTC (rev 544) +++ trunk/pyscard/src/README 2011-10-16 08:47:12 UTC (rev 545) @@ -24,7 +24,7 @@ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ------------------------------------------------------------------------------- -Last update : pyscard 1.6.14 (January 2011) +Last update : pyscard 1.6.14 (October 2011) ------------------------------------------------------------------------------- pyscard is a python module adding smart cards support to python. Modified: trunk/pyscard/src/smartcard/ChangeLog =================================================================== --- trunk/pyscard/src/smartcard/ChangeLog 2011-10-12 13:34:56 UTC (rev 544) +++ trunk/pyscard/src/smartcard/ChangeLog 2011-10-16 08:47:12 UTC (rev 545) @@ -1,4 +1,4 @@ -1.6.14 (January 2011) +1.6.14 (October 2011) =================== * added support for windows 64bit amd64 (Jean-Daniel Aussel) Modified: trunk/pyscard/src/smartcard/README =================================================================== --- trunk/pyscard/src/smartcard/README 2011-10-12 13:34:56 UTC (rev 544) +++ trunk/pyscard/src/smartcard/README 2011-10-16 08:47:12 UTC (rev 545) @@ -23,7 +23,7 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ------------------------------------------------------------------------------- -Last update : pyscard 1.6.14 (January 2011) +Last update : pyscard 1.6.14 (October 2011) ------------------------------------------------------------------------------- pyscard is a python module adding smart cards support to python. Modified: trunk/pyscard/src/smartcard/doc/framework-samples.html =================================================================== --- trunk/pyscard/src/smartcard/doc/framework-samples.html 2011-10-12 13:34:56 UTC (rev 544) +++ trunk/pyscard/src/smartcard/doc/framework-samples.html 2011-10-16 08:47:12 UTC (rev 545) @@ -12,7 +12,7 @@ secure and Free Open Source software downloads" /></a> <hr> <H1 align="center"> </h1> -Last update : pyscard 1.6.14 (January 2011) +Last update : pyscard 1.6.14 (October 2011) <p> <a href="pyscard-usersguide.html">pyscard</a> is a python module adding smart cards support to <a href="http://www.python.org">python</a>. <p>It consists of <a Modified: trunk/pyscard/src/smartcard/doc/index.html =================================================================== --- trunk/pyscard/src/smartcard/doc/index.html 2011-10-12 13:34:56 UTC (rev 544) +++ trunk/pyscard/src/smartcard/doc/index.html 2011-10-16 08:47:12 UTC (rev 545) @@ -14,7 +14,7 @@ alt="Get pyscard at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> </h1> <hr> - Last update : pyscard 1.6.14 (January 2011) + Last update : pyscard 1.6.14 (October 2011) <p> <a href="pyscard-usersguide.html">pyscard - python smart card library</a> is a python module adding smart cards support to <a href="http://www.python.org">python.</a> Modified: trunk/pyscard/src/smartcard/doc/scard-samples.html =================================================================== --- trunk/pyscard/src/smartcard/doc/scard-samples.html 2011-10-12 13:34:56 UTC (rev 544) +++ trunk/pyscard/src/smartcard/doc/scard-samples.html 2011-10-16 08:47:12 UTC (rev 545) @@ -12,7 +12,7 @@ secure and Free Open Source software downloads" /></a> <hr> <H1 align="center"> </h1> -Last update : pyscard 1.6.14 (January 2011) +Last update : pyscard 1.6.14 (October 2011) <p>Using the <a href="epydoc/index.html">smartcard framework</a> is the preferred way to write python smart card application. You can however use the <a href="epydoc/smartcard.scard.scard-module.html">smartcard.scard</a> library to write your python smart card application if you want to write your This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-10-12 13:35:02
|
Revision: 544 http://pyscard.svn.sourceforge.net/pyscard/?rev=544&view=rev Author: ludov Date: 2011-10-12 13:34:56 +0000 (Wed, 12 Oct 2011) Log Message: ----------- Add PCSCv2_PART10_PROPERTY_bPPDUSupport Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2011-10-12 13:33:28 UTC (rev 543) +++ trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2011-10-12 13:34:56 UTC (rev 544) @@ -87,7 +87,8 @@ "PCSCv2_PART10_PROPERTY_wLcdMaxLines": PCSCv2_PART10_PROPERTY_wLcdMaxLines, "PCSCv2_PART10_PROPERTY_bMinPINSize": PCSCv2_PART10_PROPERTY_bMinPINSize, "PCSCv2_PART10_PROPERTY_bMaxPINSize": PCSCv2_PART10_PROPERTY_bMaxPINSize, -"PCSCv2_PART10_PROPERTY_sFirmwareID": PCSCv2_PART10_PROPERTY_sFirmwareID} +"PCSCv2_PART10_PROPERTY_sFirmwareID": PCSCv2_PART10_PROPERTY_sFirmwareID, +"PCSCv2_PART10_PROPERTY_bPPDUSupport": PCSCv2_PART10_PROPERTY_bPPDUSupport} # we already have: Features['FEATURE_x'] = FEATURE_x # we will now also have: Features[FEATURE_x] = 'FEATURE_x' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-10-12 13:33:37
|
Revision: 543 http://pyscard.svn.sourceforge.net/pyscard/?rev=543&view=rev Author: ludov Date: 2011-10-12 13:33:28 +0000 (Wed, 12 Oct 2011) Log Message: ----------- getTlvProperties(): do not fail if a property tag is not yet known The property name will just be UNKNOWN in that case. If more than one property is unknown then a collision on UNKNOWN will occur and information will be lost. Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2011-09-03 21:35:27 UTC (rev 542) +++ trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2011-10-12 13:33:28 UTC (rev 543) @@ -204,7 +204,10 @@ data = ((data[3] * 256 + data[2]) * 256 + data[1]) * 256 + data[0] # store the value in the dictionnary - d[Properties[tag]] = data + try: + d[Properties[tag]] = data + except KeyError: + d["UNKNOWN"] = data del tmp[0:2 + len] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-09-03 21:35:33
|
Revision: 542 http://pyscard.svn.sourceforge.net/pyscard/?rev=542&view=rev Author: ludov Date: 2011-09-03 21:35:27 +0000 (Sat, 03 Sep 2011) Log Message: ----------- doControl() and doGetAttrib() new return an exception of more general type smartcard.Exceptions.SmartcardException instead of smartcard.Exceptions.CardConnectionException Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py 2011-09-03 21:28:22 UTC (rev 541) +++ trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py 2011-09-03 21:35:27 UTC (rev 542) @@ -23,7 +23,8 @@ """ from smartcard.CardConnection import CardConnection -from smartcard.Exceptions import CardConnectionException, NoCardException +from smartcard.Exceptions import (CardConnectionException, + NoCardException, SmartcardException) from smartcard.Observer import Observable from smartcard.scard import * @@ -192,7 +193,7 @@ CardConnection.doControl(self, controlCode, bytes) hresult, response = SCardControl(self.hcard, controlCode, bytes) if hresult != 0: - raise CardConnectionException('Failed to control ' + SCardGetErrorMessage(hresult)) + raise SmartcardException('Failed to control ' + SCardGetErrorMessage(hresult)) data = map(lambda x: (x + 256) % 256, response) return data @@ -207,7 +208,7 @@ CardConnection.doGetAttrib(self, attribId) hresult, response = SCardGetAttrib(self.hcard, attribId) if hresult != 0: - raise CardConnectionException('Failed to getAttrib ' + SCardGetErrorMessage(hresult)) + raise SmartcardException('Failed to getAttrib ' + SCardGetErrorMessage(hresult)) return response This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-09-03 21:28:28
|
Revision: 541 http://pyscard.svn.sourceforge.net/pyscard/?rev=541&view=rev Author: ludov Date: 2011-09-03 21:28:22 +0000 (Sat, 03 Sep 2011) Log Message: ----------- Add CardConnection.getAttrib() method Sample code: card_connection = readers()[0].createConnection() card_connection.connect(mode=SCARD_SHARE_DIRECT, disposition=SCARD_LEAVE_CARD) vendor_name = card_connection.getAttrib(SCARD_ATTR_VENDOR_NAME) Modified Paths: -------------- trunk/pyscard/src/smartcard/CardConnection.py trunk/pyscard/src/smartcard/CardConnectionDecorator.py trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py Modified: trunk/pyscard/src/smartcard/CardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/CardConnection.py 2011-09-03 16:44:37 UTC (rev 540) +++ trunk/pyscard/src/smartcard/CardConnection.py 2011-09-03 21:28:22 UTC (rev 541) @@ -174,3 +174,21 @@ Subclasses must override this method for implementing control.""" pass + + def getAttrib(self, attribId): + """return the requested attribute + + attribId: attribute id like SCARD_ATTR_VENDOR_NAME + """ + Observable.setChanged(self) + Observable.notifyObservers(self, CardConnectionEvent('attrib', [attribId])) + data = self.doGetAttrib(attribId) + if None != self.errorcheckingchain: + self.errorcheckingchain[0](data) + return data + + def doGetAttrib(self, attribId): + """Performs the command get attrib. + + Subclasses must override this method for implementing get attrib.""" + pass Modified: trunk/pyscard/src/smartcard/CardConnectionDecorator.py =================================================================== --- trunk/pyscard/src/smartcard/CardConnectionDecorator.py 2011-09-03 16:44:37 UTC (rev 540) +++ trunk/pyscard/src/smartcard/CardConnectionDecorator.py 2011-09-03 21:28:22 UTC (rev 541) @@ -84,3 +84,7 @@ def control(self, controlCode, bytes=[]): """call inner component control""" return self.component.control(controlCode, bytes) + + def getAttrib(self, attribId): + """call inner component getAttrib""" + return self.component.getAttrib(attribId) Modified: trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py 2011-09-03 16:44:37 UTC (rev 540) +++ trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py 2011-09-03 21:28:22 UTC (rev 541) @@ -197,6 +197,20 @@ data = map(lambda x: (x + 256) % 256, response) return data + def doGetAttrib(self, attribId): + """get an attribute + + attribId: Identifier for the attribute to get + + return: response are the attribute byte array + """ + CardConnection.doGetAttrib(self, attribId) + hresult, response = SCardGetAttrib(self.hcard, attribId) + if hresult != 0: + raise CardConnectionException('Failed to getAttrib ' + SCardGetErrorMessage(hresult)) + return response + + if __name__ == '__main__': """Small sample illustrating the use of CardConnection.""" SELECT = [0xA0, 0xA4, 0x00, 0x00, 0x02] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-09-03 16:44:43
|
Revision: 540 http://pyscard.svn.sourceforge.net/pyscard/?rev=540&view=rev Author: ludov Date: 2011-09-03 16:44:37 +0000 (Sat, 03 Sep 2011) Log Message: ----------- Add support of Mac OS X Lion (10.7) The PC/SC layer in Lion is the same as in Snow Leopard with some bugs removed. See http://ludovicrousseau.blogspot.com/2011/08/mac-os-x-lion-and-smart-cards-status.html Modified Paths: -------------- trunk/pyscard/src/setup.py Modified: trunk/pyscard/src/setup.py =================================================================== --- trunk/pyscard/src/setup.py 2011-08-09 08:10:27 UTC (rev 539) +++ trunk/pyscard/src/setup.py 2011-09-03 16:44:37 UTC (rev 540) @@ -71,7 +71,10 @@ # Mac OS X Snow Leopard, python 2.6 # PowerPC is no more supported, x86_64 is new # -elif 'macosx-10.6' in get_platform(): +# Mac OS X Lion, python 2.7 +# x86_64 and i386 +# +elif 'macosx-10.6' in get_platform() or 'macosx-10.7' in get_platform(): platform__cc_defines = [('PCSCLITE', '1'), ('__APPLE__', '1'), ('__LEOPARD__', '1')] platform_swig_opts = ['-DPCSCLITE', '-D__APPLE__', '-D__LEOPARD__'] platform_sources = [] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-08-09 08:10:33
|
Revision: 539 http://pyscard.svn.sourceforge.net/pyscard/?rev=539&view=rev Author: ludov Date: 2011-08-09 08:10:27 +0000 (Tue, 09 Aug 2011) Log Message: ----------- Define SCARD_STATE_UNPOWERED also on Windows to allow portable & cross-platform code Modified Paths: -------------- trunk/pyscard/src/smartcard/scard/PcscDefs.i Modified: trunk/pyscard/src/smartcard/scard/PcscDefs.i =================================================================== --- trunk/pyscard/src/smartcard/scard/PcscDefs.i 2011-07-01 13:32:23 UTC (rev 538) +++ trunk/pyscard/src/smartcard/scard/PcscDefs.i 2011-08-09 08:10:27 UTC (rev 539) @@ -56,16 +56,8 @@ SCARD_STATE_MUTE } StateType ; -#ifdef PCSCLITE - #ifdef __APPLE__ - %constant unsigned long SCARD_STATE_UNPOWERED = 0x0400 ; - #else // __APPLE__ - typedef enum - { - SCARD_STATE_UNPOWERED - } nonAppleStateType ; - #endif //!__APPLE_ -#endif //PCSCLITE +// SCARD_STATE_UNPOWERED is not defined on Windows and old Mac OS X +%constant unsigned long SCARD_STATE_UNPOWERED = 0x0400 ; // protocols #ifdef WIN32 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: jean d. a. <jda...@gm...> - 2011-07-15 14:52:29
|
Hi Pete, first of all thanks for using pyscard. Your patch for addition of hash methods is definitely worthwile. I will add it to the next relase 1.6.14 due hopefully next week, and will credit you in the change log. best regards, -jda On Fri, Jul 15, 2011 at 12:31 AM, Hans-Peter Jansen <hp...@ur...> wrote: > Dear Jean-Daniel, > > I discovered and started to use pyscard a few days ago, and I'm > impressed about the mile age, I archived already. Thanks for all your > effort. > > While baking a PyQt GUI for reading and storing driver cards, I found it > useful to be able to use reader and card objects as keys in dicts, sets > and the like, but unfortunately, this is not working correctly due to > missing __hash__ methods. > > Since Reader.name is unique for a given reader, as is Card.__str__(), > I've added these methods accordingly. Now, you're able to organize the > reader/card relationship in a dict with the reader objects as keys, and > the card objects as set values. > > What do you think? > > Applying the supplied patch to the project would be greatly appreciated. > > BTW, more or less current builds of your project (NOTE: with this patch > applied already) are available for certain openSUSE flavors here: > > > https://build.opensuse.org/project/monitor?project=home%3Afrispete%3Achipcard > > Thanks, > Pete > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Pyscard-devel mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pyscard-devel > > |
From: Hans-Peter J. <hp...@ur...> - 2011-07-14 22:31:34
|
Dear Jean-Daniel, I discovered and started to use pyscard a few days ago, and I'm impressed about the mile age, I archived already. Thanks for all your effort. While baking a PyQt GUI for reading and storing driver cards, I found it useful to be able to use reader and card objects as keys in dicts, sets and the like, but unfortunately, this is not working correctly due to missing __hash__ methods. Since Reader.name is unique for a given reader, as is Card.__str__(), I've added these methods accordingly. Now, you're able to organize the reader/card relationship in a dict with the reader objects as keys, and the card objects as set values. What do you think? Applying the supplied patch to the project would be greatly appreciated. BTW, more or less current builds of your project (NOTE: with this patch applied already) are available for certain openSUSE flavors here: https://build.opensuse.org/project/monitor?project=home%3Afrispete%3Achipcard Thanks, Pete |
From: <lu...@us...> - 2011-07-01 13:32:30
|
Revision: 538 http://pyscard.svn.sourceforge.net/pyscard/?rev=538&view=rev Author: ludov Date: 2011-07-01 13:32:23 +0000 (Fri, 01 Jul 2011) Log Message: ----------- Fix PEP8 warnings Modified Paths: -------------- trunk/pyscard/src/smartcard/pyro/server/PyroEventServer.py trunk/pyscard/src/smartcard/pyro/server/PyroNameServer.py trunk/pyscard/src/smartcard/pyro/server/RemoteCardConnection.py trunk/pyscard/src/smartcard/pyro/server/RemoteReaderServer.py Modified: trunk/pyscard/src/smartcard/pyro/server/PyroEventServer.py =================================================================== --- trunk/pyscard/src/smartcard/pyro/server/PyroEventServer.py 2011-07-01 13:23:46 UTC (rev 537) +++ trunk/pyscard/src/smartcard/pyro/server/PyroEventServer.py 2011-07-01 13:32:23 UTC (rev 538) @@ -32,40 +32,42 @@ import Pyro.nsc import Pyro.util + class PyroEventServer(Thread): """Thread running the Pyro Event server. """ - def __init__(self,args=[]): + def __init__(self, args=[]): """Initialize pyro event server with command line arguments. For a complete list of command line arguments, see pyro documentation for pyro-es start script.""" - Thread.__init__( self ) - self.setDaemon( True ) - self.setName( 'smartcard.pyro.server.PyroEventServer' ) + Thread.__init__(self) + self.setDaemon(True) + self.setName('smartcard.pyro.server.PyroEventServer') self.args = args - self.handler = signal.signal( signal.SIGINT, self ) + self.handler = signal.signal(signal.SIGINT, self) self.starter = None def run(self): - """Starts Pyro naming server with command line arguments (see pyro documentation) - """ - args=[] - for arg in self.args: args.append(arg) + """Starts Pyro naming server with command line arguments (see + pyro documentation) """ + args = [] + for arg in self.args: + args.append(arg) Args = Pyro.util.ArgParser() - Args.parse(args,'hkmrvxn:p:b:c:d:s:i:1:2:') + Args.parse(args, 'hkmrvxn:p:b:c:d:s:i:1:2:') - hostname = Args.getOpt('n',None) - identification = Args.getOpt('i',None) + hostname = Args.getOpt('n', None) + identification = Args.getOpt('i', None) port = None useNameServer = True if port: - port=int(port) - norange = (port==0) + port = int(port) + norange = (port == 0) self.starter = Pyro.EventService.Server.EventServiceStarter(identification=identification) - self.starter.start(hostname,port,useNameServer=useNameServer,norange=norange) + self.starter.start(hostname, port, useNameServer=useNameServer, norange=norange) def stop(self): """Shutdown pyro event server.""" @@ -75,7 +77,7 @@ """wait until name server is started.""" started = False while not started: - if self.starter!=None: + if self.starter != None: started = self.starter.waitUntilStarted(0.5) def __call__(self, signame, sf): @@ -84,7 +86,7 @@ print 'PyroEventServer Ctrl+C handler' self.stop() time.sleep(1) - self.handler( signame, sf ) + self.handler(signame, sf) if __name__ == '__main__': @@ -99,5 +101,3 @@ pn.listall() pe.stop() pn.stop() - - Modified: trunk/pyscard/src/smartcard/pyro/server/PyroNameServer.py =================================================================== --- trunk/pyscard/src/smartcard/pyro/server/PyroNameServer.py 2011-07-01 13:23:46 UTC (rev 537) +++ trunk/pyscard/src/smartcard/pyro/server/PyroNameServer.py 2011-07-01 13:32:23 UTC (rev 538) @@ -31,62 +31,69 @@ import Pyro.nsc import Pyro.util + class PyroNameServer(Thread): """Thread running the Pyro Name server. """ - def __init__(self,args=[]): + def __init__(self, args=[]): """Initialize pyro name server with command line arguments. For a complete list of command line arguments, see pyro documentation for pyro-ns start script.""" - Thread.__init__( self ) - self.setDaemon( True ) - self.setName( 'smartcard.pyro.server.PyroNameServer' ) + Thread.__init__(self) + self.setDaemon(True) + self.setName('smartcard.pyro.server.PyroNameServer') self.args = args - self.handler = signal.signal( signal.SIGINT, self ) + self.handler = signal.signal(signal.SIGINT, self) - _args=[] - for arg in self.args: _args.append(arg) + _args = [] + for arg in self.args: + _args.append(arg) Args = Pyro.util.ArgParser() - Args.parse(_args,'hkmrvxn:p:b:c:d:s:i:1:2:') - self.host = Args.getOpt('n',None) - self.bcport = Args.getOpt('b',None) - self.bcaddr = Args.getOpt('c',None) - self.identification = Args.getOpt('i',None) + Args.parse(_args, 'hkmrvxn:p:b:c:d:s:i:1:2:') + self.host = Args.getOpt('n', None) + self.bcport = Args.getOpt('b', None) + self.bcaddr = Args.getOpt('c', None) + self.identification = Args.getOpt('i', None) def getShutdownArgs(self): """return command line arguments for shutting down the server; this command line is built from the name server startup arguments.""" shutdownArgs = [] - if self.host: shutdownArgs += [ '-h', self.host ] - if self.bcport: shutdownArgs += [ '-p', self.bcport ] - if self.bcaddr: shutdownArgs += [ '-c', self.bcaddr ] - if self.identification: shutdownArgs += [ '-i', self.identification ] + if self.host: + shutdownArgs += ['-h', self.host] + if self.bcport: + shutdownArgs += ['-p', self.bcport] + if self.bcaddr: + shutdownArgs += ['-c', self.bcaddr] + if self.identification: + shutdownArgs += ['-i', self.identification] return shutdownArgs def listall(self): """List pyro namespace.""" args = self.getShutdownArgs() + ['listall'] - Pyro.nsc.main( args ) + Pyro.nsc.main(args) def ping(self): """Ping pyro naming server.""" args = self.getShutdownArgs() + ['ping'] - Pyro.nsc.main( args ) + Pyro.nsc.main(args) def run(self): """Starts Pyro naming server with command line arguments (see pyro documentation) """ - args=[] - for arg in self.args: args.append(arg) - Pyro.naming.main( args ) + args = [] + for arg in self.args: + args.append(arg) + Pyro.naming.main(args) def stop(self): """Shutdown pyro naming server.""" args = self.getShutdownArgs() + ['shutdown'] - Pyro.nsc.main( args ) + Pyro.nsc.main(args) self.join() def waitStarted(self): @@ -95,7 +102,7 @@ while not ns: try: time.sleep(3) - ns=Pyro.naming.NameServerLocator(identification=self.identification).getNS() + ns = Pyro.naming.NameServerLocator(identification=self.identification).getNS() except Pyro.errors.NamingError as er: pass @@ -105,14 +112,12 @@ print 'PyroNameServer Ctrl+C handler' self.stop() time.sleep(1) - self.handler( signame, sf ) + self.handler(signame, sf) if __name__ == '__main__': import sys - pt = PyroNameServer( sys.argv[1:] ) + pt = PyroNameServer(sys.argv[1:]) pt.start() pt.waitStarted() pt.stop() - - Modified: trunk/pyscard/src/smartcard/pyro/server/RemoteCardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/pyro/server/RemoteCardConnection.py 2011-07-01 13:23:46 UTC (rev 537) +++ trunk/pyscard/src/smartcard/pyro/server/RemoteCardConnection.py 2011-07-01 13:32:23 UTC (rev 538) @@ -31,14 +31,15 @@ from smartcard.Exceptions import CardConnectionException, NoCardException from smartcard.Observer import Observable -class RemoteCardConnection(CardConnectionDecorator,Pyro.core.ObjBase): - """Remote connection class. Handles connection with a card inserted inside a remote PC.""" +class RemoteCardConnection(CardConnectionDecorator, Pyro.core.ObjBase): + """Remote connection class. Handles connection with a card inserted + inside a remote PC.""" + def __init__(self, cardConnectionComponent): """Construct a new remote card connection. connection: the reader connection """ Pyro.core.ObjBase.__init__(self) - CardConnectionDecorator.__init__( self, cardConnectionComponent ) - + CardConnectionDecorator.__init__(self, cardConnectionComponent) Modified: trunk/pyscard/src/smartcard/pyro/server/RemoteReaderServer.py =================================================================== --- trunk/pyscard/src/smartcard/pyro/server/RemoteReaderServer.py 2011-07-01 13:23:46 UTC (rev 537) +++ trunk/pyscard/src/smartcard/pyro/server/RemoteReaderServer.py 2011-07-01 13:32:23 UTC (rev 538) @@ -1,4 +1,4 @@ -"""RemoteReaderServer: monitor local readers and publish them as pyro +"""RemoteReaderServer: monitor local readers and publish them as pyro Remote Readers. __author__ = "gemalto http://www.gemalto.com" @@ -41,10 +41,11 @@ from smartcard.pyro.server import PyroDaemon from smartcard.pyro.server import PyroNameServer -class RemoteReader(Reader,Pyro.core.ObjBase): + +class RemoteReader(Reader, Pyro.core.ObjBase): """Remote reader class that embeds a local reader.""" - def __init__(self,reader): + def __init__(self, reader): """Encapsulate a local reader and publish as a pyro remote reader. reader: the local reader to publish remotely @@ -53,23 +54,22 @@ self.readerobj = reader self.name = reader.name - def addtoreadergroup( self, groupname ): + def addtoreadergroup(self, groupname): """Add reader to a reader group.""" - self.readerobj.reader.addtoreadergroup( groupname ) + self.readerobj.reader.addtoreadergroup(groupname) - def removefromreadergroup( self, groupname ): + def removefromreadergroup(self, groupname): """Remove a reader from a reader group""" - self.readerobj.reader.removefromreadergroup( groupname ) + self.readerobj.reader.removefromreadergroup(groupname) - def createConnection( self ): + def createConnection(self): """Return a card connection thru the reader.""" - connection = RemoteCardConnection( self.readerobj.createConnection() ) + connection = RemoteCardConnection(self.readerobj.createConnection()) daemon = PyroDaemon.PyroDaemon() uri = daemon.connect(connection) return uri - class RemoteReaderServer(ReaderObserver): """Monitor local readers, and publish them as remote pyro readers. """ @@ -78,9 +78,9 @@ self.pn = PyroNameServer.PyroNameServer() self.pn.start() self.pn.waitStarted() - + Pyro.core.initServer() - self.ns=Pyro.naming.NameServerLocator().getNS() + self.ns = Pyro.naming.NameServerLocator().getNS() try: self.ns.createGroup(':pyscard') self.ns.createGroup(':pyscard.smartcard') @@ -93,7 +93,6 @@ def start(self): """Start pyro daemon and accept incoming requests.""" self.daemon.start() - def update(self, observable, (addedreaders, removedreaders)): """Called when a local reader is added or removed. @@ -103,8 +102,8 @@ remotereader = RemoteReader(reader) self.remotereaders[reader.name] = remotereader name = "".join(reader.name.split(' ')) - name = ":pyscard.smartcard.readers."+"".join(name.split('.')) - uri = self.daemon.connect(remotereader,name) + name = ":pyscard.smartcard.readers." + "".join(name.split('.')) + uri = self.daemon.connect(remotereader, name) for reader in removedreaders: remotereader = self.remotereaders[reader.name] self.daemon.disconnect(remotereader) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-07-01 13:23:52
|
Revision: 537 http://pyscard.svn.sourceforge.net/pyscard/?rev=537&view=rev Author: ludov Date: 2011-07-01 13:23:46 +0000 (Fri, 01 Jul 2011) Log Message: ----------- Fix PEP8 warnings PyroDaemon.py:32:1: E302 expected 2 blank lines, found 1 PyroDaemon.py:43:42: E201 whitespace after '(' PyroDaemon.py:44:15: E225 missing whitespace around operator PyroDaemon.py:53:26: E201 whitespace after '(' PyroDaemon.py:55:25: E231 missing whitespace after ',' PyroDaemon.py:56:46: E231 missing whitespace after ',' PyroDaemon.py:58:28: E231 missing whitespace after ',' PyroDaemon.py:72:21: E201 whitespace after '(' PyroDaemon.py:73:24: E201 whitespace after '(' PyroDaemon.py:75:1: E302 expected 2 blank lines, found 1 PyroDaemon.py:83:25: E201 whitespace after '(' PyroDaemon.py:84:24: E201 whitespace after '(' PyroDaemon.py:85:22: E201 whitespace after '(' PyroDaemon.py:92:1: W391 blank line at end of file Modified Paths: -------------- trunk/pyscard/src/smartcard/pyro/server/PyroDaemon.py Modified: trunk/pyscard/src/smartcard/pyro/server/PyroDaemon.py =================================================================== --- trunk/pyscard/src/smartcard/pyro/server/PyroDaemon.py 2011-07-01 13:21:44 UTC (rev 536) +++ trunk/pyscard/src/smartcard/pyro/server/PyroDaemon.py 2011-07-01 13:23:46 UTC (rev 537) @@ -29,6 +29,7 @@ import Pyro.core import Pyro.naming + class PyroDaemon: """Singleton class to wrap the pyro daemon.""" @@ -40,8 +41,8 @@ """ def __init__(self): self.daemon = Pyro.core.Daemon() - self.handler = signal.signal( signal.SIGINT, self ) - ns=Pyro.naming.NameServerLocator().getNS() + self.handler = signal.signal(signal.SIGINT, self) + ns = Pyro.naming.NameServerLocator().getNS() self.daemon.useNameServer(ns) def __call__(self, signame, sf): @@ -50,12 +51,12 @@ print 'PyroDaemon Ctrl+C handler' self.daemon.shutdown(True) time.sleep(1) - self.handler( signame, sf ) + self.handler(signame, sf) - def connect(self,object,name=None): - return self.daemon.connect(object,name) + def connect(self, object, name=None): + return self.daemon.connect(object, name) - def disconnect(self,object): + def disconnect(self, object): return self.daemon.disconnect(object) def start(self): @@ -69,9 +70,10 @@ if not PyroDaemon.instance: PyroDaemon.instance = PyroDaemon._PyroDaemon() - def __getattr__( self, name ): - return getattr( self.instance, name ) + def __getattr__(self, name): + return getattr(self.instance, name) + class PyroDaemonThread(Thread): """Thread running the Pyro daemon server. """ @@ -80,13 +82,11 @@ """Initialize pyro event server with command line arguments. For a complete list of command line arguments, see pyro documentation for pyro-es start script.""" - Thread.__init__( self ) - self.setDaemon( True ) - self.setName( 'smartcard.pyro.server.PyroDaemonThread' ) + Thread.__init__(self) + self.setDaemon(True) + self.setName('smartcard.pyro.server.PyroDaemonThread') self.daemon = PyroDaemon() def run(self): """Starts Pyro daemon.""" self.daemon.start() - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-07-01 13:21:50
|
Revision: 536 http://pyscard.svn.sourceforge.net/pyscard/?rev=536&view=rev Author: ludov Date: 2011-07-01 13:21:44 +0000 (Fri, 01 Jul 2011) Log Message: ----------- Fix PEP8 warnings E201 whitespace after '(' E501 line too long (83 characters) E225 missing whitespace around operator E231 missing whitespace after ',' W391 blank line at end of file Modified Paths: -------------- trunk/pyscard/src/smartcard/pyro/PyroReader.py Modified: trunk/pyscard/src/smartcard/pyro/PyroReader.py =================================================================== --- trunk/pyscard/src/smartcard/pyro/PyroReader.py 2011-07-01 13:17:14 UTC (rev 535) +++ trunk/pyscard/src/smartcard/pyro/PyroReader.py 2011-07-01 13:21:44 UTC (rev 536) @@ -29,44 +29,46 @@ from smartcard.reader.Reader import Reader from smartcard.reader.ReaderFactory import ReaderFactory + class PyroReader(Reader): """Remote reader class.""" - def __init__( self, readername ): - """Constructs a new Remote Reader client implementation from a Pyro URI.""" - ns=Pyro.naming.NameServerLocator().getNS() - self.uri = ns.resolve(':pyscard.smartcard.readers.'+readername) + def __init__(self, readername): + """Constructs a new Remote Reader client implementation from a + Pyro URI.""" + ns = Pyro.naming.NameServerLocator().getNS() + self.uri = ns.resolve(':pyscard.smartcard.readers.' + readername) self.reader = Pyro.core.getAttrProxyForURI(self.uri) self.name = self.reader.name - def addtoreadergroup( self, groupname ): + def addtoreadergroup(self, groupname): """Add reader to a reader group.""" - self.reader.addtoreadergroup( groupname ) + self.reader.addtoreadergroup(groupname) - def removefromreadergroup( self, groupname ): + def removefromreadergroup(self, groupname): """Remove a reader from a reader group""" - self.reader.removefromreadergroup( groupname ) + self.reader.removefromreadergroup(groupname) - def createConnection( self ): + def createConnection(self): """Return a card connection thru a remote reader.""" uri = self.reader.createConnection() return Pyro.core.getAttrProxyForURI(uri) class Factory: def create(readername): - return PyroReader( readername ) + return PyroReader(readername) create = staticmethod(create) def readers(groups=[]): readernames = [] try: - ns=Pyro.naming.NameServerLocator().getNS() + ns = Pyro.naming.NameServerLocator().getNS() readernames = ns.list(':pyscard.smartcard.readers') except Pyro.errors.NamingError: print 'Warning: pyro name server not found' - remotereaders=[] + remotereaders = [] for readername in readernames: - remotereaders.append( PyroReader.Factory.create(readername[0]) ) + remotereaders.append(PyroReader.Factory.create(readername[0])) return remotereaders readers = staticmethod(readers) @@ -82,9 +84,8 @@ print reader.name, ', uri: ', reader.uri connection = reader.createConnection() connection.connect() - print toHexString( connection.getATR() ) + print toHexString(connection.getATR()) data, sw1, sw2 = connection.transmit(SELECT + DF_TELECOM) print "%X %X" % (sw1, sw2) - except NoCardException,x: + except NoCardException, x: print 'no card in reader' - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-07-01 13:17:20
|
Revision: 535 http://pyscard.svn.sourceforge.net/pyscard/?rev=535&view=rev Author: ludov Date: 2011-07-01 13:17:14 +0000 (Fri, 01 Jul 2011) Log Message: ----------- PEP8: E303 too many blank lines (2) Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py 2011-07-01 13:15:52 UTC (rev 534) +++ trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py 2011-07-01 13:17:14 UTC (rev 535) @@ -106,7 +106,6 @@ AbstractCardRequest.waitforcard(self) cardfound = False - # for non infinite timeout, a timer will signal the end of the time-out by setting the evt event evt = threading.Event() if INFINITE == self.timeout: @@ -212,7 +211,6 @@ readername, eventstate, atr = state r, oldstate = readerstates[readername] - # the status can change on a card already inserted, e.g. # unpowered, in use, ... # if a new card is requested, clear the state changed bit if @@ -279,7 +277,6 @@ hresult = 0 newstates = [] - # time-out if SCARD_E_TIMEOUT == hresult: if evt.isSet(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-07-01 13:15:58
|
Revision: 534 http://pyscard.svn.sourceforge.net/pyscard/?rev=534&view=rev Author: ludov Date: 2011-07-01 13:15:52 +0000 (Fri, 01 Jul 2011) Log Message: ----------- PEP8: E303 too many blank lines (2) Modified Paths: -------------- trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py Modified: trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py 2011-07-01 13:14:47 UTC (rev 533) +++ trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py 2011-07-01 13:15:52 UTC (rev 534) @@ -44,7 +44,6 @@ cardrequest = CardRequest(timeout=10, cardType=cardtype) cardservice = cardrequest.waitforcard() - # attach the console tracer observer = ConsoleCardConnectionObserver() cardservice.connection.addObserver(observer) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-07-01 13:14:53
|
Revision: 533 http://pyscard.svn.sourceforge.net/pyscard/?rev=533&view=rev Author: ludov Date: 2011-07-01 13:14:47 +0000 (Fri, 01 Jul 2011) Log Message: ----------- PEP8: E202 whitespace before ']' Modified Paths: -------------- trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py 2011-07-01 13:13:35 UTC (rev 532) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py 2011-07-01 13:14:47 UTC (rev 533) @@ -73,8 +73,7 @@ 0x00, 0x00, 0x00, # bTeoPrologue 13, 0, 0, 0, # ulDataLength 0x00, 0x20, 0x00, 0x00, 0x08, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30 # abData - ] + 0x30, 0x30, 0x30] # abData hresult, response = SCardControl(hcard, control, command) if hresult != SCARD_S_SUCCESS: raise BaseSCardException(hresult) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-07-01 13:13:41
|
Revision: 532 http://pyscard.svn.sourceforge.net/pyscard/?rev=532&view=rev Author: ludov Date: 2011-07-01 13:13:35 +0000 (Fri, 01 Jul 2011) Log Message: ----------- PEP8: E303 too many blank lines (2) Modified Paths: -------------- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py 2011-07-01 13:12:23 UTC (rev 531) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py 2011-07-01 13:13:35 UTC (rev 532) @@ -69,7 +69,6 @@ print 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' - finally: hresult = SCardReleaseContext(hcontext) if hresult != SCARD_S_SUCCESS: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-07-01 13:12:29
|
Revision: 531 http://pyscard.svn.sourceforge.net/pyscard/?rev=531&view=rev Author: ludov Date: 2011-07-01 13:12:23 +0000 (Fri, 01 Jul 2011) Log Message: ----------- PEP8: E303 too many blank lines (2) Modified Paths: -------------- trunk/pyscard/src/smartcard/ulist.py Modified: trunk/pyscard/src/smartcard/ulist.py =================================================================== --- trunk/pyscard/src/smartcard/ulist.py 2011-07-01 13:10:44 UTC (rev 530) +++ trunk/pyscard/src/smartcard/ulist.py 2011-07-01 13:12:23 UTC (rev 531) @@ -89,7 +89,6 @@ else: other = list(_other) - # remove items already in self newother = [] for i in range(0, len(other)): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-07-01 13:10:51
|
Revision: 530 http://pyscard.svn.sourceforge.net/pyscard/?rev=530&view=rev Author: ludov Date: 2011-07-01 13:10:44 +0000 (Fri, 01 Jul 2011) Log Message: ----------- PEP8: E262 inline comment should start with '# ' Modified Paths: -------------- trunk/pyscard/src/setup.py Modified: trunk/pyscard/src/setup.py =================================================================== --- trunk/pyscard/src/setup.py 2011-04-26 16:51:13 UTC (rev 529) +++ trunk/pyscard/src/setup.py 2011-07-01 13:10:44 UTC (rev 530) @@ -98,8 +98,8 @@ platform_sources = [] platform_libraries = ["python%d.%d" % sys.version_info[:2]] platform_include_dirs = ['/usr/include/PCSC'] - platform_extra_compile_args = [] #['-ggdb', '-O0'] - platform_extra_link_args = [] #['-ggdb'] + platform_extra_compile_args = [] # ['-ggdb', '-O0'] + platform_extra_link_args = [] # ['-ggdb'] class _pyscardBuildExt(build_ext): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-04-26 16:51:19
|
Revision: 529 http://pyscard.svn.sourceforge.net/pyscard/?rev=529&view=rev Author: ludov Date: 2011-04-26 16:51:13 +0000 (Tue, 26 Apr 2011) Log Message: ----------- Correctly get the TCK (checksum) byte Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2011-04-23 15:02:33 UTC (rev 528) +++ trunk/contrib/parseATR/parseATR.py 2011-04-26 16:51:13 UTC (rev 529) @@ -123,7 +123,12 @@ # Store historical bytes atr["hb"] = atr_txt[pointer + 1: pointer + 1 + hb_length] + # Store TCK last = pointer + 1 + hb_length + if "TCK" in atr: + atr["TCK"] = atr_txt[last] + last += 1 + if len(atr_txt) > last: atr["extra"] = atr_txt[last:] @@ -135,10 +140,6 @@ (t1, t2) = ("", "is") raise ParseAtrException("ERROR! ATR is truncated: %d byte%s %s missing" % (missing, t1, t2)) - # Store TCK - if "TCK" in atr: - atr["TCK"] = atr_txt[-1] - return atr This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2011-04-23 15:02:40
|
Revision: 528 http://pyscard.svn.sourceforge.net/pyscard/?rev=528&view=rev Author: ludov Date: 2011-04-23 15:02:33 +0000 (Sat, 23 Apr 2011) Log Message: ----------- Reformat at 72 columns per line Modified Paths: -------------- trunk/pyscard/src/README Modified: trunk/pyscard/src/README =================================================================== --- trunk/pyscard/src/README 2011-04-17 16:53:20 UTC (rev 527) +++ trunk/pyscard/src/README 2011-04-23 15:02:33 UTC (rev 528) @@ -10,17 +10,18 @@ This file is part of pyscard. pyscard is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 2.1 of the License, or (at your option) any -later version. +the terms of the GNU Lesser General Public License as published by the +Free Software Foundation; either version 2.1 of the License, or (at your +option) any later version. -pyscard is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. +pyscard is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -You should have received a copy of the GNU Lesser General Public License along -with pyscard; if not, write to the Free Software Foundation, Inc., 51 -Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +You should have received a copy of the GNU Lesser General Public License +along with pyscard; if not, write to the Free Software Foundation, Inc., +51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ------------------------------------------------------------------------------- Last update : pyscard 1.6.14 (January 2011) @@ -28,27 +29,28 @@ pyscard is a python module adding smart cards support to python. -It consists of the smartcard.scard module, an extension module wrapping Windows -smart card base components (also known as PCSC) on Windows, and PCSC lite on -linux and Mac OS X Tiger, and of the smartcard module, a python framework with -objects wrapping PCSC API. +It consists of the smartcard.scard module, an extension module wrapping +Windows smart card base components (also known as PCSC) on Windows, and +PCSC lite on linux and Mac OS X Tiger, and of the smartcard module, a +python framework with objects wrapping PCSC API. ------------------------------------------------------------------------------- Documentation ------------------------------------------------------------------------------- -All documentation is provided in the smartcard/doc directory of the source -distribution. Examples are provided in the smartcard/Examples directory of the -source distribution. The binary distribution does not include any -documentation, tests scripts or examples. +All documentation is provided in the smartcard/doc directory of the +source distribution. Examples are provided in the smartcard/Examples +directory of the source distribution. The binary distribution does not +include any documentation, tests scripts or examples. ------------------------------------------------------------------------------- Installation ------------------------------------------------------------------------------- -The pyscard library is packaged using the standard distutils python module. +The pyscard library is packaged using the standard distutils python +module. Installation on windows ----------------------- @@ -59,8 +61,8 @@ 1. download the binary msi installer or self-executable installer 2. execute the installer -The binary msi installer and self-executable installer are packaged for a -specific version of python, and have name similar to +The binary msi installer and self-executable installer are packaged for +a specific version of python, and have name similar to pyscard-1.6.14.win32-py2.5.msi and pyscard-1.6.14.win32-py2.5.exe for python 2.5. @@ -70,10 +72,10 @@ 1. you will need swig 1.3.31 from http://www.swig.org, and a C compiler. -By default, Visual Studio 2003 is required for building the c language wrapper -for python 2.5, and Visual Studio .Net or VisualC++ 6 for python 2.4. You might -use another release by fiddling with the python/Lib/distutils/msvccompiler.py -file that detects the compiler. +By default, Visual Studio 2003 is required for building the c language +wrapper for python 2.5, and Visual Studio .Net or VisualC++ 6 for python +2.4. You might use another release by fiddling with the +python/Lib/distutils/msvccompiler.py file that detects the compiler. 2. download the source distribution @@ -99,8 +101,8 @@ 1. download the binary distribution The binary distribution is either an archive file or a rpm file, with -names similar to pyscard-1.6.14-1.i386.rpm for the rpm distribution, -or pyscard-1.6.14.linux-i686.tar.gz for the archive distribution. +names similar to pyscard-1.6.14-1.i386.rpm for the rpm distribution, or +pyscard-1.6.14.linux-i686.tar.gz for the archive distribution. 2. untar the binary distribution @@ -125,14 +127,15 @@ /usr/bin/python setup.py build_ext install This will build pyscard and install it in the site-packages directory of -your python distribution, e.g. /usr/lib/python2.4/site-packages/smartcard. +your python distribution, e.g. +/usr/lib/python2.4/site-packages/smartcard. Installation on Max OS X Tiger: -------------------------------- -The Mac OS X Tiger support is experimental on pyscard 1.6.14. It was developed -and tested on a i386 MacBook Pro. Please drop me a mail if you succeed on a -ppc MacBook. +The Mac OS X Tiger support is experimental on pyscard 1.6.14. It was +developed and tested on a i386 MacBook Pro. Please drop me a mail if you +succeed on a ppc MacBook. Installing on Mac OS X Tiger from the binary distribution: ---------------------------------------------------- @@ -140,20 +143,22 @@ 1. download the binary distribution The binary distribution is an archive file, with a name similar to -pyscard-1.6.14-py-2.3-macosx10.4.mpkg or pyscard-1.6.14-py-2.5-macosx10.4.mpkg. +pyscard-1.6.14-py-2.3-macosx10.4.mpkg or +pyscard-1.6.14-py-2.5-macosx10.4.mpkg. 2. Open the package and proceed with installation. -Python 2.3 is pre-installed, so install pyscard-1.6.14-py-2.3-macosx10.4.mpkg if -you did not install another release of python. +Python 2.3 is pre-installed, so install +pyscard-1.6.14-py-2.3-macosx10.4.mpkg if you did not install another +release of python. Install pyscard-1.6.14-py-2.5-macosx10.4.mpkg if you installed python 2.5. Installing on Mac OS X Tiger from the source distribution ---------------------------------------------------------- -1. you will need swig 1.3.31 (http://www.swig.org); gcc and pcsc-lite are available -out of the box on Max OS X Tiger +1. you will need swig 1.3.31 (http://www.swig.org); gcc and pcsc-lite +are available out of the box on Max OS X Tiger 2. download the source distribution @@ -166,16 +171,17 @@ sudo python setup.py build_ext install -This will build pyscard and install it in the site-packages directory of your python distribution, e.g. +This will build pyscard and install it in the site-packages directory of +your python distribution, e.g. /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib/site-packages/smartcard Installation on Max OS X Leopard: --------------------------------- -The Mac OS X Leopard support is experimental on pyscard 1.6.14. It was developed -and tested on a i386 MacBook Pro. Please drop me a mail if you succeed on a -ppc MacBook. +The Mac OS X Leopard support is experimental on pyscard 1.6.14. It was +developed and tested on a i386 MacBook Pro. Please drop me a mail if you +succeed on a ppc MacBook. Installing on Mac OS X Leopard from the binary distribution: ---------------------------------------------------- @@ -190,8 +196,8 @@ Installing on Mac OS X Leopard from the source distribution ------------------------------------------------------------ -1. you will need swig 1.3.31 (http://www.swig.org); gcc and pcsc-lite are available -out of the box on Max OS X Leopard +1. you will need swig 1.3.31 (http://www.swig.org); gcc and pcsc-lite +are available out of the box on Max OS X Leopard 2. download the source distribution @@ -204,18 +210,19 @@ sudo python setup.py build_ext install -This will build pyscard and install it in the site-packages directory of your python distribution, e.g. +This will build pyscard and install it in the site-packages directory of +your python distribution, e.g. /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.3/lib/site-packages/smartcard ------------------------------------------------------------------------------- Developer documentation, unit tests and examples ------------------------------------------------------------------------------- -The developer documentation is in the smartcard/doc directory of the source -distribution. +The developer documentation is in the smartcard/doc directory of the +source distribution. -Examples are located in the smartcard/Examples directory, and the pyunit unit -tests in the smartcard/test directory. +Examples are located in the smartcard/Examples directory, and the pyunit +unit tests in the smartcard/test directory. ------------------------------------------------------------------------------- Build instructions for packagers @@ -224,18 +231,18 @@ Building a binary distribution for Windows ------------------------------------------ -To build a binary distribution from the source distribution, you will need a C -compiler and swig 1.3.31 (same requirements as for installing from the source -distribution). +To build a binary distribution from the source distribution, you will +need a C compiler and swig 1.3.31 (same requirements as for installing +from the source distribution). -In the root directory of the source distribution, execute the following command -in a console: +In the root directory of the source distribution, execute the following +command in a console: setup.py build_ext bdist_msi setup.py build_ext bdist_wininst -This will build the msi installer and self-executable installer in the dist -directory, with names similar to pyscard-1.6.14.win32-py2.5.msi and +This will build the msi installer and self-executable installer in the +dist directory, with names similar to pyscard-1.6.14.win32-py2.5.msi and pyscard-1.6.14.win32-py2.5.exe for python 2.5, and pyscard-1.6.14.win32-py2.4.msi and pyscard-1.6.14.win32-py2.4.exe for python 2.4. @@ -243,9 +250,9 @@ Building a binary distribution for linux ---------------------------------------- -To build a binary distribution from the source distribution, you will need -gcc, swig 1.3.31 and pcsc-lite (same requirements as for installing from the -source distribution). +To build a binary distribution from the source distribution, you will +need gcc, swig 1.3.31 and pcsc-lite (same requirements as for installing +from the source distribution). In the root directory of the source distribution, execute the following command in a terminal: @@ -259,8 +266,8 @@ ---------------------------------------- To build a rpm distribution from the source distribution, you will need -gcc, swig 1.3.31 and pcsc-lite (same requirements as for installing from the -source distribution). +gcc, swig 1.3.31 and pcsc-lite (same requirements as for installing from +the source distribution). In the root directory of the source distribution, execute the following command in a terminal: @@ -279,14 +286,15 @@ Building a binary distribution for Mac OS X Tiger ------------------------------------------------- -To build a binary distribution from the source distribution, you will need -swig 1.3.31 (same requirements as for installing from the source distribution) -and bdist_mpkg 0.4.3 (http://cheeseshop.python.org/pypi/bdist_mpkg/). +To build a binary distribution from the source distribution, you will +need swig 1.3.31 (same requirements as for installing from the source +distribution) and bdist_mpkg 0.4.3 +(http://cheeseshop.python.org/pypi/bdist_mpkg/). -If you are using the pre-installed python 2.3 distribution, in the root directory -of the source distribution, i.e. in the src directory, execute the following commands -in a terminal: +If you are using the pre-installed python 2.3 distribution, in the root +directory of the source distribution, i.e. in the src directory, execute +the following commands in a terminal: python setup.py build_ext /System/Library/Frameworks/Python.Framework/Versions/2.3/bin/bdist_mpkg setup.py @@ -305,9 +313,10 @@ Building a binary distribution for Mac OS X Leopard --------------------------------------------------- -To build a binary distribution from the source distribution, you will need -swig 1.3.31 (same requirements as for installing from the source distribution) -and bdist_mpkg 0.4.3 (http://cheeseshop.python.org/pypi/bdist_mpkg/). +To build a binary distribution from the source distribution, you will +need swig 1.3.31 (same requirements as for installing from the source +distribution) and bdist_mpkg 0.4.3 +(http://cheeseshop.python.org/pypi/bdist_mpkg/). Apply the following patch to tools.py of bdist_mpkg package: @@ -336,14 +345,16 @@ + raise ValueError('group %s not found' % (name,)) ===== patch end ======== -This patch is required since Mac OS X Leopard does not have the nidump command any more. +This patch is required since Mac OS X Leopard does not have the nidump +command any more. -Install bdist_mpkg by executing the bdist_mpkg setup.py script with build and -install as arguments, i.e. from the root directory of the bdist_mpkg -source distribution enter: python setup.py build install. +Install bdist_mpkg by executing the bdist_mpkg setup.py script with +build and install as arguments, i.e. from the root directory of the +bdist_mpkg source distribution enter: python setup.py build install. -For python 2.5, from the root directory of the pyscard source distribution, -i.e. in the src directory, execute the following commands in a terminal: +For python 2.5, from the root directory of the pyscard source +distribution, i.e. in the src directory, execute the following commands +in a terminal: python setup.py build_ext /Library/Frameworks/Python.Framework/Versions/2.5/Extras/bin/bdist_mpkg setup.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |