New GUI2Exe Test Version

Hi All,

    I have finally managed to (almost) finish GUI2Exe, and I just
wanted to make it available to wxPython users as a *very alpha*
release, for those willing to test it, play with it and report back
bugs, inconsistencies, feature requests and so on. I'll release a
final version to the other communities when I am almost sure that
everything goes as smooth as possible.

Read carefully

···

---------------------
**__NOTE__** : If you are an existing GUI2Exe user, please *backup*
the existing GUI2Exe database (with another name) and *delete* the
existing database. For Windows users, the existing database is located
in a directory more or less like this:

C:\\Documents and Settings\\THEUSER\\Application
Data\\.GUI2Exe\\GUI2Exe_database.db

This is because I am still writing an intelligent enough routine to
convert the old database format to the new one. This step is *very*
important.

Now, about the news. I have tested GUI2Exe on Windows XP SP2, Python
2.5.2, wxPython 2.8.8.1 unicode and on Ubuntu Hardy with the same
Python and wxPython configurations. I have no idea on the behavior of
GUI2Exe on Mac, and I don't even know if the code I have written for
PY2APP will work correctly. I have contacted one Mac-user off-list to
test my latest GUI2Exe but I have never got any answer back. Probably
my e-mail didn't get through.

What's new
-----------------

I will give an almost full changelog when the final version will
appear, but for the moment this is what I did:
- Implemented support for py2app (Mac), PyInstaller (all platforms ?),
cx_Freeze (Windows & GTK), bbFreeze (Windows & GTK);
- Extended the support for py2exe. Multiple executables are now
possible - Thanks to Werner Bruhin;
- Possibility to add data_files using a directory-recursive approach -
Thanks to Mike Driscoll;
- Possibility to change the Python version used to build the
executable - Thanks to Mike Driscoll;
- Possibility to view the full build output coming from the compiler
- Thanks to Tal Einat;
- "Super" tooltips for Windows & GTK users to better understand the
various options - almost completed, Thanks to Tal Einat;
- Now GUI2Exe project can be saved also to a file (and not only in the
database): GUI2Exe project may be exported and checked into version
control software like CVS or SVN, modified and then reloaded into
GUI2Exe - Thanks to Ken Seehart;
- Items in list controls can now be added with a right-click menu
(other than the usual Ctrl+A keyboard shortcut) - Thanks to many
users.

This are more or less the news. I would really appreciate all
comments, suggestions, feature requests and bug reports from all of
you whom are willing to test and play with GUI2Exe. Mac users are
particularly welcome as I have no idea if GUI2Exe will even run, and
if py2app will compile without problems.

You can find this very alpha version here:

http://xoomer.alice.it/infinity77/GUI2Exe.zip

Enjoy!

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Hi Andrea,
I have try your great application on my Debian Lenny but I think that the wx version it's too old...
Here my attempt

