I have been testing my Python application on the just-released developer preview of Windows 8 and have noted an error: the application does not create an app folder in the user's "application data" directory. This causes the app to crash on startup. Manually creating the directory solves the problem. Since the app uses an os.mkdir() call to create the directory, and since the app runs fine on Windows 7, my guess is that the bug lies somewhere in the interaction between Python (I'm using ActivePython 2.7) and Windows.

Here's the relevant code:

    #make preferences directory if it does not exist
    def makePrefsDir(self):
self.appdir = os.path.join(os.path.join(os.environ['APPDATA'], 'MyApp'))
        if not os.path.exists(self.appdir):
            os.mkdir(self.appdir)

I realize that this developer preview of Windows is still at somewhere between alpha- and beta-level, and it's possible things will get better. Should I wait to report this as a bug until Windows 8 is released, or do the Python developers test Python on pre-release versions of Windows?
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to