Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
gimpfu not detected by pylance
#2
Gimpfu only exists in the Gimp environment. It has a cascade of import dependencies (see /usr/lib/gimp/2.0/python/, and some of them are binaries (.so in Linux, likely .dll in windows) and these need an environment set up by Gimp to import correctly. Maybe you can copy the python files and remove a few imports to at least have an importable source for your IDE (never tried, I use a plain editor).

In any case this will only help with auto-completion, because the plugin has to run in a python module started by Gimp, so it won't run in your debug environment for instance.

This said, debugging under Linux is a lot easier than debugging under Windows because if you start Gimp from a command prompt, all messages from Gimp and the plugins appear in the command prompt.

Also see: Debugging python-fu scripts in Windows (which despite its title contains hints that are also useful on Linux/WSL)
Reply


Messages In This Thread
gimpfu not detected by pylance - by Sash4957 - 10-24-2023, 01:43 AM
RE: gimpfu not detected by pylance - by Ofnuts - 10-24-2023, 07:39 AM
RE: gimpfu not detected by pylance - by Sash4957 - 10-25-2023, 10:59 PM
RE: gimpfu not detected by pylance - by Ofnuts - 10-26-2023, 07:47 AM
RE: gimpfu not detected by pylance - by Sash4957 - 10-27-2023, 05:10 AM
RE: gimpfu not detected by pylance - by gimpygirl - 03-03-2024, 06:48 PM

Forum Jump: