Irgendwie stehe ich da daneben; ich möchte Folgendes erreichen: es geht darum, python scripts automatisch zu erzeugen. Damit die lauffähig sind, muss der syspath vergrössert werden.
Code: Alles auswählen
projectExtension = "XXXY"
topdir = os.getcwd()
addToPath = os.path.join(topdir, projectExtension)
Code: Alles auswählen
sys.path.append("D:\projects\tcommander\mine\0.5.0\XXXY")
Zur Illustration:
Code: Alles auswählen
>>> os.path.join(os.getcwd(), "XXXY")
'D:\\projects\\tcommander\\mine\\0.5.0\\XXXY'
>>> p = os.path.join(os.getcwd(), "XXXY")
>>> print p
D:\projects\tcommander\mine\0.5.0\XXXY