New submission from Martin von Gagern <martin.vgag...@gmx.net>:

I'd like to be able to run "pydoc -b" in whatever directory I'm currently in. 
Most of the time that would be the root of my home directory, which is an 
ext4fs mount. So it has a subdirectory called "lost+found" for which I don't 
have any access permissions. As a result, the main pydoc info page will simply 
print an error message:

OSError: [Errno 13] Permission denied: './lost+found'

I'm not sure how best to address this. There are several possibilities that 
come to my mind:

 1. Provide a command line switch to strip '.' from sys.path.
 2. Skip any sys.path elements which cause exceptions, possibly
    printing a warning in addition to the remaining page content.
 3. Skip any single subdirectry which causes an exception,
    as this more closely models what importing by name would do.
 4. Explicitely skip lost+found, or perhaps any directory name which
    would be invalid as a module name.

Obviously, the workaround is to change to a sufficiently empty directory before 
starting pydoc. So this is a minor issue, but annoying nevertheless.

----------
components: Library (Lib)
messages: 141658
nosy: gagern
priority: normal
severity: normal
status: open
title: pydoc error page due to lacking permissions on ./*
type: feature request
versions: Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12696>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to