Windows vs. Linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • andrew clarke

    #46
    Re: Windows vs. Linux

    On Tue, Aug 01, 2006 at 05:31:01PM +0200, Sybren Stuvel wrote:
    James Stroud enlightened us with:
    its better to use:

    os.path.join('m y', 'favorite', 'dir')

    than

    "\\".join(['my', 'favorite', 'dir'])

    because the latter will bonk on linux.
    >
    Ehm... replace that with "the latter with bonk on every OS except
    Microsoft Windows". Windows is the weird one in OS-land, because they
    are the only one that use the most widely used escape-character (the
    backslash) as path separator.
    OS/2 (and eComStation) also uses the backslash as the path separator.

    Comment

    • Duncan Booth

      #47
      Re: Windows vs. Linux

      Bryan Olson wrote:
      Duncan Booth wrote:
      >I'm not sure ambiguity enters into it. I think perhaps the bad
      >detection of the option happens because the CD command can ignore
      >spaces in its argument. Since it is ignoring spaces they don't
      >actually require a space after the option strings.
      >
      You lost me. Spaces are significant in file names, and slashes
      within the path are used as path separators, as far as I can
      tell.
      Sorry I was unclear. It isn't that spaces are ignored, it is that they do
      not count as delimiters in the CD command. In all other DOS commands they
      count as argument delimiters unless they are inside quotes.

      >Any other Microsoft commands I try all complain about 'invalid
      >switch'.
      >
      The first I noticed were their build tools. Their version of
      "make", called "nmake", and their visual studio tools will
      accept either forward or backward slashes in paths.
      >
      Ok, pedantically I meant the commands that come as part of the system. Most
      external tools such as Microsoft's compilers have always accepted forward
      slashes interchangeably with backslashes. They also usually accept '-' as
      an option character interchangeably with '/'. The 'standard' commands
      though seem to go to a lot of effort to reject forward slashes in paths,
      and the CD command seems to be the only one where this usage gets through
      the net.

      Comment

      • Gerhard Fiedler

        #48
        Re: Windows vs. Linux

        On 2006-08-04 05:30:00, Sybren Stuvel wrote:
        >Besides, you probably don't know whether it's not one of your direct
        >suppliers who's affected. You're sure you don't buy from anybody
        >running a Windows system? I'd bet against that, and I only bet when
        >I know I win :)
        >
        Good point. I don't buy much software, though. The only things I buy
        are some games every now and then.
        No food? No clothes? No furniture? No household supplies? No
        transportation? No bike/bicycle/car? They all (well, most of them) use
        computers in their administration; /that's/ the cost I was talking about,
        not the cost for the software industry :)

        Gerhard

        Comment

        • andrew clarke

          #49
          Re: Windows vs. Linux

          On Fri, Aug 04, 2006 at 02:01:58PM +0200, Sybren Stuvel wrote:
          OS/2 (and eComStation) also uses the backslash as the path
          separator.
          >
          You mean OS/2 is still in actual use?
          'fraid so. :-)

          Comment

          • Gerhard Fiedler

            #50
            Re: Windows vs. Linux

            On 2006-08-04 09:58:34, Sybren Stuvel wrote:
            >They all (well, most of them) use computers in their administration;
            >/that's/ the cost I was talking about, not the cost for the software
            >industry :)
            >
            Good point. Time more people started using Open Source :)
            Definitely. But don't hold your breath :)

            Gerhard

            Comment

            • Jorgen Grahn

              #51
              Re: Windows vs. Linux

              On Tue, 1 Aug 2006 14:47:59 -0300, Gerhard Fiedler <gelists@gmail. comwrote:
              On 2006-08-01 12:31:01, Sybren Stuvel wrote:
              ....
              Is that really true? From what I know, it's more like this:
              >
              - Unix-type systems: '/'
              - Windows-type systems: '\'
              - Mac OS: ':'
              - OpenVMS: '.'
              - ...
              >
              Maybe someone else can fill in some of the missing OSes.
              AmigaDOS: '/'. (On the other hand, it didn't understand '.' and '..' without
              third-party patches, and it didn't have the '/' directory.).
              It doesn't seem to
              look like Windows is the odd man out; it rather seems that every type of OS
              uses its own separator.
              In the 1980s, MS-DOS /was/ an ugly bastard child; lots of other systems
              existed that I have never heard about. As for what path separator they used
              and why, I'm afraid you'd have to ask on alt.folklore.co mputers ...

              /Jorgen

              --
              // Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
              \X/ snipabacken.dyn dns.org R'lyeh wgah'nagl fhtagn!

              Comment

              • Bryan Olson

                #52
                Re: Windows vs. Linux

                Duncan Booth wrote:
                Bryan Olson wrote:
                >
                >Duncan Booth wrote:
                >>Any other Microsoft commands I try all complain about 'invalid
                >>switch'.
                >>
                >The first I noticed were their build tools. Their version of
                >"make", called "nmake", and their visual studio tools will
                >accept either forward or backward slashes in paths.
                >>
                Ok, pedantically I meant the commands that come as part of the system. Most
                external tools such as Microsoft's compilers have always accepted forward
                slashes interchangeably with backslashes. They also usually accept '-' as
                an option character interchangeably with '/'. The 'standard' commands
                though seem to go to a lot of effort to reject forward slashes in paths,
                and the CD command seems to be the only one where this usage gets through
                the net.
                That seems right, though I don't think Microsoft is deliberately
                being difficult. They never put much effort into the command
                line; they were trying to imitate the the Mac GUI more than the
                Unix shell.

                I just tried, and on XP the "explorer" will accept forward
                slashes, immediately re-displaying them as backslashes.


                --
                --Bryan

                Comment

                • baalbek

                  #53
                  Re: Windows vs. Linux

                  Andy Dingley wrote:
                  >Python and Ubuntu rock...go fot it.
                  >
                  That's nice. I've just burned myself a new Ubuntu f*ck-a-duck release CD
                  Now, just out of curiosity, what's f*ck-a-duck?

                  Baalbek

                  Comment

                  • siggy2@supereva.it

                    #54
                    Re: Windows vs. Linux


                    Duncan Booth wrote:
                    [CUT]
                    >
                    C:\>cd /Documents and settings
                    The system cannot find the path specified.
                    >
                    C:\>cd /DDocuments and settings
                    >
                    C:\Documents and Settings>
                    that's because the
                    cd /D is interpreted as
                    "change drive and directory"
                    so I imagine it enables some kind of command extension

                    but anyway you're right: m$ CMD is weird
                    bye,
                    PiErre

                    Comment

                    Working...