cannot concatenate 'str' and 'list' objects

Chris Gonnerman chris at gonnerman.org
Sat Sep 15 12:09:58 EDT 2012


> I moved to HostGaot because i heard there were the best in the hosting
> business.....
They are pretty good.  However, you have to understand the site layout 
to do CGI safely.

So long as your script are .cgi, putting them in ~/public_html is fine.  
If you need to deploy .py files, you need to put them in a different 
folder outside ~/public_html, for example ~/lib or ~/python, then in 
your CGI scripts you need to add that to the path.

For example:

#!/usr/bin/python

import sys
sys.path.append("../python")

import MyModule, MyPackage.OtherModule

This is more or less how all my CGI scripts on HostGator are done.

-- Chris.



More information about the Python-list mailing list