Code: Alles auswählen
pfad = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'Ordnername')
Code: Alles auswählen
pfad = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'Ordnername')
Code: Alles auswählen
>>> try:
... f = open(1)
... finally:
... f.close()
...
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
NameError: name 'f' is not defined
>>>