htaccess & urllib

Max Khesin max at
Wed Jul 23 17:53:45 CEST 2003


Max Khesin, software developer -
max at
[check out our image compression software at, JBIG2-PDF
compression @]

"Rene Pijlman" < at> wrote in
message news:tnbthvorrrc59nn3689ue741lvtb0horke at
> Max Khesin:
> >Is there a way to access an htaccess-protected directory with urllib,
> >password being known?
> .htaccess is not a protection mechanism, but a configuration
> file. If this configuration file specifies HTTP Basic
> Authentication you can use:
> "class FancyURLopener(...)
> basic HTTP authentication is performed ...
> Note: When performing basic authentication, a FancyURLopener
> instance calls its prompt_user_passwd() method. The default
> implementation asks the users for the required information on
> the controlling terminal. A subclass may override this method to
> support more appropriate behavior if needed."
> --
> René Pijlman

More information about the Python-list mailing list