On Thu, Dec 04, 2003 at 07:40:25AM +0000, Alessandro Bottoni wrote: > It is an interesting topic for two reasons: > - it is not as clearly defined as it could seem. For example: it is a > "Python interpreter embedded in a PyGTK application" or a > "PyGTK-extended Python app"? Which conceptual model is better suited > to this case? Depending on your approach, you will have to face > different kinds of problems...
Hmm, I can't really see the point here. There isn't really an "embedding" issue when running python code from Python -- you just generate bytecode on-the-fly and have the code processed (internally, when eval() is invoked Python calls PyEval_EvalCode(), which is pretty much what running the interpreter directly does!). > I realized that the available docu is not as useful as I expected > because it focuses on Python/C interaction, that is different and more > complicated than a Python/Python one. Strangely enough, I did not find > any docu regarding a Python interpreted embedded into a Python (PyGTK > or PyQt) application or about any way to communicate with the internal > Python interpreter of these GUI managers. Maybe, it is a too simple > problem to deserve some docu (Just use eval() and exec() in most > cases, I suppose). I don't really see why it should be complicated -- just process Python code entered by the user, possibly sanitizing it to avoid the user doing something "bad". For an example, you should look at the various Python-GTK shells that exist today -- see pygtk-test and others here: http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq23.002.htp Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331 _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
