Python-fu path of the plug-ins folder - 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) +---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions) +---- Thread: Python-fu path of the plug-ins folder (/Thread-Python-fu-path-of-the-plug-ins-folder) |
Python-fu path of the plug-ins folder - Davide_sd - 01-11-2019 Hello, I'm using Python-fu to write a plugin. Is there any way to get the path of the plug-ins folder? RE: Python-fu path of the plug-ins folder - Ofnuts - 01-11-2019 There isn't one single folder, there are "folders", so nothing says that the folder you are looking at is the right one (I use three additional folders besides the standard two, and furthermore they mostly contain soft links to script elsewhere. If you want to know where your plugin is, use os.path.abspath(sys.argv[0]) (this is the full path to your plugin file..). Code: #!/usr/bin/env python RE: Python-fu path of the plug-ins folder - Kevin - 01-11-2019 If you want to get the list of folders that are set in preferences: Code: pdb.gimp_gimprc_query("plug-in-path") RE: Python-fu path of the plug-ins folder - Davide_sd - 01-16-2019 Thank you Kevin and Ofnuts for you replies. Very helpful! |