Page 330 -
P. 330
exceptions and message boxes
Someone changed the file permissions
It turns out the whole thing was caused when someone from Technical Support
decided to change the permissions on the deliveries.txt file, making it
read-only. When the system tried to write deliveries into the file, it failed. But
what’s worse, it failed silently:
Because no error
message appeared in
the GUI, the trainee
thinks everything is OK.
“deliveries.txt”
was made read-
only.
deliveries.txt
The error in the
Python Shell was
not noticed by the
trainee.
When you were writing programs that ran in the Python Shell,
you could always tell when it failed: a huge, ugly error message
appeared. Why not with GUIs? Don’t they do the same? Note: To reproduce this error on your PC,
you need to make your deliveries.txt
They do, but the trouble is that the message appears in the Shell file read-only. How you do this depends
and your user is busy looking at the nice GUI, so the ugly error upon your operating system. If you are
can often be missed. unsure how to make a file read-only, check
the Web for more advice (or ask a friendly
local guru). On most systems, it involves
When using a GUI, how do you spot errors? editing the properties of the file.
Once spotted, what happens then?
you are here 4 295