Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keyboard entries into script
#8
Still flogging a dead horse, in the hope is that I may yet learn something!

Background: I am using the GIMP 2.10.25 Appimage, extracted, thanks to Rich's help.

When I run my "new_template" from the terminal it works. When I add "workPath = os.getcwd()" it shows the working path as "/home/david/GIMP-2.10.21/squashfs-root".
Run directly from GIMP the working path is "/home/david" which is obviously incorrect. I can prove this by changing my "file open" to the full path and it then works correctly.
If I use "os.path.abspath("tmplt.py")" from GIMP it gives me a path of "/home/david/tmplt.py" which is also incorrect.

Whilst I can get it working, I would like to be able to code it so that it is machine/OS independant, but also understand why the problem occurs.

One of the difficulties, when scouring the internet, is that much of the Python information is not clear as to what version it refers.
Reply


Messages In This Thread
Keyboard entries into script - by david - 10-07-2021, 04:11 PM
RE: Keyboard entries into script - by Ofnuts - 10-07-2021, 10:35 PM
RE: Keyboard entries into script - by david - 10-08-2021, 09:28 AM
RE: Keyboard entries into script - by Ofnuts - 10-09-2021, 10:54 AM
RE: Keyboard entries into script - by david - 10-09-2021, 03:43 PM
RE: Keyboard entries into script - by Ofnuts - 10-09-2021, 04:26 PM
RE: Keyboard entries into script - by david - 10-10-2021, 08:43 AM
RE: Keyboard entries into script - by david - 10-10-2021, 06:15 PM
RE: Keyboard entries into script - by Ofnuts - 10-11-2021, 09:07 AM

Forum Jump: