|
|
@ -28,14 +28,20 @@ os.path.normpath(os.getcwd() + os.sep + os.pardir)
|
|
|
|
cwd = os.getcwd()
|
|
|
|
cwd = os.getcwd()
|
|
|
|
|
|
|
|
|
|
|
|
print(pathToProjectFolder)
|
|
|
|
print(pathToProjectFolder)
|
|
|
|
|
|
|
|
print("Curent Working Path")
|
|
|
|
print(cwd)
|
|
|
|
print(cwd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Kiced Folder
|
|
|
|
|
|
|
|
os.chdir("..")
|
|
|
|
|
|
|
|
cwdOneBack = os.getcwd()
|
|
|
|
|
|
|
|
os.chdir(cwd)
|
|
|
|
|
|
|
|
|
|
|
|
# find common path
|
|
|
|
# find common path
|
|
|
|
commonPath = os.path.commonprefix([cwd, pathToProjectFolder])
|
|
|
|
commonPath = os.path.commonprefix([cwd, pathToProjectFolder])
|
|
|
|
|
|
|
|
|
|
|
|
# KicED library paths
|
|
|
|
# KicED library paths
|
|
|
|
footprintPath = os.path.join(cwd, "footprints")
|
|
|
|
footprintPath = os.path.join(cwdOneBack, "footprints")
|
|
|
|
symbolsPath = os.path.join(cwd, "symbols")
|
|
|
|
symbolsPath = os.path.join(cwdOneBack, "symbols")
|
|
|
|
|
|
|
|
|
|
|
|
# create relative path from KiCad project and the KicED library
|
|
|
|
# create relative path from KiCad project and the KicED library
|
|
|
|
relative_path = os.path.relpath(cwd, pathToProjectFolder)
|
|
|
|
relative_path = os.path.relpath(cwd, pathToProjectFolder)
|
|
|
@ -116,4 +122,4 @@ try:
|
|
|
|
os.chdir(cwd)
|
|
|
|
os.chdir(cwd)
|
|
|
|
except FileNotFoundError:
|
|
|
|
except FileNotFoundError:
|
|
|
|
print("fail")
|
|
|
|
print("fail")
|
|
|
|
os.chdir(cwd)
|
|
|
|
os.chdir(cwd)
|
|
|
|