cxfreeze on ubuntu 9.10

2010-03-24 Thread Waspinator
Hi,

I'm trying to compile a python script on Ubuntu 9.10. It uses the gtk
toolkit. I tried to run GUI2EXE for a cxfreeze gui, but even after
installing wxPython in synaptic it still complains about not having
it.

I also tried to use cxfreeze by itself but the file it produces does
not run.

I tried to follow the information at 
http://cx-freeze.sourceforge.net/cx_Freeze.html

I created a setup.py file that looks like this (from the page)

from cx_Freeze import setup, Executable

setup(
name = "gtk_test",
version = "0.1",
description = "gtk_test",
executables = [Executable("gtk_test.py")])

and ran:

python setup.py build


When I try to run the executable I get the following error:

../build/exe.linux-i686-2.6/library.zip/gtk/_gtk.py:12:
RuntimeWarning: tp_compare didn't return -1 or -2 for exception
ImportError: could not import gio
ImportError: could not import gio
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/cx_Freeze/initscripts/
Console.py", line 29, in 
exec code in m.__dict__
  File "gtk_test.py", line 274, in 
  File "gtk_test.py", line 228, in main
AttributeError: 'module' object has no attribute 'Window'

I was thinking of using the 'copy-dependent-files' option but I'm not
sure how.

Any ideas?

Thanks
-- 
http://mail.python.org/mailman/listinfo/python-list


How can I bundle a PyGTK program in windows so my users don't need to install Python or the GTK+ libs?

2010-08-16 Thread Waspinator
I found this question on 
http://faq.pygtk.org/index.py?file=faq21.005.htp&req=show
but the answer did not help me.

For example I have a simple program below that I would like to
'compile' with py2exe (or anything else if it's simpler) to run in
windows as a single bundled executable file with no installation (no
INNO setup), and no requirements for gtk or python installations. I
doesn't matter if the .exe file is 30 MB to only display a hello world
app, as long as it works. (although the smaller the better)

The application already works in my windows test environment because I
have installed python 2.6 with pygtk and a gtk bundle.

Can someone please provide some simple and clear instructions on how I
can do this?

Thanks,

Waspinator

simple.py
---
  import gtk

  window = gtk.Window()
  window.set_title("PyGTK Test Window")
  window.connect("destroy", gtk.main_quit)
  window.show_all()

  gtk.main()
---
-- 
http://mail.python.org/mailman/listinfo/python-list