[Kde-bindings] Kross
Sebastian Sauer
mail at dipe.org
Sun Dec 18 23:02:34 UTC 2005
Hi *,
a while ago I wrote about Kross and it's usage within KOffice
( http://lists.kde.org/?l=kde-bindings&m=112637628020341&w=2 ).
We have made very nice progress. So, some infos;
1. Interpreters
Currently we have 2 working interpreter plugins which are, if installed,
dynamicly loaded and provided to Kross. The Python-plugin embeds a
python-interpreter and bridges the Kross API into the python-world while the
by Cyrille Berger developed Ruby-plugin does the same for Ruby.
2. Integration
Extending applications with in a scripting language written plugin is quit
easy. You are even able to use pyQt and pyKDE to access dcop or create
GUI-dialogs which are displayed as part of your application (without letting
your application need to know anything about pyqt or python at all). Cause
other GUI-toolkits like TkInter are working as well, it's not needed to
depend on pyqt to display some GUI-elements. In fact at Kexi we use a little
py-script which spends abstract access to dialogs. If pyQt isn't installed we
fall back to TkInter.
3. Applications
While Kross started initialy as extension for Kexi, it was lately moved to the
KOffice libraries and Cyrille Berger integrated it into Krita. So, we have
currently two applications using the Kross-framework what isn't that bad to
start with :)~
Kexi demonstrates with 3 scripts the usage. The first one is called
ProjectDocumentator.py and generates some documentation about the loaded
project and it's via KexiDB stored data. The other both are named
ExportXHTML.oy and ImportXHTML.py. With the first one you are able to export
a table or query to a XHTML-file while the second allows us to import data
from such a XHTML-file into a table. The import script uses the Python SAX
event-driven XML-parser what should enable us to import large collections of
data. The main point here is, that we even extended the functionality of Kexi
with just a hand full of python-code rather then a more complex SAX-import
written with C/C++. Think of pyUNO to access OpenOffice.org via python or
LDAP import/export scripts. There are a lot of nice ways to extend an
application with little scripts.
4. The future?
Who knows what will happen in near future. I guess following both points are
from interest for Kross and would need some of my time;
- Port to Qt4 and integrate (maybe as plugin?) some code to work with the
QMeta*-stuff.
- Auto-generate bindings (Smoke? maybe even just provide a
Kross-to-SmokeRuntimes bridge?, KDevelop4 cpp-parser?).
--
Sebastian Sauer aka dipesh[sebsauer]
http://www.dipe.org/public_key.asc
Fingerprint: 8F1E 219B 16E6 4EC7 29CC F408 E193 65E2 9134 2221
Coder in http://www.koffice.org/kexi && http://www.kmldonkey.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20051219/bbb1a432/attachment.sig>
More information about the Kde-bindings
mailing list