From 5507c3321c3e7aaa352fb151d0eeb5c86908e970 Mon Sep 17 00:00:00 2001 From: Jeremiah Leary Date: Fri, 22 Sep 2017 08:05:10 -0500 Subject: [PATCH] Updated program so it can executed from anywhere, instead of from bin. --- bin/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/main.py b/bin/main.py index ebdad155..0cb280b8 100644 --- a/bin/main.py +++ b/bin/main.py @@ -2,9 +2,13 @@ import argparse import sys +import os -# Rules -sys.path.append('..\modules') +# Get the path to the executable +executablePath = os.path.dirname(os.path.realpath(__file__)) + +# Import program modules +sys.path.append(executablePath + '\..\modules') import rule_list import vhdlFile