View Single Post
Old 02-23-2011, 06:47 PM   PM User | #2
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
Quote:
Originally Posted by Apothem View Post
My webhost is using Python 2.4

Suppose I have the following directories:
Code:
public_html/subdomain_1/main.py
public_html/subdomain_2/module_1.py
public_html/subdomain_2/module_2.py
And I go to subdomain_1.mysite.com/main.py

How do I make it so that in main.py, all imports are treated as if it was in directory public_html/subdomain_2?
example take from here http://docs.python.org/release/2.6.6...andard-modules
Code:
import sys
sys.path.append('/ufs/guido/lib/python')
best regards
oesxyl is offline   Reply With Quote