Giovanni Bajo wrote: > On 09/03/2007 17.44, Don Dwiggins wrote: > >> I have a Windoes database app in which I changed from using adodbapi to >> pyodbc. When I did this, the exe failed because it couldn't import the >> decimal module. I worked around it by adding an "import decimal" in the >> main script, but I'm wondering if there's a better way to deal with it, >> using the facilities of PyInstaller. > > Does pyodbc have a hidden import of the "decimal" module? Can you look for it > and confirm it? > > If so, you just have to add an import hook to PyInstaller. Have a look at the > existing hooks in the "hooks" directory, and the documentation for some > guidance about it. If you send me the hook that works, I will happily commit > it.
Turns out that pyodbc is a .pyd; I found a couple of calls to PyImport_ImportModule in the source. This worked for me: hiddenimports = ['datetime', 'decimal'] Thanks much, -- Don Dwiggins Advanced Publishing Technology --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/PyInstaller?hl=en -~----------~----~----~----~------~----~------~--~---
