My program stores a bunch of tracking data in the user's home
directory, for instance:
c:\Users\Nat\.my_program\db.txt
This has never caused any problems on Mac or Linux, and it seemed
reasonably safe on Windows. However, I am finding (via reports from
users - I can't reproduce this myself) that this frequently breaks on
Windows (at least 7, not sure about the rest), *but only after the
program has already launched*. In other words, when my code tries to
access the .my_program directory in the OnInit method of the
subclassed wx.App, everything works okay, but subsequent attempts to
access it fail, and os.path.isdir() seems to think it doesn't exist.
I am completely stumped by this behavior; it's almost as if the
wxPython program has limited access to the local filesystem.
Has anyone else encountered similar problems (and found a workaround)?
I realize now that wx.StandardPaths is probably a much safer solution
than what I'm doing now, and I'll try to switch to that in the future,
but unfortunately at this point I have a bunch of users who have data
saved in ~/.my_program, so I need to preserve backwards compatibility.
thanks,
Nat