problem with gadfly and py2exe

Andy Todd andy47 at halfcooked.com
Sun May 19 21:14:51 EDT 2002


"Max" <nospam at nospam.nospam> wrote in news:9eJF8.69521$zW3.1064537
@news1.tin.it:

> Hi folks!
> I just started using gadfly (very nice for a small project...). I 
replaced a
> small module written by myself with it, and now it works (better, i
> suppose... ;) ). The problem is that when i try to make the "exe" with
> py2exe the program stops when i try to initialize the db 
(db=gadfly.gadfly()
> or db=gadfly.gadfly(dbname, dir)...)
> I had a similar problem using my module in the beginning, because py2exe
> could'nt find the shelve module by itself. I solved the problem for my 
own
> module forcing the import of shelve, but this (as almost obvious...) 
doesn't
> work for gadfly.
> Has anybody experienced the same problem or has any idea of  which 
modules
> gadfly relies upon (and i might try to force import of in py2exe) ?
> 
> Thanks in advance for any suggestion,
> Max.
> 
> 
> 

Err, I'm not an expert but I think the problem is in the chain of module 
imports that you trigger with "import gadfly". This will actually import a 
module which in turn relies on other modules which in turn rely on other 
modules, etc. As far as I'm aware py2exe isn't psychic and only knows what 
to package based on any "import" statements in your code.

To the best of my knowledge gadfly doesn't rely on any external objects 
(apart from Python of course) but you will probably need a way to tell 
py2exe that it should package the whole package and not just the file that 
you explicitly import (which is actually called database.py I think, but 
lets not go there). 

Sorry I can't be more specific but hopefully this gives you something to go 
on with.

Regards,
Andy
-- 
Contents free posts a speciality



More information about the Python-list mailing list