Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import psutil
defaultConfigText="""
[Dirs]
WorkingDirectory = {0}
[Programs]
bigWigInfo = None
bigWigToWig = None
""".format(tempfile.gettempdir())
configAppDirs = AppDirs('gcMapExplorer')
if system == 'win32':
configFileName = 'gcMapExplorer.ini'
else:
configFileName = 'gcMapExplorer.conf'
configFile = os.path.join(configAppDirs.user_config_dir, configFileName)
def _defaultConfiguration():
config = configparser.ConfigParser()
config.read_string(defaultConfigText)
return config
def updateConfig(section, option, value):
""" Update configuration file
Parameters
def preflight(self, filename=True):
d = user_data_dir(self.appname, self.appauthor)
if "linux" in system:
d = os.path.expanduser("~/.bitshares/")
if not(os.path.isdir(d)): # Hack - create directory in advance
os.makedirs(d, exist_ok=True)
if not filename:
return d
return os.path.join(d, self.storageDatabaseDefault)