On 9 Nov, 2012, at 15:45, Jaime Barrio Jimenez <j.barrio.jim@gmail.com> wrote:

ok, this is my problem:

I'm working with Python. My file GUI.py uses Yapsy for including new plugins into my software. I have finished all my work and now I want to use py2exe to generate a executable. I don't know how can I order py2exe to include Yapsy and all their modules. I have tried that and it doesn't work:

    opts = {
        'py2exe': { "includes" : ["yapsy.PluginManager","sip", "matplotlib.backends",  "matplotlib.backends.backend_qt4agg",
                                   "matplotlib.figure","pylab", "numpy","matplotlib.backends.backend_tkagg"]}
          package={'images/*', 'Windows6S/*', 'modulos6S/*', 'OperacionesPlugins/*'},

I have found something in this link [http://notinthestars.blogspot.com.es/2011/04/using-python-plugin-scripts-with-py2exe.html][1] but it doesn't solve my problem.

In my Gui.py file for each plugin I add an action into a menu. This menu in the executable doesn't appear.

Does anyone know how I must do it?

Thank you very much.


I have used breakpoints and yapsy works fine, but it doesn't found my plugins directory. The directory's name is the same.

Edit 2:

The path is ok and the directory is into the path. I don't know why it doesn't find the plugins directory after packing with py2exe. My code line for set the directory is the same like other web pages: self.manager.setPluginPlaces(["plugins"])

Edit 3:

I tried use a relative path to search the plugins and, it doesn't work.
self.manager.setPluginPlaces([os.getcwd() + os.sep + "plugins"])

Have to tried printing the current working directory? Your program environment might be different that you expect, especially when you don't start the executable from a command shell window.