You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koffice/kexi/plugins/scripting/scripts/python/kexiapp/__init__.py

26 lines
562 B

"""
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 as 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()