and Blockchain functions can be accessed through it. The goal is to
let users extend Electrum through custom scripts.
+* The location of the Electrum folder in Windows changed from LOCALAPPDATA
+to APPDATA. Discussion on this topic can be found here: https://bitcointalk.org/index.php?topic=144575.0
+
* New menu item to display the private key corresponding to a
receiving address.
import re
import sys, os, time
import optparse
+import platform
try:
import ecdsa
for k, v in config_options.items():
if v is None: config_options.pop(k)
+ # Wallet migration on Electrum 1.7
+ # Todo: In time we could remove this again
+ if platform.system() == "Windows":
+ util.check_windows_wallet_migration()
+
config = SimpleConfig(config_options)
wallet = Wallet(config)
#right GUI toolkit based the GUI command line option given
if cmd == 'gui':
pref_gui = config.get('gui','classic')
+
if pref_gui == 'gtk':
try:
import lib.gui as gui
import os, sys
import platform
+import shutil
from datetime import datetime
is_verbose = True
sys.stdout.write(" ".join(args) + "\n")
sys.stdout.flush()
+def check_windows_wallet_migration():
+ from PyQt4.QtGui import *
+ from i18n import _
+
+ app = QApplication(sys.argv)
+ if os.path.exists(os.path.join(os.environ["LOCALAPPDATA"], "Electrum")):
+ if os.path.exists(os.path.join(os.environ["APPDATA"], "Electrum")):
+ QMessageBox.information(None,_("Folder migration"), _("Two Electrum folders have been found, the default Electrum location for Windows has changed from %s to %s since Electrum 1.7, please check your wallets and fix the problem manually." % (os.environ["LOCALAPPDATA"], os.environ["APPDATA"])))
+ sys.exit()
+
+ QMessageBox.information(None, _("Folder migration"), _("This version of Electrum moved the Electrum folder on windows from %s to %s, your Electrum folder will now be moved.") % (os.environ["LOCALAPPDATA"], os.environ["APPDATA"]))
+ shutil.move(os.path.join(os.environ["LOCALAPPDATA"], "Electrum"), os.path.join(os.environ["APPDATA"], "Electrum"))
+ QMessageBox.information(None,_("Migration status"), _("Your wallet has been moved sucessfully."))
+
+
def user_dir():
if "HOME" in os.environ:
return os.path.join(os.environ["HOME"], ".electrum")
- elif "LOCALAPPDATA" in os.environ:
- return os.path.join(os.environ["LOCALAPPDATA"], "Electrum")
elif "APPDATA" in os.environ:
return os.path.join(os.environ["APPDATA"], "Electrum")
+ elif "LOCALAPPDATA" in os.environ:
+ return os.path.join(os.environ["LOCALAPPDATA"], "Electrum")
else:
#raise BaseException("No home directory found in environment variables.")
return