diff options
author | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-16 23:13:48 +0200 |
---|---|---|
committer | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-16 23:13:48 +0200 |
commit | ecb4b4c8c56d9f720ba004fcfefd40acb996cc7e (patch) | |
tree | c53e0de7e1e08cccdcc07f2a0a4408ecdf26cbf4 /AllAboutData/utils/osSpecific.py | |
parent | 03aaa6978fbd73c13b63f0c525f01189c67d0f1f (diff) |
Fixing comments and documentation
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: |