Gimp-Forum.net
ofn-preset-guides - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: ofn-preset-guides (/Thread-ofn-preset-guides)

Pages: 1 2 3 4


RE: ofn-preset-guides - Ofnuts - 07-01-2021

(07-01-2021, 04:33 AM)EdoNork Wrote: Sorry for the mistake.

Here you have again:

GIMP 2.10.24 Python Console
Python 2.7.18 (default, Apr 20 2020, 16:57:11)  [GCC 9.3.0 64 bit (AMD64)]
➤> import os.path
➤> fname=os.path.join(gimp.directory,'testfile.dat')
➤> print fname
C:\Users\Iñigo\AppData\Roaming\GIMP\2.10\testfile.dat
➤> with open(fname,'w') as dat:
...     dat.write('Test successful')
...

Nothing is written in the plugins folder..

The result file is not expected in the plug-ins folder but in that folder's parent (C:\Users\Iñigo\AppData\Roaming\GIMP\2.10\)


RE: ofn-preset-guides - EdoNork - 07-01-2021

No "testfile.dat" there neither.


RE: ofn-preset-guides - Ofnuts - 07-01-2021

Is there a testfile.dat anywhere on your system?


RE: ofn-preset-guides - EdoNork - 07-05-2021

No, there isn't.


RE: ofn-preset-guides - Poupée-Chaussette - 07-05-2021

[ofnuts here]

OK, got hold of a Windows system. I do get an error:

Code:
➤> import os.path
➤> fname=os.path.join(gimp.directory,'testfile.dat')
➤> print fname
C:/Users/XXXX/NiñoDéjàVu/GIMP/2.10/testfile.dat
➤> with open(fname,'w') as dat:
...     dat.write('Test successful')
...
Traceback (most recent call last):
  File "<input>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'C:/Users/XXXX/Ni\xc3\xb1oD\xc3\xa9j\xc3\xa0Vu/GIMP/2.10/testfile.dat'
➤>



RE: ofn-preset-guides - Ofnuts - 07-05-2021

OK, figured out the problem. I know how to fix it for Windows, but I have to check that the fix won't break other platforms. Stay tuned.


RE: ofn-preset-guides - EdoNork - 07-10-2021

I will!
Thank you.


RE: ofn-preset-guides - Ofnuts - 07-13-2021

Updated on SourceForge. Tell me how it goes.


RE: ofn-preset-guides - EdoNork - 07-16-2021

Sorry but it doesn't work.


RE: ofn-preset-guides - Ofnuts - 07-17-2021

Please see your PM.