ttest the existence of modules in the main script - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 1e192e9ca919fb8c66cf2bf7ed5684bd6236121b DIR parent 796c9927024d96cda2d28c17cfa9828d2d71160b HTML Author: thomasv <thomasv@gitorious> Date: Mon, 14 May 2012 14:09:50 +0200 ttest the existence of modules in the main script Diffstat: M electrum | 13 +++++++++++++ M lib/wallet.py | 16 ++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) --- DIR diff --git a/electrum b/electrum t@@ -18,6 +18,19 @@ import re, sys, getpass +try: + import ecdsa +except: + print "python-ecdsa does not seem to be installed. Try 'sudo pip install ecdsa'" + sys.exit(1) + +try: + import aes +except: + print "AES does not seem to be installed. Try 'sudo pip install slowaes'" + sys.exit(1) + + import electrum from optparse import OptionParser from decimal import Decimal DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -18,20 +18,8 @@ import sys, base64, os, re, hashlib, copy, operator, ast, threading, random - -try: - import ecdsa - from ecdsa.util import string_to_number, number_to_string -except: - print "python-ecdsa does not seem to be installed. Try 'sudo pip install ecdsa'" - sys.exit(1) - -try: - import aes -except: - print "AES does not seem to be installed. Try 'sudo pip install slowaes'" - sys.exit(1) - +import slowaes, ecdsa +from ecdsa.util import string_to_number, number_to_string ############ functions from pywallet #####################