Dennis Lee Bieber  <[EMAIL PROTECTED]> wrote:
>>>> import os.path
>>>> os.path.join("c:",
>...    "Documents and Settings",
>...    "somepath")
>'c:Documents and Settings\\somepath'
>>>>
>
>Hmmm, a quick test with 
>
>dir "e:userdata"
>
>worked, so the top level \ may not be needed...

"drive:" is the 'cwd' on the drive, so "drive:directory" is relative
to that. Try "cd e:userdata" and repeat "dir e:userdata" and see what
happens. os.path.join() has to behave as above, otherwise you wouldn't
be able to use it to construct a relative path like that.

(And since I don't think anyone's mentioned it in this thread yet,
subprocess.call() instead of os.system().)

-- 
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to