<s> try : <EOL> import locale <EOL> except : <EOL> pass <EOL> withMessagingMenu = False <EOL> try : <EOL> from gi . repository import MessagingMenu <EOL> from gi . repository import Notify <EOL> withMessagingMenu = True <EOL> except ImportError : <EOL> MessagingMenu = None <EOL> import bitcoin <EOL> from addresses import * <EOL> import shared <EOL> from electrumfirst import * <EOL> import sys <EOL> from time import strftime , localtime , gmtime <EOL> import time <EOL> import os <EOL> import hashlib <EOL> from pyelliptic . openssl import OpenSSL <EOL> import pickle <EOL> import platform <EOL> import debug <EOL> from debug import logger <EOL> import subprocess <EOL> import datetime <EOL> import random <EOL> import shelve <EOL> import threading <EOL> import multiprocessing <EOL> class electrumfirst ( QtGui . QMainWindow ) : <EOL> def __init__ ( self , parent = None ) : <EOL> QtGui . QWidget . __init__ ( self , parent ) <EOL> self . ui = Ui_MainWindow ( ) <EOL> self . ui . setupUi ( self ) <EOL> self . parent = parent <EOL> QtCore . QObject . connect ( self . ui . startelectrum , QtCore . SIGNAL ( "<STR_LIT>" ) , self . click_elec ) ; <EOL> QtCore . QObject . connect ( self . ui . startbxb , QtCore . SIGNAL ( "<STR_LIT>" ) , self . click_bxb ) ; <EOL> QtCore . QObject . connect ( self . ui . bitcoinqt , QtCore . SIGNAL ( "<STR_LIT>" ) , self . click_bitcoinqt ) ; <EOL> def click_elec ( self ) : <EOL> subprocess . Popen ( [ os . getcwd ( ) + '<STR_LIT>' ] , shell = True ) <EOL> settings = shelve . open ( "<STR_LIT>" ) <EOL> settings [ "<STR_LIT>" ] = True <EOL> settings . close ( ) <EOL> os . _exit ( <NUM_LIT:0> ) <EOL> def click_bxb ( self ) : <EOL> settings = shelve . open ( "<STR_LIT>" ) <EOL> settings [ "<STR_LIT>" ] = True <EOL> settings . close ( ) <EOL> restart_program ( ) <EOL> def click_bitcoinqt ( self ) : <EOL> settings = shelve . open ( "<STR_LIT>" ) <EOL> settings [ "<STR_LIT>" ] = False <EOL> settings . close ( ) <EOL> restart_program ( ) <EOL> def run ( ) : <EOL> app = QtGui . QApplication ( sys . argv ) <EOL> myapp = electrumfirst ( ) <EOL> myapp . show ( ) <EOL> sys . exit ( app . exec_ ( ) ) <EOL> def restart_program ( ) : <EOL> """<STR_LIT>""" <EOL> python = sys . executable <EOL> os . execl ( python , python , * sys . argv ) </s>
