PS: where do I get a python httpwrapper?
Java, PHP, and Python IDEs?
#1
Posted 18 June 2010 - 01:03 PM
PS: where do I get a python httpwrapper?
#2
Posted 18 June 2010 - 02:52 PM
#3
Posted 18 June 2010 - 03:05 PM
#4
Posted 18 June 2010 - 03:10 PM
What about that python httpwrapper?
You'd have to speak to ShadowLink about that, I don't really do any internet programming with Python that would need a httpwrapper. You could just try using urllib or httplib depending on what you need to do.
#5
Posted 19 June 2010 - 07:32 PM
Our HTTP wrapper is custom coded and so I can't share that with you. Maybe try looking around for how to do it.
#6
Posted 19 June 2010 - 08:35 PM
#7
Posted 19 June 2010 - 09:13 PM
#9
Posted 19 June 2010 - 09:27 PM
Run it.
It will autofind you're python install. Install there.
Read the documentation
http://www.pythonwar...dbook/index.htm
#10
Posted 20 June 2010 - 02:28 AM
#11
Posted 20 June 2010 - 06:39 AM
Download it.
Run it.
It will autofind you're python install. Install there.
Read the documentation
http://www.pythonwar...dbook/index.htm
I ran the .exe and it said it could not find Python in the registry. I've included screenshots.
Attached Files
#12
Posted 20 June 2010 - 06:52 AM
#14
Posted 20 June 2010 - 07:19 AM
http://pycurl.source...e.net/download/
And I would guess you'll want to most recent exe on the list.
#15
Posted 20 June 2010 - 07:48 AM
Attached Files
#16
Posted 20 June 2010 - 07:51 AM
#17
Posted 20 June 2010 - 07:59 AM
Are you running it as administrator with full privileges?
I forgot to run as administrator, that fixed it. So now I have a wrapper named http.py. I don't know how to include it or whatever. The source is here.
Edit: The wrapper is actually posted on Neocodex by Chaos_Blader here.
Edited by Zeeknon, 20 June 2010 - 08:01 AM.
#18
Posted 20 June 2010 - 08:04 AM
#19
Posted 20 June 2010 - 08:10 AM
#20
Posted 20 June 2010 - 08:14 AM
http://www.neocodex....er-recognition/
import wx import MaraONR myImage = Image.open("myFile.png") myImage.load() timer = wx.StopWatch() maraONR = MaraONR.MaraONR() nums = maraONR.getNums(self.myImage) print "Program Number: "+nums print "Time Taken: " + str(timer.Time()) + "ms"
Instead of http.py, that example is MaraONR.py but it shows you how to access the functions.
maraONR = MaraONR.MaraONR()
#21
Posted 20 June 2010 - 08:59 AM
import http w = http.BaseOpener().get('http://www.google.com/') print wAnd when it runs, I get a ton of errors:
Traceback (most recent call last): File "C:\Users\Owner\Desktop\test.py", line 2, in <module> w = http.BaseOpener().get('http://www.google.com/') File "C:\Users\Owner\Desktop\http.py", line 95, in get return self.open(GET, url, referrer) File "C:\Users\Owner\Desktop\http.py", line 129, in open assert headers.get('User-Agent'), 'No user agent set!' AssertionError: No user agent set!
#22
Posted 20 June 2010 - 09:06 AM
Assertionerror: No user agent set!
Perhaps you should set the user-agent...
#23
Posted 20 June 2010 - 09:09 AM
# Browser headers IE6_XP2 = { 'User-Agent': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)', 'Accept': 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */*', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-us'} FF_XP2 = { 'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6', 'Accept': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'Accept-Language': 'en-us,en;q=0.5', 'Accept-Encoding': 'gzip,deflate', 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'} DEFAULT_HEADERS = IE6_XP2
#24
Posted 23 June 2010 - 01:49 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users