morgan@debian:~$ python
Python 2.5.2 (r252:60911, Aug 8 2008, 09:22:44)
[GCC 4.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wx
wx.VERSION

(2, 8, 7, 1, '')

morgan@debian:~$ cd projects/GUI2Exe
morgan@debian:~/projects/GUI2Exe$ python GUI2Exe.py
Traceback (most recent call last):
  File "GUI2Exe.py", line 45, in <module>
    from AllIcons import catalog
  File "/home/morgan/projects/GUI2Exe/AllIcons.py", line 5, in <module>
    import wx.lib.embeddedimage
ImportError: No module named embeddedimage
morgan@debian:~/projects/GUI2Exe$

I will try later on my lap with windows XP

regards
Giuseppe

···

________________________________________
Da: wxpython-users-bounces@lists.wxwidgets.org [wxpython-users-bounces@lists.wxwidgets.org] per conto di Andrea Gavana [andrea.gavana@gmail.com]
Inviato: domenica 14 settembre 2008 13.34
A: wxPython-users@lists.wxwidgets.org
Oggetto: [wxpython-users] New GUI2Exe Test Version

Hi All,

    I have finally managed to (almost) finish GUI2Exe, and I just
wanted to make it available to wxPython users as a *very alpha*
release, for those willing to test it, play with it and report back
bugs, inconsistencies, feature requests and so on. I'll release a
final version to the other communities when I am almost sure that
everything goes as smooth as possible.

Read carefully
---------------------
**__NOTE__** : If you are an existing GUI2Exe user, please *backup*
the existing GUI2Exe database (with another name) and *delete* the
existing database. For Windows users, the existing database is located
in a directory more or less like this:

C:\\Documents and Settings\\THEUSER\\Application
Data\\.GUI2Exe\\GUI2Exe_database.db

This is because I am still writing an intelligent enough routine to
convert the old database format to the new one. This step is *very*
important.

Now, about the news. I have tested GUI2Exe on Windows XP SP2, Python
2.5.2, wxPython 2.8.8.1 unicode and on Ubuntu Hardy with the same
Python and wxPython configurations. I have no idea on the behavior of
GUI2Exe on Mac, and I don't even know if the code I have written for
PY2APP will work correctly. I have contacted one Mac-user off-list to
test my latest GUI2Exe but I have never got any answer back. Probably
my e-mail didn't get through.

What's new
-----------------

I will give an almost full changelog when the final version will
appear, but for the moment this is what I did:
- Implemented support for py2app (Mac), PyInstaller (all platforms ?),
cx_Freeze (Windows & GTK), bbFreeze (Windows & GTK);
- Extended the support for py2exe. Multiple executables are now
possible - Thanks to Werner Bruhin;
- Possibility to add data_files using a directory-recursive approach -
Thanks to Mike Driscoll;
- Possibility to change the Python version used to build the
executable - Thanks to Mike Driscoll;
- Possibility to view the full build output coming from the compiler
- Thanks to Tal Einat;
- "Super" tooltips for Windows & GTK users to better understand the
various options - almost completed, Thanks to Tal Einat;
- Now GUI2Exe project can be saved also to a file (and not only in the
database): GUI2Exe project may be exported and checked into version
control software like CVS or SVN, modified and then reloaded into
GUI2Exe - Thanks to Ken Seehart;
- Items in list controls can now be added with a right-click menu
(other than the usual Ctrl+A keyboard shortcut) - Thanks to many
users.

This are more or less the news. I would really appreciate all
comments, suggestions, feature requests and bug reports from all of
you whom are willing to test and play with GUI2Exe. Mac users are
particularly welcome as I have no idea if GUI2Exe will even run, and
if py2app will compile without problems.

You can find this very alpha version here:

http://xoomer.alice.it/infinity77/__GUI2Exe__.zip

Enjoy!

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Ai sensi della Legge 196/03 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario.
Qualora il messaggio Le fosse pervenuto per errore, la preghiamo di eliminarlo
senza copiarlo e di non inoltrarlo a terzi, dandocene gentilmente comunicazione.
Grazie.

This message, for the law 196/03, may contain confidential and/or privileged
information. If you are not the addressee you must not use, copy, disclose or
take any action based on this message or any information herein If you have received this message in error, please advise the sender immediately and delete
this message. Thank you for your cooperation

E' nata IDICard, la carta prepagata ricaricabile sicura e flessibile,
che ti offre agevolazioni e sostiene la ricerca scientifica ed i progetti umanitari dell'IDI Sanita'

Hi Giuseppe,

Hi Andrea,
I have try your great application on my Debian Lenny but I think that the wx version it's too old...
Here my attempt

morgan@debian:~$ python
Python 2.5.2 (r252:60911, Aug 8 2008, 09:22:44)
[GCC 4.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wx
wx.VERSION

(2, 8, 7, 1, '')

morgan@debian:~$ cd projects/GUI2Exe
morgan@debian:~/projects/GUI2Exe$ python GUI2Exe.py
Traceback (most recent call last):
File "GUI2Exe.py", line 45, in <module>
   from AllIcons import catalog
File "/home/morgan/projects/GUI2Exe/AllIcons.py", line 5, in <module>
   import wx.lib.embeddedimage
ImportError: No module named embeddedimage
morgan@debian:~/projects/GUI2Exe$

Ops, sorry, I have converted my images using the new version of img2py
but without keeping the back-compatibility for older wxPython
versions... I don't really know if there is a way to do that, as
img2py by default does this:

from wx.lib.embeddedimage import PyEmbeddedImage

... so I think the only way to support older wxPython versions is to
use the old img2py. You may still be able to use GUI2Exe if you edit
GUI2Exe on line 1197 and replace this line:

return catalog[bmpName].GetBitmap()

With this line:

return wx.Bitmap(opj(self.installDir + "/" + bmpName + ".png"),
wx.BITMAP_TYPE_ANY)

In this way, GUI2Exe will grab the icons from the "images" directory.
Sorry for this confusion...

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Sun, Sep 14, 2008 at 1:13 PM, Giuseppe Costanzi wrote:

Ciao Andrea,
Well, I change the code at line 1197 and even on
line 307:
from
def SetProperties(self):
        """ Sets the main frame properties (title, icon...). """

        self.SetIcon(wx.IconFromBitmap(self.CreateBitmap("GUI2Exe")))

to
def SetProperties(self):
        """ Sets the main frame properties (title, icon...). """

        self.SetIcon(wx.IconFromBitmap(self.CreateBitmap("images/GUI2Exe.ico")))

line 1483:
from
bmp = catalog["gui2exe_splash"].GetBitmap()
        AS.AdvancedSplash.__init__(self, None, bitmap=bmp, timeout=5000,
                                   extrastyle=AS.AS_TIMEOUT|AS.AS_CENTER_ON_SCREEN)

to
bmp = wx.Bitmap(opj("images/MyImage.png"),
                         wx.BITMAP_TYPE_ANY)
        AS.AdvancedSplash.__init__(self, None, bitmap=bmp, timeout=5000,
                                   extrastyle=AS.AS_TIMEOUT|AS.AS_CENTER_ON_SCREEN)

and 'finally' it start although there are other errors with icons and images.
Here a part of log file
03:11:28 PM: Can't load image from file '/home/morgan/projects/GUI2Exe/images/GUI2Exe.ico.png': file does not exist.
03:11:28 PM: Can't load image from file '/home/morgan/projects/GUI2Exe/project.png': file does not exist.
03:11:28 PM: Can't load image from file '/home/morgan/projects/GUI2Exe/switch_db.png': file does not exist.
03:11:28 PM: Can't load image from file '/home/morgan/projects/GUI2Exe/save_project.png': file does not exist.
etx,etc
Anyway the gui is show but when I try to create a new project (menu/ New Project the application crash on busy message (creating new prject)
after one or two seconds
I try to trace with something like

try:

except:
            print sys.exc_value
            print sys.exc_type

activating redirect = True on App istance but the application crash again without an error

If you like I will test your app more deeply on my distro and report you my note
Anyway thanks for your powerfull job!
Giuseppe

···

________________________________________
Da: wxpython-users-bounces+g.costanzi=idi.it@lists.wxwidgets.org [wxpython-users-bounces+g.costanzi=idi.it@lists.wxwidgets.org] per conto di Andrea Gavana [andrea.gavana@gmail.com]
Inviato: domenica 14 settembre 2008 14.22
A: wxpython-users@lists.wxwidgets.org
Oggetto: Re: R: [wxpython-users] New GUI2Exe Test Version

Hi Giuseppe,

On Sun, Sep 14, 2008 at 1:13 PM, Giuseppe Costanzi wrote:

Hi Andrea,
I have try your great application on my Debian Lenny but I think that the wx version it's too old...
Here my attempt

morgan@debian:~$ python
Python 2.5.2 (r252:60911, Aug 8 2008, 09:22:44)
[GCC 4.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wx
wx.VERSION

(2, 8, 7, 1, '')

morgan@debian:~$ cd projects/GUI2Exe
morgan@debian:~/projects/GUI2Exe$ python GUI2Exe.py
Traceback (most recent call last):
File "GUI2Exe.py", line 45, in <module>
   from AllIcons import catalog
File "/home/morgan/projects/GUI2Exe/AllIcons.py", line 5, in <module>
   import wx.lib.embeddedimage
ImportError: No module named embeddedimage
morgan@debian:~/projects/GUI2Exe$

Ops, sorry, I have converted my images using the new version of img2py
but without keeping the back-compatibility for older wxPython
versions... I don't really know if there is a way to do that, as
img2py by default does this:

from wx.lib.embeddedimage import PyEmbeddedImage

... so I think the only way to support older wxPython versions is to
use the old img2py. You may still be able to use GUI2Exe if you edit
GUI2Exe on line 1197 and replace this line:

return catalog[bmpName].GetBitmap()

With this line:

return wx.Bitmap(opj(self.installDir + "/" + bmpName + ".png"),
wx.BITMAP_TYPE_ANY)

In this way, GUI2Exe will grab the icons from the "images" directory.
Sorry for this confusion...

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Ai sensi della Legge 196/03 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario.
Qualora il messaggio Le fosse pervenuto per errore, la preghiamo di eliminarlo
senza copiarlo e di non inoltrarlo a terzi, dandocene gentilmente comunicazione.
Grazie.

This message, for the law 196/03, may contain confidential and/or privileged
information. If you are not the addressee you must not use, copy, disclose or
take any action based on this message or any information herein If you have received this message in error, please advise the sender immediately and delete
this message. Thank you for your cooperation

E' nata IDICard, la carta prepagata ricaricabile sicura e flessibile,
che ti offre agevolazioni e sostiene la ricerca scientifica ed i progetti umanitari dell'IDI Sanita'

Andrea Gavana <andrea.gavana <at> gmail.com> writes:

Hi All,

    I have finally managed to (almost) finish GUI2Exe, and I just
wanted to make it available to wxPython users as a *very alpha*
release, for those willing to test it, play with it and report back
bugs, inconsistencies, feature requests and so on. I'll release a
final version to the other communities when I am almost sure that
everything goes as smooth as possible.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
_______________________________________________
wxpython-users mailing list
wxpython-users <at> lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Hi Andrea,

I'm not a GUI2exe user and even I never tested it. Howerver, I have a small
comment.

From what I understand, GUI2xe relies on the bsddb module, I find this

annoying, may I suggest to use sqlite instead.

Argumentation:

- It seems the bsddb has always been a trouble for a lot of Python users (*).
- sqlite has become the small and de facto standard included db for every Python
distribution. If not so powerful as bsddb, it should be good enough
for that job.
- As a consequence of (*), bsddb will no more be part of the Python 3
distribution (see Python 3000 dev-list) and if I recall correctly the
use of bsddb in Python 2.6 will generate a deprecation warning, unless
you use the dedicated but separately available module.

Regards,
Jean-Michel Fauth, Switzerland

Hi Jean-Michel,

>From what I understand, GUI2xe relies on the bsddb module, I find this
annoying, may I suggest to use sqlite instead.

Argumentation:

- It seems the bsddb has always been a trouble for a lot of Python users (*).
- sqlite has become the small and de facto standard included db for every Python
distribution. If not so powerful as bsddb, it should be good enough
for that job.
- As a consequence of (*), bsddb will no more be part of the Python 3
distribution (see Python 3000 dev-list) and if I recall correctly the
use of bsddb in Python 2.6 will generate a deprecation warning, unless
you use the dedicated but separately available module.

I didn't know about this... I used bsddb because it allows me to save
and load a Python class very easily, and it only requires a sync() and
close() method to work. Everything is stored in a dictionary-like
structure, without the hassle of connect(), execute("create table blah
blah blah") and the other mess related to sqlite. One of the reason
why SQLAlchemy has been created is also to simplify the life of sqlite
users, but unfortunately SQLAlchemy is not in the Python standard
distribution.
In any case, in the light of the near future deprecation of bsddb, I
will need for sure to change the database backends. I'll look into
sqlite, even if I already know I will hate its syntax.
For the moment, for those who are testing GUI2Exe, please do not fill
your database with important things, as the backend may change very
soon. If you can, just play with GUI2Exe and maybe report back your
findings...

Thank you for the advice, Jean-Michel.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Sun, Sep 14, 2008 at 3:03 PM, Jean-Michel Fauth wrote:

Ciao Giuseppe,

and 'finally' it start although there are other errors with icons and images.
Here a part of log file
03:11:28 PM: Can't load image from file '/home/morgan/projects/GUI2Exe/images/GUI2Exe.ico.png': file does not exist.
03:11:28 PM: Can't load image from file '/home/morgan/projects/GUI2Exe/project.png': file does not exist.
03:11:28 PM: Can't load image from file '/home/morgan/projects/GUI2Exe/switch_db.png': file does not exist.
03:11:28 PM: Can't load image from file '/home/morgan/projects/GUI2Exe/save_project.png': file does not exist.
etx,etc

Thank you for testing it. Actually the correct line should have been:

return wx.Bitmap(opj(self.installDir + "/images/" + bmpName + ".png"),
wx.BITMAP_TYPE_ANY)

I wrote a wrong line of code in my last e-mail. In any case, I
re-created the Python file which holds the icons using an older
version of img2py, You can find it here:

http://xoomer.alice.it/infinity77/AllIcons.zip

It should work with older versions of wxPython without any
modification to the code (i.e., you can revert back the changes you
made in the code).

Anyway the gui is show but when I try to create a new project (menu/ New Project the application crash on busy message (creating new prject)
after one or two seconds
I try to trace with something like

try:

except:
           print sys.exc_value
           print sys.exc_type

activating redirect = True on App istance but the application crash again without an error

Uhm, this one I don't know... it worked fine in my VMWare Virtual
Machine using Ubuntu Hardy :frowning:

If you like I will test your app more deeply on my distro and report you my note

Thank you for your suggestions and for testing GUI2Exe on your platform.

Andrea.

···

On Sun, Sep 14, 2008 at 2:41 PM, Giuseppe Costanzi wrote:

Andrea Gavana <andrea.gavana <at> gmail.com> writes:

Hi Jean-Michel,

...

I didn't know about this... I used bsddb because it allows me to save
and load a Python class very easily, and it only requires a sync() and
close() method to work. Everything is stored in a dictionary-like
structure, without the hassle of connect(), execute("create table blah
blah blah")

In that case, pickling (pickle module) a well defined and structured dict
could be a viable solution. I do not know, I have the feeling you
just need something to easily dump and recover some information.

Jean-Michel Fauth, Switzerland

Andrea Gavana <andrea.gavana <at> gmail.com> writes:

Hi Jean-Michel,

...

In any case, in the light of the near future deprecation of bsddb, I
will need for sure to change the database backends. I'll look into
sqlite, even if I already know I will hate its syntax.

I have reread your reply. bsddb will not be deprecated. Due to its
complexity and the maintenance it requires, it will no more be a part
of the standard Python distribution.

The whole story:
http://mail.python.org/pipermail/python-3000/2008-September/014751.html

Jean-Michel Fauth, Switzerland

Andrea Gavana wrote:

I have contacted one Mac-user off-list to
test my latest GUI2Exe but I have never got any answer back. Probably
my e-mail didn't get through.

It did -- sorry, I've just been busy. To hope to give it a try soon! Feel free to keep pestering me!

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Andrea Gavana wrote:

I didn't know about this... I used bsddb because it allows me to save
and load a Python class very easily, and it only requires a sync() and
close() method to work. Everything is stored in a dictionary-like
structure, without the hassle of connect(), execute("create table blah
blah blah") and the other mess related to sqlite.

Why not just use pickle? Or better yet, human-readable text files, or maybe XML vis elementtree.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Andrea,

It looks good!

A few comments and questions.

- why is "email" added to the excludes list?
- activating the zipfile option gives me an error when doing DryRun - "zipfile" not defined

How will "egg" type packages (such as SQLAlchemy) get handled? I am not sure if py2exe supports yet. I am using some work around which I found doing some googling some time ago.

Will try to do some more testing later this week.

Werner

Hi Werner,

Andrea,

It looks good!

Thank you :smiley:

A few comments and questions.

- why is "email" added to the excludes list?

For no particular reason: it never happened to me to use the email
module, and in the past (with older versions of py2exe) sometimes it
got included, so I took the habit of excluding it. If you wish to
remove it from the excludes list, simply right click on the email item
and select "Delete selected". If you want to remove it forever from
the excludes list, simply edit the "defaultConfig.txt" file and remove
the email module from the py2exe options.

- activating the zipfile option gives me an error when doing DryRun -
"zipfile" not defined

Uhm, this one I don't know. The dry run option didn't work very well
in py2exe 0.6.6 (unless you applied an old patch I had on my website),
it crashed with some misterious error. But I haven't tried it with
py2exe 0.6.8, I'll do it as soon as I get at home.

How will "egg" type packages (such as SQLAlchemy) get handled? I am not
sure if py2exe supports yet. I am using some work around which I found
doing some googling some time ago.

As far as I know, there is no support for egg files in py2exe. But if
you have a workaround (in code) that goes in your usual Setup.py file,
in GUI2Exe you can add custom code which will be written and
automatically executed by GUI2Exe. Simply choose "Options" ==> "Add
custom code" and paste your custom code there. For example, I have
this custom code in my GUI2Exe-generated Setup.py file:

try:
    # if this doesn't work, try import modulefinder
    import py2exe.mf as modulefinder
    import win32com
    for p in win32com.__path__[1:]:
        modulefinder.AddPackagePath("win32com", p)
    for extra in ["win32com.shell", "win32com.server"]: #,"win32com.mapi"
        __import__(extra)
        m = sys.modules[extra]
        for p in m.__path__[1:]:
            modulefinder.AddPackagePath(extra, p)
except ImportError:
    # no build path setup, no worries.
    print "\n\n ==========> ERROR <===========\n\n"
    pass

Which handles win32com quirks.

Will try to do some more testing later this week.

Thank you for this, it is really appreciated.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Mon, Sep 15, 2008 at 4:07 PM, Werner F. Bruhin wrote:

Werner F. Bruhin wrote:

Andrea,

It looks good!

A few comments and questions.

- why is "email" added to the excludes list?
- activating the zipfile option gives me an error when doing DryRun - "zipfile" not defined

How will "egg" type packages (such as SQLAlchemy) get handled? I am not sure if py2exe supports yet. I am using some work around which I found doing some googling some time ago.

Will try to do some more testing later this week.

Werner

This is weird. I used Andrea's old GUI2Exe on my newly converted wx+sqlalchemy app and it compiled just fine and the executable runs just fine. My SqlAlchemy is version 0.5.0beta3 (and yes, it's an egg-type package). I have optimize and compress set to 2, and the "bundle files" option set to 3.

Not sure if that will help though. However, if you actually look in something that's been installed as an egg, you'll notice that it just gets unzipped into a folder that's labeled "egg" at the end and the easy_install.pth file is updated to point at it. Other than that, an egg folder isn't that much different than a normal package.

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

Hi All,

Werner F. Bruhin wrote:

Andrea,

It looks good!

A few comments and questions.

- why is "email" added to the excludes list?
- activating the zipfile option gives me an error when doing DryRun -
"zipfile" not defined

How will "egg" type packages (such as SQLAlchemy) get handled? I am not
sure if py2exe supports yet. I am using some work around which I found
doing some googling some time ago.

This is weird. I used Andrea's old GUI2Exe on my newly converted
wx+sqlalchemy app and it compiled just fine and the executable runs just
fine. My SqlAlchemy is version 0.5.0beta3 (and yes, it's an egg-type
package). I have optimize and compress set to 2, and the "bundle files"
option set to 3.

I use SQLAlchemy too in 2 of my apps, and I have never had any problem
in packaging them with py2exe. Mike's explanation below reflects
exactly what I was thinking today. The only "non-reducible" eggs I
have found up to now is PyOpenGL, for which a special workaround was
needed to get py2exe working with its egg.

Not sure if that will help though. However, if you actually look in
something that's been installed as an egg, you'll notice that it just gets
unzipped into a folder that's labeled "egg" at the end and the
easy_install.pth file is updated to point at it. Other than that, an egg
folder isn't that much different than a normal package.

Mike, did you have any chance to test the new GUI2Exe test version :smiley: ?

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Mon, Sep 15, 2008 at 8:18 PM, Mike Driscoll wrote:

Mike,

Mike Driscoll wrote:

Werner F. Bruhin wrote:

Andrea,

It looks good!

A few comments and questions.

- why is "email" added to the excludes list?
- activating the zipfile option gives me an error when doing DryRun - "zipfile" not defined

How will "egg" type packages (such as SQLAlchemy) get handled? I am not sure if py2exe supports yet. I am using some work around which I found doing some googling some time ago.

Will try to do some more testing later this week.

Werner

This is weird. I used Andrea's old GUI2Exe on my newly converted wx+sqlalchemy app and it compiled just fine and the executable runs just fine. My SqlAlchemy is version 0.5.0beta3 (and yes, it's an egg-type package). I have optimize and compress set to 2, and the "bundle files" option set to 3.

Not sure if that will help though. However, if you actually look in something that's been installed as an egg, you'll notice that it just gets unzipped into a folder that's labeled "egg" at the end and the easy_install.pth file is updated to point at it. Other than that, an egg folder isn't that much different than a normal package.

That is interesting.

I think it might depend on how the egg is being installed.

I am on 0.5.0beta3 too, but I also have the older 0.4 on my machine (i.e. egg's are installed with the multi version switch) I can switch between the two with code like this:

if not hasattr(sys, 'frozen'):
    import pkg_resources
    pkg_resources.require("sqlalchemy") # get latest version
## pkg_resources.require("sqlalchemy==0.4.3") # use a specific version

When I then first tried to generated an exe with py2exe I got errors (this is a few month ago, so can't give you details) and searching on the py2exe list and on google I ended up adding some code (done by Simon King) - to the setup.py and I also recall that the py2exe maintainers confirmed that it does not support egg's out of the box.

Werner

Andrea,

< snip >

This are more or less the news. I would really appreciate all
comments, suggestions, feature requests and bug reports from all of
you whom are willing to test and play with GUI2Exe. Mac users are
particularly welcome as I have no idea if GUI2Exe will even run, and
if py2app will compile without problems.

You can find this very alpha version here:

http://xoomer.alice.it/infinity77/__GUI2Exe__.zip

Enjoy!

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

This is pretty cool stuff. I noticed that your program or py2exe is reading the easy_install.pth file somehow. At least, I've noticed that if the path file is missing an entry and I add it, then GUI2Exe finds the modules. I wondered why I sometimes needed to add the package and sometimes I didn't.

I'm testing in a virtual machine, so it'll be a while before I get all the modules I need to do all my programs.

Mike

Werner F. Bruhin wrote:

Mike,

Mike Driscoll wrote:

Werner F. Bruhin wrote:

Andrea,

It looks good!

A few comments and questions.

- why is "email" added to the excludes list?
- activating the zipfile option gives me an error when doing DryRun - "zipfile" not defined

How will "egg" type packages (such as SQLAlchemy) get handled? I am not sure if py2exe supports yet. I am using some work around which I found doing some googling some time ago.

Will try to do some more testing later this week.

Werner

This is weird. I used Andrea's old GUI2Exe on my newly converted wx+sqlalchemy app and it compiled just fine and the executable runs just fine. My SqlAlchemy is version 0.5.0beta3 (and yes, it's an egg-type package). I have optimize and compress set to 2, and the "bundle files" option set to 3.

Not sure if that will help though. However, if you actually look in something that's been installed as an egg, you'll notice that it just gets unzipped into a folder that's labeled "egg" at the end and the easy_install.pth file is updated to point at it. Other than that, an egg folder isn't that much different than a normal package.

That is interesting.

I think it might depend on how the egg is being installed.

I am on 0.5.0beta3 too, but I also have the older 0.4 on my machine (i.e. egg's are installed with the multi version switch) I can switch between the two with code like this:

if not hasattr(sys, 'frozen'):
   import pkg_resources
   pkg_resources.require("sqlalchemy") # get latest version
## pkg_resources.require("sqlalchemy==0.4.3") # use a specific version

When I then first tried to generated an exe with py2exe I got errors (this is a few month ago, so can't give you details) and searching on the py2exe list and on google I ended up adding some code (done by Simon King) - to the setup.py and I also recall that the py2exe maintainers confirmed that it does not support egg's out of the box.

Py2app has similar issues with eggs. If the egg is just plain python then making sure it is installed in an unzipped state will take care of the problem. But if the egg has data in it that needs to be included, or if the egg is used as a plugin (or its meta data needs to be accessed at runtime by pkg_resources for any other reason) then you'll have problems if the package is included with the normal py2app (and presumably py2exe too) mechanisms.

For one of my apps I had to tell py2app to exclude the eggs from the zip file and then manually copy the egg dirs into the bundle from my setup.py, and also write a sitecustomize.py to include in the bundle that would setup the sys.path correctly to load the eggs. I haven't yet tried a py2exe setup for that application yet, but expect I'll need to do something similar.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Andrea Gavana wrote:

Hi Jean-Michel,

- As a consequence of (*), bsddb will no more be part of the Python 3
distribution (see Python 3000 dev-list) and if I recall correctly the
use of bsddb in Python 2.6 will generate a deprecation warning, unless
you use the dedicated but separately available module.

I didn't know about this...

It's just happened in the last couple weeks. It will still be included with Python in 2.6 and maybe 2.7 if there is one, and it will still be available as a separately maintained package via PyPI for all active versions of Python including 3.0+.

I used bsddb because it allows me to save
and load a Python class very easily, and it only requires a sync() and
close() method to work.

It's really sad that this is happening, both since PyBSDDB was once my foster-child, but also because it is so dang powerful considering its relative simple API. The current maintainer of the package is using it with a distributed data storage system (IOW, spread across multiple servers that are not sharing disks) that totals over 200 terabytes of storage and has about 2**35 objects stored within it. So although Python is taking several steps forward with 3.0, removing this package from the core distribution seems like one step back to me.

Ok, I'll get off my soapbox now.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Andrea,

Hi All,

Werner F. Bruhin wrote:
    

Andrea,

It looks good!

A few comments and questions.

- why is "email" added to the excludes list?
- activating the zipfile option gives me an error when doing DryRun -
"zipfile" not defined

How will "egg" type packages (such as SQLAlchemy) get handled? I am not
sure if py2exe supports yet. I am using some work around which I found
doing some googling some time ago.
      
This is weird. I used Andrea's old GUI2Exe on my newly converted
wx+sqlalchemy app and it compiled just fine and the executable runs just
fine. My SqlAlchemy is version 0.5.0beta3 (and yes, it's an egg-type
package). I have optimize and compress set to 2, and the "bundle files"
option set to 3.
    
I use SQLAlchemy too in 2 of my apps, and I have never had any problem
in packaging them with py2exe. Mike's explanation below reflects
exactly what I was thinking today. The only "non-reducible" eggs I
have found up to now is PyOpenGL, for which a special workaround was
needed to get py2exe working with its egg.

Not sure if that will help though. However, if you actually look in
something that's been installed as an egg, you'll notice that it just gets
unzipped into a folder that's labeled "egg" at the end and the
easy_install.pth file is updated to point at it. Other than that, an egg
folder isn't that much different than a normal package.
    
Mike, did you have any chance to test the new GUI2Exe test version :smiley: ?

Andrea.

Yes, I downloaded the new GUI2Exe about an hour before I had to leave work. I installed it in a virtual machine and was trying to get it to work with one of my most complicated programs. I think it was working, but I import too many external packages, so I'll need to download the rest of them before I can really say one way or the other.

Oh, I did notice that it didn't warn me that it couldn't find reportlab even though I didn't have it installed. It went ahead and compiled with no complaints until I actually tried to run it. However, when I didn't have dateutil installed, it did complain. Not sure what the cause of that is, but thought you might like to know. I can't recall if the original version had the same issue or not though.

Mike

···

On Mon, Sep 15, 2008 at 8:18 PM, Mike Driscoll wrote: