Re: Scripting Language
Ivan Johansen <graph <at> padowan.dk>
2006-12-31 22:32:55 GMT
Conrad B Ammon wrote:
> I wanted to post this in the newsgroups, but I'm having trouble with my
> ISP, so I'll email it instead
It end up in the same place anyway.
> Someone brought up the idea of making a scripting language so they could
> make families of functions, and things like that.
Yes, but though it could be fun, I never planned to create my own
scripting language.
> It may be less of a pain to simply integrate a language such as Python
> into Graph. This way there is not and endless list of feature requests
> in the scripting langauge. All you have to do is give a decent API to
> edit the graphs with, and then any "new feature" requests can be replied
> to with proper net-speak such as lrn2python or lrn2ruby because you KNOW
> the language has support for it!
It is funny you should say that, because I have been looking into
embedding Python into Graph as a scripting language.
> 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
Borland VCL, while it seems that Tkinter is popular in Python. But I
think I can make it work as long as only one script is being executed at
a time, which probably will be most common anyway.
> If you don't have much time to do this, I'd happily help!
Time is always a limited resource, so the help is appreciated.
You can try the beta version of Graph 4.3 at
http://padowan.dk/graph/DownloadBeta.php which has a little support for
plugins. I would like to hear what you think about it.
It requires Python 2.5 to be installed for the plugins to work. It
installs an example of a plugin named Circle.py. The file GraphUtil.py
is not a plugin but the file that loads the plugins.
Notice that it is still only a proof of concept. There are only two
functions in Graph the script can call, and there are no error handling.
Best regards
Ivan Johansen
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV