htaccess & urllib

Max Khesin max at cNOvSisiPonAtecMh.com
Wed Jul 23 11:53:45 EDT 2003


thanks!

--
========================================
Max Khesin, software developer -
max at cNvOiSsPiAoMntech.com
[check out our image compression software at www.cvisiontech.com, JBIG2-PDF
compression @
www.cvisiontech.com/cvistapdf.html]


"Rene Pijlman" <reply.in.the.newsgroup at my.address.is.invalid> wrote in
message news:tnbthvorrrc59nn3689ue741lvtb0horke at 4ax.com...
> 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."
> http://www.python.org/doc/current/lib/module-urllib.html
>
> --
> René Pijlman






More information about the Python-list mailing list