06-27-2021, 05:36 AM
import os.path
File "<input>", line 1
rt os.path
^
SyntaxError: invalid syntax
➤> fname=os.path.join(gimp.directory,'testfile.dat')
Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'os' is not defined
➤> print fname
Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'fname' is not defined
➤> with open(fname,'w') as dat:
... dat.write('Test successful')
File "<input>", line 1
rt os.path
^
SyntaxError: invalid syntax
➤> fname=os.path.join(gimp.directory,'testfile.dat')
Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'os' is not defined
➤> print fname
Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'fname' is not defined
➤> with open(fname,'w') as dat:
... dat.write('Test successful')