Skip to content

Instantly share code, notes, and snippets.

@NathanW2
Created August 27, 2012 12:14
Show Gist options
  • Save NathanW2/3487919 to your computer and use it in GitHub Desktop.
Save NathanW2/3487919 to your computer and use it in GitHub Desktop.
diff --git a/python/utils.py b/python/utils.py
index 4bf110f..97e6f13 100755
--- a/python/utils.py
+++ b/python/utils.py
@@ -55,7 +55,18 @@ def initInterface(pointer):
from sip import wrapinstance
global iface
iface = wrapinstance(pointer, QgisInterface)
+ iface.initializationCompleted.connect(runStartUpScripts)
+def runStartUpScripts():
+ '''
+ Import startup.py that is located in the users ~/.qgis/python folder
+ which is on PATH so we can just do from ... etc here
+ '''
+ try:
+ from startup import *
+ except ImportError:
+ # If not startup.py file is found then we just let it pass
+ pass
#######################
# PLUGINS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment