From 47662ab48e7a8e385ec833e360255f5b4ee4c617 Mon Sep 17 00:00:00 2001 From: hploetz Date: Tue, 8 May 2007 09:23:25 +0000 Subject: Get working under Windows with http://cheeseshop.python.org/pypi/PyCSC/0.3 (with Python 2.5 for Windows) Note: you additionally need pycrypto, the source of which you'll get from http://cheeseshop.python.org/pypi/pycrypto/2.0.1 Compilation of pycrypto can work with cygwin in two steps: python setup.py build -c mingw32 and python setup.py install --skip-build git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@190 f711b948-2313-0410-aaa9-d29f33439f0b --- utils.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'utils.py') diff --git a/utils.py b/utils.py index 57981fc..42bcd4f 100644 --- a/utils.py +++ b/utils.py @@ -1,4 +1,14 @@ -import pycsc, string, binascii, sys, re +try: + import pycsc +except ImportError,e: + try: + import PyCSC + from PyCSC import pycsc # Windows + pycsc.SCARD_PROTOCOL_ANY = PyCSC.SCARD_PROTOCOL_ANY + except ImportError: + raise e # raise the original exception, masking the windows-only attempt + +import string, binascii, sys, re def represent_binary_fancy(len, value, mask = 0): result = [] -- cgit v1.2.3