Re: [jokosher-devel] IMPORTANT: Stuff to do for 0.2



On Thursday 07 September 2006 10:00, chris procter wrote:
> Fixed in svn 669
> Not the nicest bit of shell scripting I've ever done
> but it works.
>
Looks a little round the houses to me but it does work. We could of course do 
this in python  if we make the top of JokosherApp.py look like this:

#!/usr/bin/python

import sys
import os.path
if __name__ == "__main__":
	sys.path.insert(0, os.path.dirname(os.path.abspath(sys.path[0])))

The sys.path will then set up before all the other imports (sys.path[0] is 
always the directory containing the script). Just an idea.
-- 
John Green

john thegreens co uk



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]