ich habe wieder ein Problem, welches ich nicht nachvollziehen kann.
Ich habe verschiedene Funktionen geschrieben, welche auch in verschiedene Datein sind.
Code: Alles auswählen
def motor():
...
...
Code: Alles auswählen
def slice():
...
...
Code: Alles auswählen
def tiling():
...
...
Code: Alles auswählen
motor_path = "D:\\test\motor.py"
slice_path = "D:\\test\Slice.py"
tiling_path = "D:\\test\tiling.py"
exec(open(motor_path).read())
exec(open(slice_path).read())
exec(open(tiling_path).read())
bei der tiling-Funktion bekomme ich allerdings einen Fehler
Code: Alles auswählen
Traceback (most recent call last):
File "<string>", line 1, in <module>
OSError: [Errno 22] Invalid argument: 'D:\\test\tiling.py'
Ich verstehe die Fehlermeldung so, dass das argument tiling_path='D:\\test\tiling.py' ungültig ist. Aber wieso funktioniert es dann bei den anderen datein?
Bin über jeden Hinweis sehr dankbar
mfg