|
|
@ -40,7 +40,7 @@ if os.path.exists("lib"): |
|
|
|
fp, pathname, description = imp.find_module('lib') |
|
|
|
imp.load_module('electrum', fp, pathname, description) |
|
|
|
fp, pathname, description = imp.find_module('gui') |
|
|
|
imp.load_module('electrumGUI', fp, pathname, description) |
|
|
|
imp.load_module('electrum_gui', fp, pathname, description) |
|
|
|
fp, pathname, description = imp.find_module('plugins') |
|
|
|
imp.load_module('electrum_plugins', fp, pathname, description) |
|
|
|
plugin_names = [name for _, name, _ in pkgutil.iter_modules(['plugins'])] |
|
|
@ -122,23 +122,13 @@ if __name__ == '__main__': |
|
|
|
cmd = args[0] |
|
|
|
firstarg = args[1] if len(args) > 1 else '' |
|
|
|
|
|
|
|
#this entire if/else block is just concerned with importing the |
|
|
|
#right GUI toolkit based the GUI command line option given |
|
|
|
if cmd == 'gui': |
|
|
|
pref_gui = config.get('gui','classic') |
|
|
|
if pref_gui == 'gtk': |
|
|
|
import electrumGUI.gui as gui |
|
|
|
elif pref_gui in ['classic', 'qt']: |
|
|
|
import electrumGUI.gui_qt as gui |
|
|
|
elif pref_gui == 'lite': |
|
|
|
import electrumGUI.gui_lite as gui |
|
|
|
elif pref_gui == 'text': |
|
|
|
import electrumGUI.gui_text as gui |
|
|
|
elif pref_gui == 'android': |
|
|
|
import electrumGUI.gui_android as gui |
|
|
|
else: |
|
|
|
sys.exit("Error: Unknown GUI: " + pref_gui ) |
|
|
|
|
|
|
|
if cmd == 'gui': |
|
|
|
gui_name = config.get('gui','classic') |
|
|
|
try: |
|
|
|
gui = __import__('electrum_gui.gui_' + gui_name, fromlist=['electrumGUI']) |
|
|
|
except ImportError: |
|
|
|
sys.exit("Error: Unknown GUI: " + gui_name ) |
|
|
|
|
|
|
|
interface = Interface(config, True) |
|
|
|
wallet.interface = interface |
|
|
|