Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changes in 2024 for Ubuntu
#13
(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.  Smile

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.
Reply


Messages In This Thread
Changes in 2024 for Ubuntu - by Tas_mania - 11-09-2023, 10:19 PM
RE: Changes in 2024 for Ubuntu - by nelo - 11-10-2023, 08:43 PM
RE: Changes in 2024 for Ubuntu - by Tas_mania - 11-11-2023, 08:06 PM
RE: Changes in 2024 for Ubuntu - by Tas_mania - 11-11-2023, 09:50 PM
RE: Changes in 2024 for Ubuntu - by PixLab - 11-12-2023, 04:47 AM
RE: Changes in 2024 for Ubuntu - by Tas_mania - 11-12-2023, 06:14 AM
RE: Changes in 2024 for Ubuntu - by rich2005 - 11-12-2023, 08:35 AM
RE: Changes in 2024 for Ubuntu - by rich2005 - 11-12-2023, 11:12 AM
RE: Changes in 2024 for Ubuntu - by Tas_mania - 11-13-2023, 09:24 PM
RE: Changes in 2024 for Ubuntu - by Ofnuts - 11-14-2023, 05:36 PM
RE: Changes in 2024 for Ubuntu - by Tas_mania - 11-15-2023, 03:31 AM
RE: Changes in 2024 for Ubuntu - by Ofnuts - 11-15-2023, 09:09 AM
RE: Changes in 2024 for Ubuntu - by Tas_mania - 11-15-2023, 08:34 PM
RE: Changes in 2024 for Ubuntu - by Tas_mania - 12-27-2023, 06:17 AM

Forum Jump: