Kevin et al,
Kevin Altis wrote:
> I updated all the samples to use the simplified form outlined in yesterday's
> email. I also modified some of the other imports, so there is a chance I
> created a name conflict in some samples that wasn't there before.
>
> Since this was such a big change, I'm going to go ahead and do a 0.5.2
> release later today after Andy has a chance to double-check dbBrowser.
Checked, and it works for me.
>
> BTW, py2exe is working like a champ for building standalone executables on
> Windows. You do need to include the resource file and any files such as
> sounds, bitmaps, configs, etc. that might be loaded at runtime (not done
> with import). Simon is regularly building textRouter .exe files. The user
> can actually make changes to the resource file, such as a key binding for a
> menu, which is pretty nice and precisely what resource files are supposed to
> simplify.
A-ha, I think I have found a fly in the ointment here. It doesn't pick
up any modules that are dynamically imported (using __import__). This is
fine for the resource files because they can just be shipped with the
exe, but doesn't work for dbBrowser. I dynamically import my database
handler module (and thus its associated DB-API module such as cx_Oracle
or MySQLdb) at run time. None of this is picked up by the distutils
packager and thus no 'back end' modules are included in the
distribution. I could just include 'oracleBrowse.py' and
'mySQLBrowse.py' in my stand alone distribution but this then would fall
over when these modules in turn try and import the appropriate database
interface modules.
The reason I only import these at run time is to keep the application as
light as possible, when it expands to support several different data
sources through a multitude of interface drivers I don't want the
overhead of importing them all and then only using one. The same goes
for packaging I guess, which means I am rather stuck.
I don't have any quick solutions to this problem but if anyone would
like to contribute please throw in your ideas now.
>
> It would be interesting to see if Gordon McMillan's installer
>
> http://www.mcmillan-inc.com/install1.html
>
> can be used to make Linux standalones.
>
> ka
>
>
Regards,
Andy
--
-----------------------------------------------------------------------
From the desk of Andrew J Todd esq.
"Another year older, still no wiser." - Me, on my birthday
|