You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
549 B
Python
23 lines
549 B
Python
3 years ago
|
|
||
|
import os
|
||
|
|
||
|
NeLQuickStartDir = os.path.dirname(os.path.realpath(__file__))
|
||
|
|
||
|
def findNeLRootRecurse(dirPath):
|
||
|
configDir = os.path.join(dirPath, ".nel")
|
||
|
if os.path.isdir(configDir):
|
||
|
return dirPath
|
||
|
parentPath = os.path.dirname(dirPath)
|
||
|
if parentPath == dirPath:
|
||
|
exit("NeL Root folder (.nel) not found in folder hierarchy.")
|
||
|
return findNeLRootRecurse(parentPath)
|
||
|
|
||
|
def findNeLRoot():
|
||
|
return findNeLRootRecurse(NeLQuickStartDir)
|
||
|
|
||
|
NeLRootDir = findNeLRoot()
|
||
|
NeLConfigDir = os.path.join(NeLRootDir, ".nel")
|
||
|
|
||
|
del findNeLRootRecurse
|
||
|
del findNeLRoot
|