python help
Posted: Tue Jun 28, 2005 10:36 pm
hello, i know absoltuley nothing about python other then how to run it on my linux server.
My friend coded this simple script for me
but it dosnt work on my local server nor my server i rent my web space from (it works on his server)
this is the error i get
any help what so ever is appreciated, thanks
My friend coded this simple script for me
Code: Select all
#!/usr/bin/env python2
import urllib2
import urllib
data = {'pid': '40478458384'}
data = urllib.urlencode(data)
for line in urllib2.urlopen('http://www.extreme-hq.com/other/dfx/test/stats.php', data):
passthis is the error i get
i dont know what any of this means or does, i know what the script is suppose to do, but im sure anyone who knows python can figure that out, does anyone know how i can fix this code?[root@localhost html]# python /var/www/html/update.py
Traceback (most recent call last):
File "/var/www/html/update.py", line 7, in ?
for line in urllib2.urlopen('http://www.extreme-hq.com/other/dfx/test/stats.php', data):
TypeError: iteration over non-sequence
any help what so ever is appreciated, thanks