11-15-2023, 09:09 AM
(11-15-2023, 03:31 AM)(followed by antTas_mania Wrote: I got python2 working in an Ubuntu snap.
Rich the files you listed were missing. Thanks for your help.
I got python-console working by adding this to line 1 of the file:
#!/usr/bin/env python
I've seen ofnuts recommend that in other posts. I noticed his python scripts were loading while others were not.
The #! <some executable> in the first line of the file is known as the "shebang". Unlike Windows, Linux doesn't rely on the file extension to tell if the file is executable or not, it checks the executable flag. If the file is a binary in ELF format, it is loaded/executed, otherwise, it's first line is searched for a shebang and if so, the executable mentioned there is started with the file passed as a first argument (followed by all arguments to the initial command).
Note that in my version of the python-console.py (built from the Gimp sources), the shebang uses python2 and not just python because python is becoming the command to launch Python v3, which wouldn't work with Gimp.