Christos TZOTZIOY Georgiou wrote:
Although I don't have experience with FreeBSD, so far checking the exception's errno args does the job.
if that doesn't work on FreeBSD, FreeBSD is not a proper Unix.
import errno
try: ... except OSError, exc: if exc.errno == errno.ENOENT: # file inexistant ... elif exc.errno == errno.EPERM: # no permissions ...
make that
elif exc.errno in (errno.EACCES, errno.EPERM): # no permissions
</F>
-- http://mail.python.org/mailman/listinfo/python-list