2005年02月10日 星期四 19:09
import urllib
params = urllib.urlencode({'q': '喜剧片', 'p': 'Seed', 'b': 30})
f = urllib.urlopen('http://www.bitower.com/search.aspx?%s' % params)
print f.read()
如上代码可以正确执行的,根据帮助,它还可以这样调用 urlopen(url, params)
因此上面的也可以这样写
f = urllib.urlopen('http://www.bitower.com/search.aspx', params)
上述例子都是可行的,可是当我使用类似的代码来访问下面的url时,只有前一种调用方式能够返回正确的结果
http://www.cma.gov.cn/netcenter_news/qxyb/city/index.php
参数为city,值为国内的一些城市名,比如上海北京无锡桂林
--
茫茫人海,你是我的最爱
2005年02月11日 星期五 21:37
python-chinese,您好! hi 致 礼! 韩非 aidiseng100 at 163.com 2005-02-11
2005年02月11日 星期五 21:39
韩非,您好! w ======= 2005-02-11 21:37:00 您在来信中写道:======= >python-chinese,您好! > > hi > > 致 >礼! > > > 韩非 > aidiseng100 at 163.com > 2005-02-11 > > > >_______________________________________________ >python-chinese list >python-chinese at lists.python.cn >http://python.cn/mailman/listinfo/python-chinese = = = = = = = = = = = = = = = = = = = = 致 礼! 韩非 aidiseng100 at 163.com 2005-02-11
2005年02月11日 星期五 21:44
python-chinese,您好!
大家好 ,我头一次用这个呀 不明白 这个不和新闻组一样 也和BBS不一样
它就是靠收发EMAIL来解决问题吗?
谢谢
致
礼!
韩非
aidiseng100 at 163.com
2005-02-11
2005年02月11日 星期五 23:16
duotaiya duotaiya,您好! 还是不明白,能不能给分析一下。谢谢 ======= 2005-02-10 11:11:00 您在来信中写道:======= >你看看下面,应该算是比较清楚的了 >a=self.treeview.get_selection() >(model, iter) =a.get_selected() >values=self.liststore.get(iter,0) > > --- 唐国巍 <tgw_cl at 163.net> 的正文: >> ,您好! >> >> >> >用event.GetSelection()可以得到鼠标单击的列表框中该项的索引值,那怎么得到该项的真正的值 >> >> 致 >> 礼! >> >> >> 唐国巍 >> tgw_cl at 163.net >> 2005-02-09 >> > _______________________________________________ >> python-chinese list >> python-chinese at lists.python.cn >> http://python.cn/mailman/listinfo/python-chinese >> > >_________________________________________________________ >Do You Yahoo!? >150万曲MP3疯狂搜,带您闯入音乐殿堂 >http://music.yisou.com/ >美女明星应有尽有,搜遍美图、艳图和酷图 >http://image.yisou.com >1G就是1000兆,雅虎电邮自助扩容! >http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/ >_______________________________________________ >python-chinese list >python-chinese at lists.python.cn >http://python.cn/mailman/listinfo/python-chinese = = = = = = = = = = = = = = = = = = = = 致 礼! 唐国巍 tgw_cl at 163.net 2005-02-11
2005年02月12日 星期六 04:59
唐国巍,您好!
你好 我是学PYTHON的新手
能和你交个朋友吗
======= 2005-02-11 23:16:00 您在来信中写道:=======
>duotaiya duotaiya,您好!
>
> 还是不明白,能不能给分析一下。谢谢
>
>======= 2005-02-10 11:11:00 您在来信中写道:=======
>
>>你看看下面,应该算是比较清楚的了
>>a=self.treeview.get_selection()
>>(model, iter) =a.get_selected()
>>values=self.liststore.get(iter,0)
>>
>> --- 唐国巍 <tgw_cl at 163.net> 的正文:
>>> ,您好!
>>>
>>>
>>>
>>用event.GetSelection()可以得到鼠标单击的列表框中该项的索引值,那怎么得到该项的真正的值
>>>
>>> 致
>>> 礼!
>>>
>>>
>>> 唐国巍
>>> tgw_cl at 163.net
>>> 2005-02-09
>>> > _______________________________________________
>>> python-chinese list
>>> python-chinese at lists.python.cn
>>> http://python.cn/mailman/listinfo/python-chinese
>>>
>>
>>_________________________________________________________
>>Do You Yahoo!?
>>150万曲MP3疯狂搜,带您闯入音乐殿堂
>>http://music.yisou.com/
>>美女明星应有尽有,搜遍美图、艳图和酷图
>>http://image.yisou.com
>>1G就是1000兆,雅虎电邮自助扩容!
>>http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
>>_______________________________________________
>>python-chinese list
>>python-chinese at lists.python.cn
>>http://python.cn/mailman/listinfo/python-chinese
>
>= = = = = = = = = = = = = = = = = = = =
>
>
> 致
>礼!
>
>
> 唐国巍
> tgw_cl at 163.net
> 2005-02-11
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese
= = = = = = = = = = = = = = = = = = = =
致
礼!
韩非
aidiseng100 at 163.com
2005-02-12
2005年02月12日 星期六 15:03
这两种不同的调用是对应cgi的两种不同的调用方式,get和post。而在后台这是两
种不同的实现。有可能你的问题是只实现了get方法 。
大熊 wrote:
> import urllib
> params = urllib.urlencode({'q': '喜剧片', 'p': 'Seed', 'b': 30})
> f = urllib.urlopen('http://www.bitower.com/search.aspx?%s' % params)
> print f.read()
>
> 如上代码可以正确执行的,根据帮助,它还可以这样调用 urlopen(url, params)
> 因此上面的也可以这样写
> f = urllib.urlopen('http://www.bitower.com/search.aspx', params)
>
> 上述例子都是可行的,可是当我使用类似的代码来访问下面的url时,只有前一种调用方式能够返回正确的结果
> http://www.cma.gov.cn/netcenter_news/qxyb/city/index.php
> 参数为city,值为国内的一些城市名,比如上海北京无锡桂林
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> python-chinese list
> python-chinese at lists.python.cn
> http://python.cn/mailman/listinfo/python-chinese
--
I love python!
My Blog: http://www.donews.net/limodou
Zeuux © 2025
京ICP备05028076号