def __init__(self): self.names = {} self.connected = False self.blockchainUptodate = False self.inPoll = False self.stopped = False self.blockCount = None self.balance = -1 self.firstUpdateQueue = [] self.updateCount = 0 self.blockHashPrev = None self.listSinceBlockPrev = None self.isLocked = None self.passphrase = None self.unlocked = False # did we unlock the wallet? self.unlockNeeded = None util.ensure_dirs(shared.CONFFOLDER) self.nameNewDb = lineperdic.LPD(shared.NAMENEWDBFILENAMEPATH) self.log = shared.get_my_logger(name=__file__) datadir = shared.args.namecoindatadir # rpc does currently not work asynchronously self._rpc = namerpc.CoinRpc(connectionType="client", datadir=datadir) # poll self.rpc = namerpc.CoinRpc(connectionType="client", datadir=datadir) # other functions self._doStop = False self._updateNow = False self._initialUpdate = True self._pollThread = threading.Thread(target=self._poll) self.log.info("model poll start ----------------------------------") self._pollThread.start()
import shared # needs to be imported early because of configuration and cli parsing import sys sys.path.append("src") sys.path.append("lib") import splashscreen import os import traceback import shared log = shared.get_my_logger(name=__file__) def exception_display(msg): log.exception(msg) root = tk.Tk() tk.Label(root, justify="left", text=traceback.format_exc() + '\n' + msg).pack() tk.Button(root, text="OK", command=root.quit).pack() root.focus_force() root.mainloop() favicon = None #favicon = "gfx/favicon.gif" # somebody try this on linux / mac if os.name == "nt": favicon = "gfx/favicon.ico" splashscreen.splash("gfx/splash.gif", favicon=favicon)
import shared # needs to be imported early because of configuration and cli parsing import sys sys.path.append("src") sys.path.append("lib") import splashscreen import os import traceback import shared log = shared.get_my_logger(name=__file__) def exception_display(msg): log.exception(msg) root = tk.Tk() tk.Label(root, justify="left", text=traceback.format_exc() + '\n' + msg).pack() tk.Button(root, text="OK", command=root.quit).pack() root.focus_force() root.mainloop() favicon = None #favicon = "gfx/favicon.gif" # somebody try this on linux / mac if os.name == "nt": favicon = "gfx/favicon.ico" splashscreen.splash("gfx/splash.gif", favicon=favicon) try: import time import json