Hello Marble!

Marble offers KDE-Python bindings. A small hello world example is available as part of the Marble sources at

marble/examples/python/simple_marble.py

The Marble API allows a very easy integration of a map widget into your application. Let's prove that with some python code:

#!env python## Copyright 2008 Simon Edwards <simon@simonzone.com>## This program is free software; you can redistribute it and/or# modify it under the terms of the GNU General Public License as# published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program. If not, see <http://www.gnu.org/licenses/>.## A very simple example of how to use the marble widget.fromPyQt4.QtCoreimport*fromPyKDE4.kdeuiimport*fromPyKDE4.kdecoreimport*fromPyKDE4.marbleimport*importsysclassMainWin(KMainWindow):def__init__(self,*args):KMainWindow.__init__(self)self.resize(640,480)self.marble=Marble.MarbleWidget(self)self.marble.setMapThemeId("earth/bluemarble/bluemarble.dgml")self.setCentralWidget(self.marble)self.marble.centerOn(5.8333,51.8333)self.marble.zoomView(2000)defmain():appName="simple_marble"catalog=""programName=ki18n("default")version="1.0"description=ki18n("Simple Python Marble Example")license=KAboutData.License_GPLcopyright=ki18n("(c) 2008 Simon Edwards")text=ki18n("none")homePage="www.simonzone.com"bugEmail="simon@simonzone.com"aboutData=KAboutData(appName,catalog,programName,version,description,license,copyright,text,homePage,bugEmail)aboutData.addAuthor(ki18n("Simon Edwards"),ki18n("Developer"))KCmdLineArgs.init(sys.argv,aboutData)app=KApplication()mainWindow=MainWin(None,"main window")mainWindow.show()app.connect(app,SIGNAL("lastWindowClosed ()"),app.quit)app.exec_()main()</code>