Menu

#21 Python Windows specific issues

open
None
5
2005-11-08
2005-11-08
No

The Python tests appear to make some Windows-specific
assumptions. Running "python makeAllChangesFilesTest.py
self.originalContents = open(self.filename,"rb").read()

IOError: [Errno 2] No such file or directory:
'pyTestFiles\\someFile.txt'
" on a Mac I get some error messages like this:

even though the file is present. Same problem with
makeWebViewTest.py. Looking in makeWebView.py this
looks like the problem:

pagename =
(splitext(filename)[0]+".html").replace('\\','/')

That line should probably only be used on Windows. Or
is there a cross-platform Python way to handle this?
Something involving os.path.join perhaps?

Discussion


Log in to post a comment.

MongoDB Logo MongoDB