mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 01:35:20 +00:00
created docstring for local_data_dir()
This commit is contained in:
parent
ddf5614af0
commit
66ede2e03e
1 changed files with 3 additions and 2 deletions
|
@ -3,14 +3,14 @@ import platform
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
def print_error(*args):
|
def print_error(*args):
|
||||||
'''Print out the arguments to standard error.'''
|
"""Print out the arguments to standard error."""
|
||||||
for item in args:
|
for item in args:
|
||||||
sys.stderr.write(str(item))
|
sys.stderr.write(str(item))
|
||||||
sys.stderr.write("\n")
|
sys.stderr.write("\n")
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
|
|
||||||
def appdata_dir():
|
def appdata_dir():
|
||||||
'''Find the path to the application data directory; add an electrum folder and return path.'''
|
"""Find the path to the application data directory; add an electrum folder and return path."""
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
return os.path.join(os.environ["APPDATA"], "Electrum")
|
return os.path.join(os.environ["APPDATA"], "Electrum")
|
||||||
elif platform.system() == "Linux":
|
elif platform.system() == "Linux":
|
||||||
|
@ -25,6 +25,7 @@ def get_resource_path(*args):
|
||||||
return os.path.join(".", *args)
|
return os.path.join(".", *args)
|
||||||
|
|
||||||
def local_data_dir():
|
def local_data_dir():
|
||||||
|
"""Return path to the data folder."""
|
||||||
assert sys.argv
|
assert sys.argv
|
||||||
prefix_path = os.path.dirname(sys.argv[0])
|
prefix_path = os.path.dirname(sys.argv[0])
|
||||||
local_data = os.path.join(prefix_path, "data")
|
local_data = os.path.join(prefix_path, "data")
|
||||||
|
|
Loading…
Add table
Reference in a new issue