Re: Scripting Language
Cort Ammon <cmdrrickhunter <at> yahoo.com>
2007-01-01 01:33:54 GMT
I took a look at the 4.3 beta, and I like the way the plugin interface
was designed, it took me maybe 3 minutes to figure out how to work with
it. For a plugin API, thats short =)
My first instinct is that the problem lies in tk's mainloop() function.
It expects to be the only code that matters, so it will block at will.
I just perused through some of the code for Tk, _tkinter, and python. A
solution might work out if you force developers to use Tk only (as
opposed to the other GUIs Python offers).
It seems that, if you initialized and ran Python on a separate thread,
maintained your own root level Tk object (everyone else uses
Tk.Toplevel), it should work out.
The logic: separate threads for Python and Graph would decouple the
Graph main loop from python (and the eventual Tk.mainloop). And if you
run the Tk main loop, and everyone else's scripts mooch off of it using
Tk.Toplevel windows, you could have windows from multiple scripts open
at the same time (you are the only one calling Tk.mainloop, not them).
Ivan Johansen wrote:
> Conrad B Ammon wrote:
>> This would also open the door to custom UIs as well. A user could
>> import a script, have it generate a family of fuctions, select one and
>> have the Python code create a window with information about that
>> specific function.
> Actually the user interface seems to be the problematic part.
> Unfortunately different GUI frameworks don't interact well. Graph uses