diff options
Diffstat (limited to 'AllAboutData/utils/osSpecific.py')
-rw-r--r-- | AllAboutData/utils/osSpecific.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/AllAboutData/utils/osSpecific.py b/AllAboutData/utils/osSpecific.py index 7caf664..c89e65a 100644 --- a/AllAboutData/utils/osSpecific.py +++ b/AllAboutData/utils/osSpecific.py @@ -2,14 +2,17 @@ import os import sys # terminal commands, which are unfortunately os-specific - def whichOs(): +''' Returns "windows" if used os is windows. If not, returns "good" ''' + if sys.platform == "win32": return "windows" else: - return "good" # ...right? + return "good" def deleteDataDir(): +''' Removes Data directory from working directroy ''' + if whichOs() == "windows": os.system("rmdir \s Data") else: @@ -17,6 +20,8 @@ def deleteDataDir(): def addDataDir(): +''' Adds data directory from working directroy ''' + if whichOs() == "windows": os.system("mkdir Data\Players") else: |