use either readline or pyreadline
This commit is contained in:
@@ -111,6 +111,7 @@ the following:
|
|||||||
- PyCrypto_
|
- PyCrypto_
|
||||||
- PBKDF2_
|
- PBKDF2_
|
||||||
- PIP_
|
- PIP_
|
||||||
|
- readline_ or PyReadline_
|
||||||
- OpenPACE_ (nPA emulation)
|
- OpenPACE_ (nPA emulation)
|
||||||
|
|
||||||
|
|
||||||
@@ -265,6 +266,8 @@ Notes and References
|
|||||||
.. _pyscard: http://pyscard.sourceforge.net/
|
.. _pyscard: http://pyscard.sourceforge.net/
|
||||||
.. _PyCrypto: http://pycrypto.org/
|
.. _PyCrypto: http://pycrypto.org/
|
||||||
.. _PBKDF2: https://www.dlitz.net/software/python-pbkdf2/
|
.. _PBKDF2: https://www.dlitz.net/software/python-pbkdf2/
|
||||||
|
.. _readline: https://docs.python.org/3.3/library/readline.html
|
||||||
|
.. _PyReadline: https://pypi.python.org/pypi/pyreadline
|
||||||
.. _PIP: http://www.pythonware.com/products/pil/
|
.. _PIP: http://www.pythonware.com/products/pil/
|
||||||
.. _OpenPACE: https://github.com/frankmorgner/openpace
|
.. _OpenPACE: https://github.com/frankmorgner/openpace
|
||||||
.. _`Fabio Ottavi's UMDF Driver for a Virtual Smart Card Reader`: http://www.codeproject.com/Articles/134010/An-UMDF-Driver-for-a-Virtual-Smart-Card-Reader
|
.. _`Fabio Ottavi's UMDF Driver for a Virtual Smart Card Reader`: http://www.codeproject.com/Articles/134010/An-UMDF-Driver-for-a-Virtual-Smart-Card-Reader
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
# virtualsmartcard. If not, see <http://www.gnu.org/licenses/>.
|
# virtualsmartcard. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
import sys, getpass, anydbm, readline, logging
|
import sys, getpass, anydbm, logging
|
||||||
from pickle import loads, dumps
|
from pickle import loads, dumps
|
||||||
from virtualsmartcard.TLVutils import pack, unpack
|
from virtualsmartcard.TLVutils import pack, unpack
|
||||||
from virtualsmartcard.utils import inttostring
|
from virtualsmartcard.utils import inttostring
|
||||||
@@ -25,6 +25,10 @@ from virtualsmartcard.SmartcardFilesystem import MF, DF, TransparentStructureEF
|
|||||||
from virtualsmartcard.ConstantDefinitions import FDB, ALGO_MAPPING
|
from virtualsmartcard.ConstantDefinitions import FDB, ALGO_MAPPING
|
||||||
from virtualsmartcard.CryptoUtils import protect_string, read_protected_string
|
from virtualsmartcard.CryptoUtils import protect_string, read_protected_string
|
||||||
from virtualsmartcard.SmartcardSAM import SAM
|
from virtualsmartcard.SmartcardSAM import SAM
|
||||||
|
try:
|
||||||
|
import readline
|
||||||
|
except ImportError:
|
||||||
|
import pyreadline as readline
|
||||||
|
|
||||||
# pgp directory
|
# pgp directory
|
||||||
#self.mf.append(DF(parent=self.mf,
|
#self.mf.append(DF(parent=self.mf,
|
||||||
|
|||||||
Reference in New Issue
Block a user