OK, THANK YOU!!! I created "build" directory and library.zip inside with cx_Freeze. I copied library.zip to Construct/Data/Python directory... But, when I'm running example (pygtk_screenshot.cap) I have error:
[quote:2lf4woae]Traceback (most recent call last):
File "<string>", line 9, in <module>
File "C:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line 30, in <module>
import gobject as _gobject
File"C:\Python26\lib\site-packages\gtk-2.0\gobject\__init__.py", line 26, in <module>
from glib import spawn _async, idle _add, timeout _add, timeout _add_seconds, File"C:\Python26\lib\site-packages\gtk-2.0\glib\__init__.py", line 22, in <module>
grom glib._glib import *
ImportError: DLL load failed
What's wrong? I'm sorry for my questions ;/...
EDIT:
My "test.py" file was:
[quote:2lf4woae]import sys
import pygtk
if not sys.platform == 'win32':
pygtk.require('2.0')
import gtk
# Either "png" or "jpeg"
format = "jpeg"
width = gtk.gdk.screen_width()
height = gtk.gdk.screen_height()
screenshot = gtk.gdk.Pixbuf.get_from_drawable(
gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, width, height),
gtk.gdk.get_default_root_window(),
gtk.gdk.colormap_get_system(),
0, 0, 0, 0, width, height)
screenshot.save("screenshot." + format, format, {"quality": "70"})
And my setup.py file was:
[quote:2lf4woae]
from cx_Freeze import setup, Executable
setup(
name = "scr",
version = "0.1",
description = "scr",
executables = [Executable("test.py")])