<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-2" http-equiv=Content-Type>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#d8d0c8>
<DIV><FONT face=Arial size=2>chtel bych se zeptat jak vam chodi nove pygtk2.4 ve
win ? jelikoz jsem doma updatoval na linuxu knihovny a python,chtel jsem povysit
i v praci na win. tak jsem nainstaloval "Gtk+ Development Environment for
Windows 2.4-rc22" a pygtk2.4.0 vsechno behalo v poradku,az najednou nejake veci
ktere sly predtim spustit prestaly chodit :( s hlasenim</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CE" size=2>RuntimeError: can't create
const<BR>RuntimeError: can't create const</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CE" size=2>Traceback (most recent call last):<BR>
File "C:\ROTAXMAME\simple.py", line 1, in -toplevel-<BR>
import gtk<BR> File
"C:\Python23\Lib\site-packages\gtk-2.0\gtk\__init__.py", line 97, in
-toplevel-<BR> load_font = _Deprecated(gdk.Font, 'load_font',
'gdk')<BR>AttributeError: 'module' object has no attribute 'Font'</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CE" size=2>a podobne. neznal treba ani
gtk.Window() :(</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CE" size=2>tak jsem vsechno preinstaloval a hle ono to
bezelo ! ale zase jenom chvili pak se to zaclo opakovat. hledal jsem na
internetu a postupoval podle rad. odinstalovat,vyhledat jestli nejsou
nejake knihovny v system32 atd. tak jsem vsechno zase nainstaloval a opet nic
:(</FONT></DIV>
<DIV><FONT face="Arial CE" size=2>kdyz jsem mel gtk runtime 2.2.4 a
pygtk2.2.0 bylo vse v poradku .cesty jsou v poradku . akorat se mi porad debuger
zastavuje u gtk v __init__. trida deprecated. nevite jak 100hoven ? ted nebezi
ani tohle example,ktere napoprve slo.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CE" size=2>import gtk<BR>import string</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CE" size=2>def area_expose_cb(area,
event):<BR> global gc</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CE" size=2> gc =
area.get_style().fg_gc[gtk.STATE_NORMAL]<BR> gc.foreground =
blue<BR> area.window.draw_rectangle(gc, gtk.TRUE, 50, 50, 100,
50)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CE" size=2>if __name__ ==
"__main__":<BR> window = gtk.Window()<BR>
window.set_title("drawing test example")<BR>
window.connect("destroy", gtk.mainquit)<BR> area =
gtk.DrawingArea()<BR> width = 400; hight =
300<BR> area.set_size_request(width,
hight)<BR> window.add(area)<BR> colormap =
area.get_colormap()<BR> blue = colormap.alloc_color(0, 0,
65535)<BR> area.connect("expose-event",
area_expose_cb)<BR> area.show()<BR>
window.show()</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Arial CE" size=2>
gtk.mainloop()<BR></FONT></DIV></BODY></HTML>