En Tue, 09 Jun 2009 20:30:06 -0300, rh0dium
escribió:
On Jun 9, 3:28 pm, Emile van Sebille wrote:
On 6/9/2009 3:00 PM rh0dium said...
> I have a .pth file which has some logic in it - but it isn't quite
> enough...
> It started with this..
> import os, site; site.addsitedir(os.path.join(os.e
On Tue, 9 Jun 2009 21:33:56 -0700 (PDT), rh0dium
wrote:
>> Having multiple paths or multiple .PTH files isn't a
>> problem for python.
> ..
> We use it for our dev tree before we roll to production. Once dev is
> QA'd then we (integrate) those changes to main and release.
Makes sense...
:-)
On Jun 9, 4:58 pm, David Lyon wrote:
> On Tue, 9 Jun 2009 16:30:06 -0700 (PDT), rh0dium
> wrote:
>
> >> > Apparently there is a problem with the if statement???
>
> >> > Thanks
>
> > No for .pth files this needs to be on a single line..
>
> I can't really see why you need conditional code...
>
>
On Jun 9, 9:19 pm, alex23 wrote:
> On Jun 10, 8:00 am, rh0dium 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 "
On Jun 10, 8:00 am, rh0dium 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,
On Tue, 9 Jun 2009 16:30:06 -0700 (PDT), rh0dium
wrote:
>> > Apparently there is a problem with the if statement???
>>
>> > Thanks
>
> No for .pth files this needs to be on a single line..
I can't really see why you need conditional code...
If you want to add more locations...
Simply create a
On Jun 9, 3:28 pm, Emile van Sebille wrote:
> On 6/9/2009 3:00 PM rh0dium said...
>
>
>
>
>
> > I have a .pth file which has some logic in it - but it isn't quite
> > enough...
>
> > It started with this..
> > import os, site; site.addsitedir(os.path.join(os.environ["TECHROOT"],
> > "tools/python/
On 6/9/2009 3:00 PM rh0dium said...
I have a .pth file which has some logic in it - but it isn't quite
enough...
It started with this..
import os, site; site.addsitedir(os.path.join(os.environ["TECHROOT"],
"tools/python/modules"))
But that eventually evolved into..
import os, site; site.addsite