This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gagern
Recipients gagern
Date 2011-08-05.13:39:39
SpamBayes Score 2.164935e-15
Marked as misclassified No
Message-id <1312551580.84.0.857436342215.issue12696@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-08-05 13:39:40gagernsetrecipients: + gagern
2011-08-05 13:39:40gagernsetmessageid: <1312551580.84.0.857436342215.issue12696@psf.upfronthosting.co.za>
2011-08-05 13:39:40gagernlinkissue12696 messages
2011-08-05 13:39:39gagerncreate