Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

having build some (two) minor plugins, it's now time for me to link a few (perl-) applications to qgis. As there is no perl-interface in qgis I thought the best way to link both worlds together is a kind of messaging system. It should work like tis:

  • the perl-app sends a message to a certain folder
  • qgis starts a separete loop which looks every second, whether there is an incoming message in that folder
  • Qgis performs the necessary stuff an deletes the message again.
  • Or vice versa.

My question is how to start such a loop in qgis and how to do this at qgis-startup.

By the way - is there a possibility to "automate" QGis from external python applications? And if so is there any example code?

Thanks and regards

share|improve this question

You can do this with a plugin, using a QTimer.

In the init method of the plugin:

self.timer = QTimer()

Then define the timer_fired method:

def timer_fired(self):
    QMessageBox.information(None, "Timer", "Timer Fired")

In this example, QGIS will popup a message box every 10 seconds. For this to work, obviously QGIS must be running and your plugin loaded.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.