Files in unix and windows
Byron
DesertLinux at netscape.net
Sat Aug 21 09:48:45 EDT 2004
Hi Travis,
You want to use forward slashes with your file names. Backslashes are
used for special character commands, such as "/t" for <tab>, etc.
For Windows:
c:/aFolder/testDocument.txt
For Unix / Linux
/aFolder/testDocument.txt
If you need a relative path, with no drive specified (for Windows), use:
/aFolder/testDocument.txt
Hope this helps,
Byron
---
Travis James Kleeburg wrote:
> I am trying to copy files from one directory into another using
> shutil.copy. I am having a problem getting a usable path using
> os.path.abspath because it doesnt return a string with the extra
> backslashes and i was wondering if there was a better system call to use?
> I am also looking for a system call so there wont be a problem between windows and
> unix.
>
>
More information about the Python-list
mailing list