I have a Windows laptop.
Normally it resides in a docking station, meaing my Home
directory is referenced from a network drive labelled 'H:'
When I Eject the labtop my home directory by scripted
magick becomes referenced off 'C:'
If I have Idle running already and start a new Idle
window, the new window will fail, raising a FileError
exception over not finding the '.idlerc' at 'H:' - which it
cannot because it disapeared.
If I do not have Idle running and start it after undocking,
it will fail silently never bringing up a window.
I suspect for the same reason: The home drive changes
but the change is not reflected in the information
available to Python/Idle.
Maybe it is possible to search for a valid path when the
first (cached?) attempt fails - or maybe a workaround
could be to raise a Warning instead of an Exception,
letting the user decide?
|