On 12/17/06, Ed Leafe <[EMAIL PROTECTED]> wrote:
> On Dec 17, 2006, at 11:33 AM, Paul McNett wrote:
>
> > I think that Python handles the pathing smartly. You can use forward
> > slashes on all platforms.
>
>         But if you get a Windows file reference from Python, it will be in
> Windows backslash format.
>
>  >>> import os
>  >>> os.getcwd()
> 'C:\\projects\\ide'
>  >>>

okay, found <http://docs.python.org/lib/module-os.path.html>

which you can use to get basename, dirname, split, join, normalize, &c.

in my experience with other languages that support multiple platforms
(e.g. tcl) when I needed to create a pathname I used stuff like that
to avoid screwing up. I forgot how I did it but I seem to recall also
even managing to specify some root name to know if I should use c:/ or
just /. has been a while.


-- 
sheila

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to