Re: Multiplatform scripts: Can I avoid os.sep?

2006-07-13 Thread Fredrik Lundh
gmax2006 wrote: > I am developing scripts that must run on both Linux and windows. > > My scripts contain lots of relative paths (such as log\\log.txt or > ctl\\table.ctl) If I use os.sep, it makes the code ugly. Is there any > tips or techniques to have Python automatically converts \\ to / when

Re: Multiplatform scripts: Can I avoid os.sep?

2006-07-13 Thread Bruno Desthuilliers
Mike Kent wrote: (snip - about Jason Orendorff's path module) > Of course, using the '/' operator in this manner makes some people's > heads explode. +1 QOTW -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" --

Re: Multiplatform scripts: Can I avoid os.sep?

2006-07-13 Thread Mike Kent
gmax2006 wrote: > Hi, > > I am developing scripts that must run on both Linux and windows. > > My scripts contain lots of relative paths (such as log\\log.txt or > ctl\\table.ctl) If I use os.sep, it makes the code ugly. Is there any > tips or techniques to have Python automatically converts \\ to

Re: Multiplatform scripts: Can I avoid os.sep?

2006-07-13 Thread Bruno Desthuilliers
gmax2006 wrote: > Hi, > > I am developing scripts that must run on both Linux and windows. > > My scripts contain lots of relative paths (such as log\\log.txt or > ctl\\table.ctl) If I use os.sep, it makes the code ugly. Is there any > tips or techniques to have Python automatically converts \\ t

Multiplatform scripts: Can I avoid os.sep?

2006-07-13 Thread gmax2006
Hi, I am developing scripts that must run on both Linux and windows. My scripts contain lots of relative paths (such as log\\log.txt or ctl\\table.ctl) If I use os.sep, it makes the code ugly. Is there any tips or techniques to have Python automatically converts \\ to / when the script runs on Li