summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/scripting/scripts/python
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kexi/plugins/scripting/scripts/python
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/plugins/scripting/scripts/python')
-rw-r--r--kexi/plugins/scripting/scripts/python/Makefile.am2
-rw-r--r--kexi/plugins/scripting/scripts/python/kexiapp/Makefile.am2
-rwxr-xr-xkexi/plugins/scripting/scripts/python/kexiapp/__init__.py25
3 files changed, 29 insertions, 0 deletions
diff --git a/kexi/plugins/scripting/scripts/python/Makefile.am b/kexi/plugins/scripting/scripts/python/Makefile.am
new file mode 100644
index 00000000..4b31c35a
--- /dev/null
+++ b/kexi/plugins/scripting/scripts/python/Makefile.am
@@ -0,0 +1,2 @@
+include $(top_srcdir)/kexi/Makefile.global
+SUBDIRS = kexiapp
diff --git a/kexi/plugins/scripting/scripts/python/kexiapp/Makefile.am b/kexi/plugins/scripting/scripts/python/kexiapp/Makefile.am
new file mode 100644
index 00000000..f0f0492d
--- /dev/null
+++ b/kexi/plugins/scripting/scripts/python/kexiapp/Makefile.am
@@ -0,0 +1,2 @@
+kexiapppythondir = $(kde_datadir)/kexi/kross/python/kexiapp
+kexiapppython_SCRIPTS = __init__.py
diff --git a/kexi/plugins/scripting/scripts/python/kexiapp/__init__.py b/kexi/plugins/scripting/scripts/python/kexiapp/__init__.py
new file mode 100755
index 00000000..b5224304
--- /dev/null
+++ b/kexi/plugins/scripting/scripts/python/kexiapp/__init__.py
@@ -0,0 +1,25 @@
+"""
+Initializer for the krosskexiapp-module.
+
+Description:
+This module provides the entry-point for python scripts
+to work with a running Kexi application instance.
+
+Author:
+Sebastian Sauer <mail@dipe.org>
+
+Copyright:
+Dual-licensed under LGPL v2+higher and the BSD license.
+"""
+
+try:
+ import krosskexiapp
+except ImportError, e:
+ raise "Import of the Kross KexiApp module failed.\n%s" % e
+
+def get(modulename):
+ return krosskexiapp.get(modulename)
+
+def currentConnection():
+ mainwindow = krosskexiapp.get("KexiAppMainWindow")
+ return mainwindow.getConnection()