interface = Interfaces.CUI()
+# current directory
+PATH = os.path.dirname(os.path.abspath(__file__))
+
# make users enter password to run this program on sudo
subprocess.call(["sudo", "echo"])
# if the directory "../data" does not exist, make it.
-if not os.path.exists("../data") :
- subprocess.call(["sudo", "mkdir", "../data"])
+if not os.path.exists(PATH + "/../data") :
+ subprocess.call(["sudo", "mkdir", PATH + "/../data"])
print("Welcome to serene-wizard!!\n")
-if not os.path.exists("../data/not_first_time") :
+if not os.path.exists(PATH + "/../data/not_first_time") :
items = Items.getItems_first_time(interface)
print("Done!")
print("See you again!!\n")
- subprocess.call(["sudo", "touch", "../data/not_first_time"])
+ subprocess.call(["sudo", "touch", PATH + "/../data/not_first_time"])
else :