On Mon, 2004-03-01 at 14:53, Thomas Moore wrote:
> Hi:
>
> I think I figure it out.
>
> Here is the code I've tried:
>
> ----------------------------------------------------------------------------
> -------------
> import os
> import pygtk
> import gtk
> import gobject
>
> os.environ['PATH'] += ";lib;etc;bin;"
>
> def hello_cb(button):
> print "Hello World"
> window.destroy()
>
> window = gtk.Window(gtk.WINDOW_TOPLEVEL) # create a top level window
> window.connect("destroy", gtk.mainquit) # quit the event loop on
> destruction
> window.set_border_width(10) # set padding round child widget
>
> button = gtk.Button("Hello World")
> button.connect("clicked", hello_cb) # call hello_cb when clicked
> window.add(button) # add button to window
> button.show() # show button
>
> window.show()
> gtk.main()
>
> ----------------------------------------------------------------------------
> -------------
>
> After running py2exe, copy everything in
> C:\Python23\Lib\site-packages\gtk-2.0 to dist\.
> And then copy etc\, bin\, and lib\ in C:\GTK to dist\,
> which corresponds to os.environ['PATH'] += ";lib;etc;bin;"
>
> Now, you should have a runnable executable.
Out of interest, how large is the executable file after this process?
Periodically this kind of thing comes up with clients and I am never
sure if creating executables like this is a pragmatic solution or not.
Malcolm
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/