Created
February 24, 2014 08:40
-
-
Save boseji/9183949 to your computer and use it in GitHub Desktop.
Example for the Runner Script that can be run individually or via Import or Compile techniques
This file contains 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
import os,sys | |
from os import path | |
#the config file lites in the top py directory | |
try: | |
from config import * | |
except: | |
#fix for Direct Running | |
sys.path.insert(0, \ | |
path.abspath(path.join(os.getcwd(),".."))) | |
from config import * | |
# Executable Function for the File to be used | |
# for Import method | |
def run(): | |
print() | |
print("Current Path: ",sys.path) | |
# Needed to Run Individually | |
if __name__ == "__main__": | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment