[python-win32] authentication proxy and download

Christophe Deze christophedeze at wanadoo.fr
Mon Mar 1 18:59:20 CET 2010


it should look like that ???

import win32inet
hinternet = win32inet.InternetOpen("foo 1.0", 0, "", "", 0)
win32inet.InternetSetOption(INTERNET_OPTION_PROXY_PASSWORD,SizeofOtion)
win32inet.InternetSetOption(INTERNET_OPTION_PROXY_USERNAME,SizeofOtion)
#h = win32inet.InternetConnect(hinternet,'www.google.fr',80,'','',3,0)

h = 
win32inet.InternetOpenUrl(hinternet,'http://downloads.sourceforge.net/sevenzip/7z465.msi')

data =win32inet.InternetReadFile(hinternet,sizeOfFile)


Le 01/03/2010 18:03, Christophe Deze a écrit :
> hello
>
> I wrote a windows app that must download file
> it works fine with urllib.urlretrieve.
>
> But I want to download file through a proxy  with NTLM 
> (samba)authentication .
> I want to use windows sessions credential transparently, as IE and 
> Firefox do well...
>
> I don't think that urllib(2) can do this.
>
> But maybe a win32 API ?
>
> http://docs.activestate.com/activepython/2.5/pywin32/win32inet.html
> http://msdn.microsoft.com/en-us/library/aa384220%28VS.85%29.aspx
>
>
> What do you think of this ?
> any idea ?
>
> thanks
>
>
>
>
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20100301/d73eb7eb/attachment.html>


More information about the python-win32 mailing list