"Khalid A. Bakr" <[EMAIL PROTECTED]> wrote: > > --- "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > There must be more to the problem than just an open > > file. Please undo the change that triggered the > > addition of the test, and see whether you > > can reproduce the original problem with an arbitrary > > open file (I > > could trigger the problem with pagefile.sys at the > > time). > > > > Regards, > > Martin > > --- "Calvin Spealman" <ironfroggy at gmail.com> wrote: > > I'm sorry, but somehow I could not parse this. My > > understanding was that the unittest was meant to > > make sure an os.stat call would be successful on an > > open file, and that pagefile.sys was >simply used as > > a known open file, which is no longer correct. If > > that is the case, I am unsure what problem there is > > with >my fix of a temporary open file to test upon > > > I think the point is that the problem should be solved > (stat of open file) for any arbitrary open file > including pagefile.sys.
On Windows there is no guarantee that there will be a pagefile.sys on the C drive, or even that there exists a C drive. The test checking for the result of os.stat('C:\\pagefile.sys') is broken. Create a temporary file, open it with Python, then stat it (like you later suggest). Either that or use sys.executable . Either one would likely be fine. - Josiah _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com