Re: File Handling Problems Python I/O
Sorry, the BASE variable should be 'C:\\' on Windows: >>> BASE = 'C:\\' >>> import os >>> os.path.join(BASE, 'foo', 'bar', 'baz') 'C:\\foo\\bar\\baz' -- http://mail.python.org/mailman/listinfo/python-list
Re: File Handling Problems Python I/O
You can use the os module to build path names in a platform-independent manner. On my Linux box, I can type >>> BASE = '/' >>> import os >>> os.path.join(BASE, 'foo', 'bar', 'baz') '/foo/bar/baz' On a Windows machine, you get >>> BASE = 'C:' >>> import os >>> os.path.join(BASE, 'foo', 'bar', 'b