Created
August 27, 2012 12:14
-
-
Save NathanW2/3487919 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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