cgi-bin/inc.py
author terom
Sat, 22 Dec 2007 21:31:01 +0000
changeset 18 46536daf9e04
permissions -rw-r--r--
fix bug with shorturls in gallery.html, and some horrible, horrible crap for the CGI stuff - I need to drop everything now and take a fresh look tomorrow before it gets even worse
if __name__ == '__main__' :
    raise Exception("Don't access inc.py directly")

# setup env

import sys
import os, os.path

def splitn (path, n) :
    for i in xrange(0, n) :
        path = os.path.split(path)[0]      
    
    return path
        
degal_path = splitn(os.path.join(os.getcwd(), __file__), 2)

os.chdir(degal_path)
sys.path.append(degal_path)