1
0

Improve text gui. Disable print_error when text gui is used.

This commit is contained in:
thomasv
2012-10-29 16:22:53 +01:00
parent cdb52c30d2
commit 5e28ccd09d
5 changed files with 68 additions and 54 deletions

View File

@@ -20,11 +20,6 @@ import re
import sys
import optparse
try:
from lib.util import print_error
except ImportError:
from electrum.util import print_error
try:
import ecdsa
except ImportError:
@@ -36,9 +31,9 @@ except ImportError:
sys.exit("Error: AES does not seem to be installed. Try 'sudo pip install slowaes'")
try:
from lib import Wallet, Interface, WalletSynchronizer, WalletVerifier, format_satoshis, mnemonic, SimpleConfig, pick_random_server
from lib import *
except ImportError:
from electrum import Wallet, Interface, WalletSynchronizer, WalletVerifier, format_satoshis, mnemonic, SimpleConfig, pick_random_server
from electrum import *
from decimal import Decimal
@@ -143,8 +138,11 @@ if __name__ == '__main__':
parser.add_option("-c", "--changeaddr", dest="change_addr", default=None, help="set the change address for payto/mktx. default is a spare address, or the source address if it's not in the wallet")
parser.add_option("-s", "--server", dest="server", default=None, help="set server host:port:protocol, where protocol is t or h")
parser.add_option("-p", "--proxy", dest="proxy", default=None, help="set proxy [type:]host[:port], where type is socks4,socks5 or http")
#parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="show debugging information")
options, args = parser.parse_args()
#set_verbosity(options.verbose)
# config is an object passed to the various constructors (wallet, interface, gui)
config = SimpleConfig(options)
wallet = Wallet(config)