From: Bruce S. <Bru...@nc...> - 2004-09-09 17:51:47
|
I'm not competent to comment directly, but could you perhaps handle this with more distance between your main application and the VPython viewer? For example, I have a Python program that helps with the logistics of grading student programs written in VPython (for an introductory physics course). The key statement is "exec(text)", where text was read from a file (exec is in the os module). At least as an experiment, you could write out information for VPython, do an exec of the VPython program, read up that information, and make the 3D display. Crude, inefficient, but it's hard to see how it could fail to work. Bruce Sherwood Fionn Behrens wrote: >Hi all, > > >I have asked earlier, I do it again. We have a project here that needs 3d >output. the UI itself ist done in python-gtk. >We fail to manage starting vpython out of our gtk application. First the >two mainloops collided, so people told us to use python-gtk2 and threads. > >So we switched the Ui to python-gtk2 and use threads. Similar to the >tk-demo thats coming with python-visual, we start python-visual in its own >thread. >The good news: no more mainloop clashing. The bad news: It segfaults >immediately, leaving loads of messages on the screen that look like this: > >(<unknown>:13237): GLib-CRITICAL **: file ghash.c: line 225 (g_hash_table_lookup): assertion `hash_table != NULL' failed >(<unknown>:13237): Gtk-WARNING **: gtk_type_create(): unknown parent type `21'. >(<unknown>:13237): GLib-CRITICAL **: file ghash.c: line 225 (g_hash_table_lookup): assertion `hash_table != NULL' failed >(<unknown>:13237): GLib-CRITICAL **: file ghash.c: line 291 (g_hash_table_insert): assertion `hash_table != NULL' failed >(<unknown>:13237): GLib-CRITICAL **: file ghash.c: line 225 (g_hash_table_lookup): assertion `hash_table != NULL' failed >(<unknown>:13237): GLib-CRITICAL **: file ghash.c: line 291 (g_hash_table_insert): assertion `hash_table != NULL' failed >(<unknown>:13237): GLib-CRITICAL **: file ghash.c: line 225 (g_hash_table_lookup): assertion `hash_table != NULL' failed >(<unknown>:13237): GLib-CRITICAL **: file ghash.c: line 291 (g_hash_table_insert): assertion `hash_table != NULL' failed >(<unknown>:13237): GLib-CRITICAL **: file ghash.c: line 225 (g_hash_table_lookup): assertion `hash_table != NULL' failed >(<unknown>:13237): Gtk-WARNING **: gtk_type_create(): unknown parent type `21'. >(<unknown>:13237): Gtk-CRITICAL **: file gtktypeutils.c: line 337 (gtk_type_class): assertion `node != NULL' failed. >(<unknown>:13237): Gtk-WARNING **: gtk_arg_type_new(): argument class in "GtkContainer::border_width" is not in the `(null)' ancestry > >... > >Please, please, if anyone EVER managed to start vpython from a gtk gui or >has any tip on what might have gone wrong, send it! > >Desperate, > Fionn > > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 >Project Admins to receive an Apple iPod Mini FREE for your judgement on >who ports your project to Linux PPC the best. Sponsored by IBM. >Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php >_______________________________________________ >Visualpython-users mailing list >Vis...@li... >https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |