37 lines
866 B
Python
37 lines
866 B
Python
def main():
|
|
global oxiDistro
|
|
oxiDistro = "oxiDE"
|
|
|
|
global oxiMakeConfigPaths
|
|
def oxiMakeConfigPaths():
|
|
global oxiConfigPaths
|
|
oxiConfigPaths = []
|
|
if os.name == "nt":
|
|
oxiConfigPaths.append(p(os.environ["APPDATA"],oxiDistro))
|
|
else:
|
|
oxiConfigPaths.append(p(os.environ["HOME"],".config",oxiDistro))
|
|
oxiConfigPaths.append(p(sp,"config"))
|
|
|
|
global oxiGetConfig
|
|
def oxiGetConfig(file):
|
|
for cpath in oxiConfigPaths:
|
|
ffile = p(cpath,file)
|
|
if os.path.isfile(ffile): return ffile
|
|
return False
|
|
|
|
global threading
|
|
import threading
|
|
global queue
|
|
import queue
|
|
|
|
global oxiMainThreadQueue
|
|
oxiMainThreadQueue = queue.Queue()
|
|
|
|
oxiMakeConfigPaths()
|
|
|
|
threading.Thread(target=oxiRunScript,args=(oxiGetConfig("userMain.py"),)).run()
|
|
|
|
while True:
|
|
cmd = oxiMainThreadQueue.get()
|
|
cmd[0](*cmd[1],**cmd[2])
|
|
main() |