MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / lookupAppdataFolder

Function lookupAppdataFolder

src/bitmessagecli.py:51–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49
50#Begin keys.dat interactions
51def lookupAppdataFolder(): #gets the appropriate folders for the .dat files depending on the OS. Taken from bitmessagemain.py
52 APPNAME = "PyBitmessage"
53 from os import path, environ
54 if sys.platform == 'darwin':
55 if "HOME" in environ:
56 dataFolder = path.join(os.environ["HOME"], "Library/Application support/", APPNAME) + '/'
57 else:
58 print ' Could not find home folder, please report this message and your OS X version to the Daemon Github.'
59 os._exit()
60
61 elif 'win32' in sys.platform or 'win64' in sys.platform:
62 dataFolder = path.join(environ['APPDATA'], APPNAME) + '\\'
63 else:
64 dataFolder = path.expanduser(path.join("~", ".config/" + APPNAME + "/"))
65 return dataFolder
66
67def configInit():
68 BMConfigParser().add_section('bitmessagesettings')

Callers 1

apiDataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected