Skip to content

Instantly share code, notes, and snippets.

@boseji
Created February 24, 2014 08:40
Show Gist options
  • Save boseji/9183949 to your computer and use it in GitHub Desktop.
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
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