On Wed, Mar 3, 2010 at 9:07 AM, Sven Neumann <sven@xxxxxxxx> wrote: > On Wed, 2010-03-03 at 08:46 -0300, Joao S. O. Bueno wrote: > >> > I wonder if importing a plug-in from another plug-in is really something >> > that we want to support. If the goal is to share code, then perhaps the >> > code that is worth sharing should be factored out into a Python module >> > that the plug-ins can import. >> > >> >> Every Python program is also able to be a python module that plug-ins >> can import. We should preserve this feature of the language. > > What exactly does that statement mean for the problem at hand? Means that the language has a feature to make development easier: that is it eases up reuse of the code by requiring less source code fiels to achieve the same tasks. So - it is not usual for a Python developer to be required do factor out a fully working source code file, that can be used as a stand alone piece, in order to re-use parts of the code in that file in other applications. The language has a trivial, elegant and seamless mechanism to allow this. The "problem at hand" as I see is exactly to preserve this Python language feature in GIMP plug-ins. On the other hand, simply putting a python module that is not a fully functional plug-in in GIMP's plug-ins directory, would cause GIMP to issue error messages on start-up , due to failed plug-in initialization. All GIMP will see is an executable ".py" file along with the plug-ins. Having to provide a directory structure, hacking with import paths, etc...just because one wants to share, say a couple RGB<->HSV functions in a set of 2 or 3 plug-ins is overkill. js -><- > > > Sven > > > _______________________________________________ > Gimp-developer mailing list > Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer > _______________________________________________ Gimp-developer mailing list Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer