.pth files and figuring out valid paths..

alex23 wuwei23 at gmail.com
Wed Jun 10 00:19:41 EDT 2009

On Jun 10, 8:00 am, rh0dium <steven.kl... at gmail.com> wrote:
> Apparently there is a problem with the if statement???

Try restructuring the if as a ternary condition:

import os, site; smsc = os.environ.get("TECHROOT", "/home/tech"); smsc
= smsc if os.path.isdir(smsc) else "/home/tech"; site.addsitedir
(os.path.join(smsc, "tools/python/Linux/%arch/lib/python2.5/site-

More information about the Python-list mailing list