Results 1 to 4 of 4
Thread: Python Problems
-
05-09-2004, 07:06 PM #1dr_springfieldGuestPython Problems
I'm very new to python... ran into this error
code:
import urllib
proxies = proxies={'http': 'http://61.131.59.66:8080'}
filehandle = urllib.urlopen('http://whatismyip.com', proxies=proxies)
error:
AttributeError: 'NoneType' object has no attribute 'read'
The problem is in the proxies variable... running without it (proxies=None) generates no error. Anyone know python?
p.s. I took this code straight off the python website describing the urllib module... so it *should* work...
-
05-11-2004, 01:06 AM #2dr_springfieldGuestsolution
This went away when I upgraded my version of python.
-
05-11-2004, 02:10 PM #3
Nice to know - I have not yet tried Python...
-
05-12-2004, 01:04 AM #4dr_springfieldGuest
I've only used it for a few days now, and I already feel pretty comfortable in it. It's very easy to use. It used to be if I had something to do that I couldn't do by hand (like say... decrypting an encypted message, or processing a file) I would write up a little terminal C++ program to do it for me, but now that I've used python that seems ridiculous. Python is not only a thousand times easier to do anything I could ever do in C++ (aside from real development), but it also makes stuff that would have been very difficult... such as http operations...very easy. I'd recommend it, you can pick it up in a few days.
Oh, and make sure you update first.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Python Fault
By TOmike15 in forum macOS - Development and DarwinReplies: 4Last Post: 06-10-2015, 11:05 AM -
Using Python
By AllanGreen in forum macOS - Apps and GamesReplies: 8Last Post: 07-07-2012, 10:11 PM -
Python
By NickBird in forum Switcher HangoutReplies: 0Last Post: 11-14-2008, 01:54 AM -
python/textstat
By coach_z in forum macOS - Apps and GamesReplies: 1Last Post: 04-26-2005, 12:27 AM -
PYTHON PROGRAMMERS!!! how do i compile/run linux-based python code on OS X
By pkny in forum macOS - Development and DarwinReplies: 4Last Post: 03-20-2005, 05:17 PM