[Twisted-Python] Failed to load application.

Itamar Shtull-Trauring itamar at itamarst.org
Sat Jul 31 10:01:54 EDT 2004

On Sat, 2004-07-31 at 01:28, Tsai Li Ming wrote:

> I solved it via adding Joe's home dir (/home/joe) to the pythonpath in 
> root's acct. Why can't it import the system module even though it's in 
> the same dir? A python prompt does work when I manually import the module.

Python adds the directory where the *file you are running* is to
PYTHONPATH. So, in this case it'll add whatever directory twistd is in,
*not* the current directory. To be nice, twistd, trial etc. add "." to
the PYTHONPATH as well, so it behaves the way people want, but this is
disabled when running as root for security reasons.

Itamar Shtull-Trauring    http://itamarst.org

More information about the Twisted-Python mailing list