From 4528d9f612f05977ccb43ef444915e228f239e69 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Tue, 23 Apr 2013 09:13:00 -0700 Subject: [PATCH] Conditional import for pyreadline Fixes #71 --- jrnl/Journal.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 7b1d10dc..991631bc 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -19,10 +19,8 @@ try: crypto_installed = True except ImportError: crypto_installed = False -try: - import pyreadline as readline -except ImportError: - import readline +if "win32" in sys.platform: import pyreadline as readline +else: import readline import hashlib import getpass try: