mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2026-02-13 00:37:33 +01:00
Added function com_path() to paths.py. This function is now used in libloader/com.py. Added winpaths to the easy_install example in readme.md. Updated application.py in doc folder.
This commit is contained in:
15
src/paths.py
15
src/paths.py
@@ -69,4 +69,17 @@ def locale_path():
|
||||
|
||||
@merge_paths
|
||||
def sound_path():
|
||||
return app_path(u"sounds")
|
||||
return app_path(u"sounds")
|
||||
|
||||
@merge_paths
|
||||
def com_path():
|
||||
global mode, directory
|
||||
if mode == "portable":
|
||||
if directory != None: path = os.path.join(directory, "com_cache")
|
||||
elif directory == None: path = app_path(u"com_cache")
|
||||
elif mode == "installed":
|
||||
path = data_path(u"com_cache")
|
||||
if not os.path.exists(path):
|
||||
log.debug("%s path does not exist, creating..." % (path,))
|
||||
os.mkdir(path)
|
||||
return path
|
||||
|
||||
Reference in New Issue
Block a user