Its more than just a test case for RPythonic. PyGTK is compiled, so it becomes an issue when used from Python embedded inside Blender, also Blender is using Python3 and i'm not sure what the status is of PyGTK with Python3, is it already working? I found the tutorial thanks, got hello world running, next step python callbacks. -brett from _ctypes_gtk import * gtk_init( ctypes.byref( ctypes.c_int(0) ), ctypes.byref( ctypes.pointer( ctypes.c_char_p(''))) ) winwidget = gtk_window_new(GTK_WINDOW_TOPLEVEL)win = ctypes.cast( winwidget, ctypes.POINTER(GtkWindow) )gtk_window_set_title(win, "ctypes pygtk")gtk_window_set_default_size(win, 320, 240) gtk_signal_connect_full( ctypes.cast(win,ctypes.POINTER(GtkObject)), "destroy", gtk_main_quit, None, None, None, ctypes.c_int(0), ctypes.c_int(0))
frame = gtk_frame_new('hello world')gtk_container_add( ctypes.cast(win, ctypes.POINTER(GtkContainer)), ctypes.cast(frame, ctypes.POINTER(GtkWidget))) gtk_widget_show_all( winwidget )gtk_main()print('exit') --- On Wed, 1/5/11, jbow...@amathaine.com <jbow...@amathaine.com> wrote: From: jbow...@amathaine.com <jbow...@amathaine.com> Subject: Re: [pygtk] pygtk and python3 (ctypes-gtk) To: "Hart's Antler" <bhart...@yahoo.com> Date: Wednesday, 5 January, 2011, 8:39 PM Is there a particular scenario where this would be a better choice than using the PyGTK bindings? Or is this just intended to be a test case for the RPythonic wrapper generator? I'd look at http://zetcode.com/tutorials/gtktutorial/firstprograms/ for some simple C programs to translate - the first example (just show a window) is 4 function calls.
_______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/