Re: cross platform accessing paths (windows, linux ...)

Discussion in 'Python' started by Vlastimil Brom, Mar 13, 2009.

  1. 2009/3/13 hendra kusuma <>:
    > you may want to use os.sep to replace manually written "/" "\" ":" for each
    > os
    > I heard that unix/linux use "/" as directory separator while windows use "\"
    > and mac os use ":"
    >

    Thanks for the notice about the ":" path separator on mac;
    windows uses "\" but normally also accepts "/".
    Now I see, the diversity is yet greater, than I thought (cf.
    http://en.wikipedia.org/wiki/Path_(computing)

    regards
    Vlasta
     
    Vlastimil Brom, Mar 13, 2009
    #1
    1. Advertising

  2. Vlastimil Brom

    David Smith Guest

    Vlastimil Brom wrote:
    > 2009/3/13 hendra kusuma <>:
    >> you may want to use os.sep to replace manually written "/" "\" ":" for each
    >> os
    >> I heard that unix/linux use "/" as directory separator while windows use "\"
    >> and mac os use ":"
    >>

    > Thanks for the notice about the ":" path separator on mac;
    > windows uses "\" but normally also accepts "/".
    > Now I see, the diversity is yet greater, than I thought (cf.
    > http://en.wikipedia.org/wiki/Path_(computing)
    >
    > regards
    > Vlasta


    The ':' separator is for old Mac systems using Mac OS prior to version
    10.0. As of 10.0, they've moved to a unix based environment where the
    path separator is now a '/' character. There's been enough time passed
    you'll have a very hard time finding one of the old systems.

    --David
     
    David Smith, Mar 13, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oliver Bleckmann
    Replies:
    2
    Views:
    352
    Keith Thompson
    Nov 12, 2006
  2. Oliver Bleckmann
    Replies:
    6
    Views:
    446
    ondra.holub
    Nov 13, 2006
  3. Michael Reichenbach
    Replies:
    5
    Views:
    380
    Zeppe
    May 25, 2007
  4. Vlastimil Brom
    Replies:
    0
    Views:
    513
    Vlastimil Brom
    Mar 12, 2009
  5. utabintarbo

    Cross-platform file paths

    utabintarbo, May 7, 2010, in forum: Python
    Replies:
    4
    Views:
    395
    Wolfgang Rohdewald
    May 9, 2010
Loading...

Share This Page