From d1ecdb2a38bc12818ea983e377bf008f6328af83 Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Sun, 20 Nov 2011 14:42:49 -0800 Subject: [PATCH] Allow running from other directories` --- pesterchum | 1 + pesterchum.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pesterchum b/pesterchum index f351cb8..3ea92a5 100755 --- a/pesterchum +++ b/pesterchum @@ -1,3 +1,4 @@ #!/bin/sh +cd `dirname $0` python2.6 pesterchum.py $@ diff --git a/pesterchum.py b/pesterchum.py index ff8cbb7..1b050e0 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -1,8 +1,10 @@ # pesterchum +import os, sys, getopt +if os.path.dirname(sys.argv[0]): + os.chdir(os.path.dirname(sys.argv[0])) import version version.pcVerCalc() import logging -import os, sys, getopt from datetime import * import random import re