You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
654 B

import os
import platform
import sys
def print_error(*args):
for item in args:
sys.stderr.write(str(item))
sys.stderr.write("\n")
sys.stderr.flush()
def appdata_dir():
if platform.system() == "Windows":
return os.path.join(os.environ["APPDATA"], "Electrum")
elif platform.system() == "Linux":
return os.path.join(sys.prefix, "share", "electrum")
elif (platform.system() == "Darwin" or
platform.system() == "DragonFly"):
return "/Library/Application Support/Electrum"
else:
raise Exception("Unknown system")
def get_resource_path(*args):
return os.path.join(".", *args)