You may want to look at httplib2<div><br></div><div><a href="http://code.google.com/p/httplib2/">http://code.google.com/p/httplib2/</a></div><div><br></div><div>This great module makes auth very simple</div><div><br></div>

<div>Vince<br><br><div class="gmail_quote">On Fri, Jan 28, 2011 at 3:54 PM, Karim <span dir="ltr">&lt;<a href="mailto:karim.liateni@free.fr">karim.liateni@free.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



  

    
  
  <div bgcolor="#ffffff" text="#000000">
    <br>
    Hello,<br>
    <br>
    I want to create a client to access a webpage. But when I access it
    interactively  there is a dialog box<br>
    which ask for login and password.<br>
    I want to access it in batch via python but I could only found a
    basic example:<br>
    <pre><code><code>#</code><code>!/bin/env</code><code> </code><code>python</code>
<code>#</code><code> </code><code>-*-</code><code> </code><code>coding:</code><code> </code><code>utf-8</code><code> </code><code>-*-</code>
 
<code>import</code> urllib2
reponse <code>=</code> urllib2.<code>urlopen</code>(<code>&#39;</code><code>http</code><code>:</code><code>/</code><code>/</code><code>www</code><code>.</code><code>kernel</code><code>.</code><code>org</code><code>/</code><code>&#39;</code>)
xhtmldata <code>=</code> reponse.<code>read</code>()
<code>for</code> num,ligne <code>in</code> <code>enumerate</code>(xhtmldata.<code>splitlines</code>()) :
    <code>print</code> <code>&quot;</code><code>%04d</code><code> </code><code>-</code><code> </code><code>%s</code><code>&quot;</code><code>%</code>(num,ligne)
</code></pre>
    I want to provide login and password via python code. The web adress
    is like <a href="http://website.com:8081/ddts/ddts_main" target="_blank">http://website.com:8081/ddts/ddts_main</a>.<br>
    If you have link it is welcome!<br>
    <br>
    Regards<br>
    Karim<br>
  </div>

<br>_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Vince Spicer<div>Developer</div><div><br></div><br>
</div>