Amir Taaki
13 years ago
1 changed files with 17 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||
import os |
|||
import platform |
|||
import sys |
|||
|
|||
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": |
|||
return "/Library/Application Support/Electrum" |
|||
else: |
|||
raise Exception("Unknown system") |
|||
|
|||
def get_resource_path(filename): |
|||
return os.path.join(appdata_dir(), filename) |
|||
|
Loading…
Reference in new issue