Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > urllib2, proxies, and pac files on OS X

Reply
Thread Tools

urllib2, proxies, and pac files on OS X

 
 
Mani Ghasemlou
Guest
Posts: n/a
 
      03-30-2009
Hi all,

urllib2 correctly detects proxies as configured in my preferences pane
on OS X 10.5:

Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> urllib2.ProxyHandler().proxies

{'http': 'http://openproxy.in.tungle.com:8080'}
>>>


However, when configuring a proxy via PAC file, this does not seem to
be the case:

Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> urllib2.ProxyHandler().proxies

{}
>>>


Is there any way to obtain (and parse using something like pacparser)
the PAC file via urllib2 (or some other standard python library), or
is this something I need to tackle using Cocoa (in my case PyObjC)?

Thanks a lot!

Mani
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Announcement: pacparser - a c library to parse proxy auto-config(pac) files Manu Garg Python 0 12-17-2007 09:36 AM
urllib.getproxies and PAC gooli Python 1 11-01-2007 02:30 PM
PAC (presentation-abstraction-control) question craig C++ 1 03-22-2006 08:03 PM
Column: Wireless Networking Improvements in Windows XP Service Pac =?Utf-8?B?S2F0aGllIFdlcm5lcg==?= Wireless Networking 6 02-26-2006 05:17 PM
pac/bell scanner Lyn Studman Computer Support 1 06-23-2004 07:56 PM



Advertisments