Python论坛  - 讨论区

标题:[python-chinese] 关于urllib.urlopen()函数的问题

2007年04月04日 星期三 23:46

Xell Zhang xellzhang在gmail.com
星期三 四月 4 23:46:41 HKT 2007

´ó¼ÒºÃ£¬ÐÂÊÖÇë½Ì£º
ÎÒÿ´ÎÓÃurllib.urlopen(url)º¯ÊýµÄʱºò£¬ÔËÐнá¹ûÖÐ×ÜÓÐÒ»¸öÒì³££º
Exception exceptions.AttributeError: "'NoneType' object has no attribute
'print_exc'" in <
urllib.FancyURLopener instance at 0x00D59AA8>> ignored
ÎÒÔÚEclipseÏ¿ª·¢µÄ¡£
ʵÔÚ²»ÖªµÀΪʲô£¬Ã²ËÆÒ²²»Ó°ÏìÎÒµÄÔËÐнá¹û¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070404/7be347b7/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月05日 星期四 09:16

马踏飞燕 honeyday.mj在gmail.com
星期四 四月 5 09:16:01 HKT 2007

在 07-4-4,Xell Zhang<xellzhang在gmail.com> 写道:
> 大家好,新手请教:
> 我每次用urllib.urlopen(url)函数的时候,运行结果中总有一个异常:
> Exception exceptions.AttributeError: "'NoneType' object has no attribute
> 'print_exc'" in > > ignored
> 我在Eclipse下开发的。
> 实在不知道为什么,貌似也不影响我的运行结果。
>
你的python是啥版本的?
我从来没遇到过。。。

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月05日 星期四 10:24

Xell Zhang xellzhang在gmail.com
星期四 四月 5 10:24:27 HKT 2007

ÎÒÓõÄ2.5£¬Ó¦¸ÃÊÇ×îеİ汾°É

On 4/5/07, Âí̤·ÉÑà <honeyday.mj在gmail.com> wrote:
>
> ÔÚ 07-4-4£¬Xell Zhang<xellzhang在gmail.com> дµÀ£º
> > ´ó¼ÒºÃ£¬ÐÂÊÖÇë½Ì£º
> > ÎÒÿ´ÎÓÃurllib.urlopen(url)º¯ÊýµÄʱºò£¬ÔËÐнá¹ûÖÐ×ÜÓÐÒ»¸öÒì³££º
> > Exception exceptions.AttributeError: "'NoneType' object has no attribute
> > 'print_exc'" in > > > ignored
> > ÎÒÔÚEclipseÏ¿ª·¢µÄ¡£
> > ʵÔÚ²»ÖªµÀΪʲô£¬Ã²ËÆÒ²²»Ó°ÏìÎÒµÄÔËÐнá¹û¡£
> >
> ÄãµÄpythonÊÇɶ°æ±¾µÄ£¿
> ÎÒ´ÓÀ´Ã»Óöµ½¹ý¡£¡£¡£
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070405/e7e9f547/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月05日 星期四 12:42

vicalloy zbirder在gmail.com
星期四 四月 5 12:42:39 HKT 2007

没有import urllib?
在 07-4-5,Xell Zhang<xellzhang在gmail.com> 写道:
> 我用的2.5,应该是最新的版本吧
>
>
> On 4/5/07, 马踏飞燕 <honeyday.mj在gmail.com> wrote:
> > 在 07-4-4,Xell Zhang<xellzhang在gmail.com> 写道:
> > > 大家好,新手请教:
> > > 我每次用urllib.urlopen(url)函数的时候,运行结果中总有一个异常:
> > > Exception exceptions.AttributeError: "'NoneType' object has no attribute
> > > 'print_exc'" in > > > > ignored
> > > 我在Eclipse下开发的。
> > > 实在不知道为什么,貌似也不影响我的运行结果。
> > >
> > 你的python是啥版本的?
> > 我从来没遇到过。。。
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to
> python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to
> python-chinese-request在lists.python.cn
> > Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to
> python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to
> python-chinese-request在lists.python.cn
> Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月05日 星期四 13:32

Xell Zhang xellzhang在gmail.com
星期四 四月 5 13:32:49 HKT 2007

ÓÐimport urllib£¬²»È»²»¿ÉÄܳɹ¦ÔËÐа¡¡£
ÎҵijÌÐòÔËÐнá¹ûû´í£¬µ«ÊÇ×îºó»á³öÏÖÕâ¸öÒì³£µÄÌáʾ¡­¡­ÄѵÀ¾ÍÎÒÒ»¸öÈËÅöµ½ÁË¡­¡­ ÓôÃÆ¡£
ÎÒÊÇÔÚwindows xp SP2 32bit »·¾³ÏÂÔËÐеģ¬»úÆ÷ÊÇ64bitµÄ£¬²»¹ýûʲô¹Øϵ°É¡­¡­


On 4/5/07, vicalloy <zbirder在gmail.com> wrote:
>
> ûÓÐimport urllib£¿
> ÔÚ 07-4-5£¬Xell Zhang<xellzhang在gmail.com> дµÀ£º
> > ÎÒÓõÄ2.5£¬Ó¦¸ÃÊÇ×îеİ汾°É
> >
> >
> > On 4/5/07, Âí̤·ÉÑà <honeyday.mj在gmail.com> wrote:
> > > ÔÚ 07-4-4£¬Xell Zhang<xellzhang在gmail.com> дµÀ£º
> > > > ´ó¼ÒºÃ£¬ÐÂÊÖÇë½Ì£º
> > > > ÎÒÿ´ÎÓÃurllib.urlopen(url)º¯ÊýµÄʱºò£¬ÔËÐнá¹ûÖÐ×ÜÓÐÒ»¸öÒì³££º
> > > > Exception exceptions.AttributeError: "'NoneType' object has no
> attribute
> > > > 'print_exc'" in > > > > > ignored
> > > > ÎÒÔÚEclipseÏ¿ª·¢µÄ¡£
> > > > ʵÔÚ²»ÖªµÀΪʲô£¬Ã²ËÆÒ²²»Ó°ÏìÎÒµÄÔËÐнá¹û¡£
> > > >
> > > ÄãµÄpythonÊÇɶ°æ±¾µÄ£¿
> > > ÎÒ´ÓÀ´Ã»Óöµ½¹ý¡£¡£¡£
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese在lists.python.cn
> > > Subscribe: send subscribe to
> > python-chinese-request在lists.python.cn
> > > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > > Detail Info:
> > http://python.cn/mailman/listinfo/python-chinese
> >
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to
> > python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > Detail Info:
> > http://python.cn/mailman/listinfo/python-chinese
> >
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070405/bbd3f8dc/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月05日 星期四 13:34

季海明 jihaiming在163.com
星期四 四月 5 13:34:42 HKT 2007

hi, 你好, 能把脚本传我一份, 让我学习一下吗?
我刚刚学习python, 菜鸟. 想多借鉴借鉴..

> 不然不可能成功运行啊。
> 我的程序运行结果没错,但是最后会出现这个异常的提示……难道就我一个人碰到了 
> …… 郁闷。
> 我是在windows xp SP2 32bit 环境下运行的,机器是64bit的,不过没什么关系吧 
> ……



-- 
================================
你的朋友:
       海明
missing you~~~~~
Telephone:15910824796
Email: jihaiming.net在gmail.com
Office: 010-85135298


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月05日 星期四 13:43

Xell Zhang xellzhang在gmail.com
星期四 四月 5 13:43:38 HKT 2007

´úÂëºÜ¼òµ¥£¬ÈçÏ£º
def GetHtmlSource(url):
    try:
        fp = urllib.urlopen(url)
        source = fp.read()
        fp.close()
    except:
        print '\nSome error/exception occurred in function: GetHtmlSource'

    return source

start_url = 'http://www.google.com/'
page_source = GetHtmlSource(start_url)
print page_source

ÔËÐкó¿ÉÒÔÕýÈ·Êä³öÒ³ÃæÔ´Â룬µ«ÊÇ×îºó»áÓÐÄǸöÒì³££¬ÎÒ¶¼Òª·èÁË¡­¡­

On 4/5/07, ¼¾º£Ã÷ <jihaiming在163.com> wrote:
>
> hi, ÄãºÃ, Äܰѽű¾´«ÎÒÒ»·Ý, ÈÃÎÒѧϰһÏÂÂð?
> ÎÒ¸Õ¸Õѧϰpython, ²ËÄñ. Ïë¶à½è¼ø½è¼ø..
>
> > ²»È»²»¿ÉÄܳɹ¦ÔËÐа¡¡£
> > ÎҵijÌÐòÔËÐнá¹ûû´í£¬µ«ÊÇ×îºó»á³öÏÖÕâ¸öÒì³£µÄÌáʾ¡­¡­ÄѵÀ¾ÍÎÒÒ»¸öÈËÅöµ½ÁË
> > ¡­¡­ ÓôÃÆ¡£
> > ÎÒÊÇÔÚwindows xp SP2 32bit »·¾³ÏÂÔËÐеģ¬»úÆ÷ÊÇ64bitµÄ£¬²»¹ýûʲô¹Øϵ°É
> > ¡­¡­
>
>
>
> --
> ================================
> ÄãµÄÅóÓÑ:
>        º£Ã÷
> missing you~~~~~
> Telephone:15910824796
> Email: jihaiming.net在gmail.com
> Office: 010-85135298
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070405/d1c00582/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月05日 星期四 13:56

季海明 jihaiming在163.com
星期四 四月 5 13:56:36 HKT 2007

谢谢.
刚才我在我的机器上试验了一下. XP sp2, 32位
结果正常, 无异常报告.

> 代码很简单,如下:
> def GetHtmlSource(url):
>     try:
>         fp = urllib.urlopen(url)
>         source = fp.read()
>         fp.close()
>     except:
>         print '\nSome error/exception occurred in function:  
> GetHtmlSource'
>
>     return source
>
> start_url = 'http://www.google.com/'
> page_source = GetHtmlSource(start_url)
> print page_source
>
> 运行后可以正确输出页面源码,但是最后会有那个异常,我都要疯了……
>
> On 4/5/07, 季海明 <jihaiming在163.com> wrote:
>>
>> hi, 你好, 能把脚本传我一份, 让我学习一下吗?
>> 我刚刚学习python, 菜鸟. 想多借鉴借鉴..
>>
>> > 不然不可能成功运行啊。
>> > 我的程序运行结果没错,但是最后会出现这个异常的提示……难道就我一个人碰到 
>>>> > …… 郁闷。
>> > 我是在windows xp SP2 32bit 环境下运行的,机器是64bit的,不过没什么关系 
>>>> > ……
>>
>>
>>
>> --
>> ================================
>> 你的朋友:
>>        海明
>> missing you~~~~~
>> Telephone:15910824796
>> Email: jihaiming.net在gmail.com
>> Office: 010-85135298
>>
>> _______________________________________________
>> python-chinese
>> Post: send python-chinese在lists.python.cn
>> Subscribe: send subscribe to python-chinese-request在lists.python.cn
>> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
>> Detail Info: http://python.cn/mailman/listinfo/python-chinese



-- 
================================
你的朋友:
       海明
missing you~~~~~
Telephone:15910824796
Email: jihaiming.net在gmail.com
Office: 010-85135298


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月05日 星期四 14:06

Xell Zhang xellzhang在gmail.com
星期四 四月 5 14:06:07 HKT 2007

ÄѵÀÕæµÄÊÇ´«ËµÖеÄRP²»ºÃ¡­¡­ÎÒÓõÄEclipse+pydev²å¼þ£¬ºÍÕâ¸öÓйØϵ£¿ÒòΪÎÒÔÚIDELÏÂÔËÐÐûÓÐÒì³£±¨¸æ¡­¡­

On 4/5/07, ¼¾º£Ã÷ <jihaiming在163.com> wrote:
>
> лл.
> ¸Õ²ÅÎÒÔÚÎҵĻúÆ÷ÉÏÊÔÑéÁËÒ»ÏÂ. XP sp2, 32λ
> ½á¹ûÕý³£, ÎÞÒì³£±¨¸æ.
>
> > ´úÂëºÜ¼òµ¥£¬ÈçÏ£º
> > def GetHtmlSource(url):
> >     try:
> >         fp = urllib.urlopen(url)
> >         source = fp.read()
> >         fp.close()
> >     except:
> >         print '\nSome error/exception occurred in function:
> > GetHtmlSource'
> >
> >     return source
> >
> > start_url = 'http://www.google.com/'
> > page_source = GetHtmlSource(start_url)
> > print page_source
> >
> > ÔËÐкó¿ÉÒÔÕýÈ·Êä³öÒ³ÃæÔ´Â룬µ«ÊÇ×îºó»áÓÐÄǸöÒì³££¬ÎÒ¶¼Òª·èÁË¡­¡­
> >
> > On 4/5/07, ¼¾º£Ã÷ <jihaiming在163.com> wrote:
> >>
> >> hi, ÄãºÃ, Äܰѽű¾´«ÎÒÒ»·Ý, ÈÃÎÒѧϰһÏÂÂð?
> >> ÎÒ¸Õ¸Õѧϰpython, ²ËÄñ. Ïë¶à½è¼ø½è¼ø..
> >>
> >> > ²»È»²»¿ÉÄܳɹ¦ÔËÐа¡¡£
> >> > ÎҵijÌÐòÔËÐнá¹ûû´í£¬µ«ÊÇ×îºó»á³öÏÖÕâ¸öÒì³£µÄÌáʾ¡­¡­ÄѵÀ¾ÍÎÒÒ»¸öÈËÅöµ½
> >> ÁË
> >> > ¡­¡­ ÓôÃÆ¡£
> >> > ÎÒÊÇÔÚwindows xp SP2 32bit »·¾³ÏÂÔËÐеģ¬»úÆ÷ÊÇ64bitµÄ£¬²»¹ýûʲô¹Øϵ
> >> °É
> >> > ¡­¡­
> >>
> >>
> >>
> >> --
> >> ================================
> >> ÄãµÄÅóÓÑ:
> >>        º£Ã÷
> >> missing you~~~~~
> >> Telephone:15910824796
> >> Email: jihaiming.net在gmail.com
> >> Office: 010-85135298
> >>
> >> _______________________________________________
> >> python-chinese
> >> Post: send python-chinese在lists.python.cn
> >> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> >> Unsubscribe: send unsubscribe to
> python-chinese-request在lists.python.cn
> >> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
>
> --
> ================================
> ÄãµÄÅóÓÑ:
>        º£Ã÷
> missing you~~~~~
> Telephone:15910824796
> Email: jihaiming.net在gmail.com
> Office: 010-85135298
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070405/b513d7da/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月05日 星期四 14:17

季海明 jihaiming在163.com
星期四 四月 5 14:17:15 HKT 2007

呵呵. 我也是用IDEL下运行的. 没有试过Eclipse的插件. 你可以让它输出到一个文件 
中试试呢. 看还会不会出异常. 也许是打印的时候有问题.

> 难道真的是传说中的RP不好……我用的Eclipse+pydev插件,和这个有关系?因为我在 
> IDEL下运行没有异常报告……
>
> On 4/5/07, 季海明 <jihaiming在163.com> wrote:
>>
>> 谢谢.
>> 刚才我在我的机器上试验了一下. XP sp2, 32位
>> 结果正常, 无异常报告.
>>
>> > 代码很简单,如下:
>> > def GetHtmlSource(url):
>> >     try:
>> >         fp = urllib.urlopen(url)
>> >         source = fp.read()
>> >         fp.close()
>> >     except:
>> >         print '\nSome error/exception occurred in function:
>> > GetHtmlSource'
>> >
>> >     return source
>> >
>> > start_url = 'http://www.google.com/'
>> > page_source = GetHtmlSource(start_url)
>> > print page_source
>> >
>> > 运行后可以正确输出页面源码,但是最后会有那个异常,我都要疯了……
>> >
>> > On 4/5/07, 季海明 <jihaiming在163.com> wrote:
>> >>
>> >> hi, 你好, 能把脚本传我一份, 让我学习一下吗?
>> >> 我刚刚学习python, 菜鸟. 想多借鉴借鉴..
>> >>
>> >> > 不然不可能成功运行啊。
>> >> > 我的程序运行结果没错,但是最后会出现这个异常的提示……难道就我一个人 
>> 碰到
>> >> 了
>> >> > …… 郁闷。
>> >> > 我是在windows xp SP2 32bit 环境下运行的,机器是64bit的,不过没什么 
>> 关系
>> >> 吧
>> >> > ……
>> >>
>> >>
>> >>
>> >> --
>> >> ================================
>> >> 你的朋友:
>> >>        海明
>> >> missing you~~~~~
>> >> Telephone:15910824796
>> >> Email: jihaiming.net在gmail.com
>> >> Office: 010-85135298
>> >>
>> >> _______________________________________________
>> >> python-chinese
>> >> Post: send python-chinese在lists.python.cn
>> >> Subscribe: send subscribe to python-chinese-request在lists.python.cn
>> >> Unsubscribe: send unsubscribe to
>> python-chinese-request在lists.python.cn
>> >> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>>
>>
>>
>> --
>> ================================
>> 你的朋友:
>>        海明
>> missing you~~~~~
>> Telephone:15910824796
>> Email: jihaiming.net在gmail.com
>> Office: 010-85135298
>>
>> _______________________________________________
>> python-chinese
>> Post: send python-chinese在lists.python.cn
>> Subscribe: send subscribe to python-chinese-request在lists.python.cn
>> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
>> Detail Info: http://python.cn/mailman/listinfo/python-chinese



-- 
================================
你的朋友:
       海明
missing you~~~~~
Telephone:15910824796
Email: jihaiming.net在gmail.com
Office: 010-85135298


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月05日 星期四 21:39

Xell Zhang xellzhang在gmail.com
星期四 四月 5 21:39:20 HKT 2007

Ó¦¸Ã²»ÊÇ´òÓ¡µÄÎÊÌ⣬ÒòΪ¾ÍËãÎÒ²»µ÷ÓÃÒ²»á³öÏÖÕâ¸öÒì³£

On 4/5/07, ¼¾º£Ã÷ <jihaiming在163.com> wrote:
>
> ºÇºÇ. ÎÒÒ²ÊÇÓÃIDELÏÂÔËÐеÄ. ûÓÐÊÔ¹ýEclipseµÄ²å¼þ. Äã¿ÉÒÔÈÃËüÊä³öµ½Ò»¸öÎļþ
> ÖÐÊÔÊÔÄØ. ¿´»¹»á²»»á³öÒì³£. Ò²ÐíÊÇ´òÓ¡µÄʱºòÓÐÎÊÌâ.
>
> > ÄѵÀÕæµÄÊÇ´«ËµÖеÄRP²»ºÃ¡­¡­ÎÒÓõÄEclipse+pydev²å¼þ£¬ºÍÕâ¸öÓйØϵ£¿ÒòΪÎÒÔÚ
> > IDELÏÂÔËÐÐûÓÐÒì³£±¨¸æ¡­¡­
> >
> > On 4/5/07, ¼¾º£Ã÷ <jihaiming在163.com> wrote:
> >>
> >> лл.
> >> ¸Õ²ÅÎÒÔÚÎҵĻúÆ÷ÉÏÊÔÑéÁËÒ»ÏÂ. XP sp2, 32λ
> >> ½á¹ûÕý³£, ÎÞÒì³£±¨¸æ.
> >>
> >> > ´úÂëºÜ¼òµ¥£¬ÈçÏ£º
> >> > def GetHtmlSource(url):
> >> >     try:
> >> >         fp = urllib.urlopen(url)
> >> >         source = fp.read()
> >> >         fp.close()
> >> >     except:
> >> >         print '\nSome error/exception occurred in function:
> >> > GetHtmlSource'
> >> >
> >> >     return source
> >> >
> >> > start_url = 'http://www.google.com/'
> >> > page_source = GetHtmlSource(start_url)
> >> > print page_source
> >> >
> >> > ÔËÐкó¿ÉÒÔÕýÈ·Êä³öÒ³ÃæÔ´Â룬µ«ÊÇ×îºó»áÓÐÄǸöÒì³££¬ÎÒ¶¼Òª·èÁË¡­¡­
> >> >
> >> > On 4/5/07, ¼¾º£Ã÷ <jihaiming在163.com> wrote:
> >> >>
> >> >> hi, ÄãºÃ, Äܰѽű¾´«ÎÒÒ»·Ý, ÈÃÎÒѧϰһÏÂÂð?
> >> >> ÎÒ¸Õ¸Õѧϰpython, ²ËÄñ. Ïë¶à½è¼ø½è¼ø..
> >> >>
> >> >> > ²»È»²»¿ÉÄܳɹ¦ÔËÐа¡¡£
> >> >> > ÎҵijÌÐòÔËÐнá¹ûû´í£¬µ«ÊÇ×îºó»á³öÏÖÕâ¸öÒì³£µÄÌáʾ¡­¡­ÄѵÀ¾ÍÎÒÒ»¸öÈË
> >> Åöµ½
> >> >> ÁË
> >> >> > ¡­¡­ ÓôÃÆ¡£
> >> >> > ÎÒÊÇÔÚwindows xp SP2 32bit »·¾³ÏÂÔËÐеģ¬»úÆ÷ÊÇ64bitµÄ£¬²»¹ýûʲô
> >> ¹Øϵ
> >> >> °É
> >> >> > ¡­¡­
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> ================================
> >> >> ÄãµÄÅóÓÑ:
> >> >>        º£Ã÷
> >> >> missing you~~~~~
> >> >> Telephone:15910824796
> >> >> Email: jihaiming.net在gmail.com
> >> >> Office: 010-85135298
> >> >>
> >> >> _______________________________________________
> >> >> python-chinese
> >> >> Post: send python-chinese在lists.python.cn
> >> >> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> >> >> Unsubscribe: send unsubscribe to
> >> python-chinese-request在lists.python.cn
> >> >> Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >>
> >>
> >>
> >> --
> >> ================================
> >> ÄãµÄÅóÓÑ:
> >>        º£Ã÷
> >> missing you~~~~~
> >> Telephone:15910824796
> >> Email: jihaiming.net在gmail.com
> >> Office: 010-85135298
> >>
> >> _______________________________________________
> >> python-chinese
> >> Post: send python-chinese在lists.python.cn
> >> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> >> Unsubscribe: send unsubscribe to
> python-chinese-request在lists.python.cn
> >> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
>
> --
> ================================
> ÄãµÄÅóÓÑ:
>        º£Ã÷
> missing you~~~~~
> Telephone:15910824796
> Email: jihaiming.net在gmail.com
> Office: 010-85135298
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070405/356587eb/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月06日 星期五 12:20

Xell Zhang xellzhang在gmail.com
星期五 四月 6 12:20:26 HKT 2007

ÎÒ»¹·¢ÏÖÒ»µã£¬Õâ¸öÎÊÌâÖ»³öÏÖÔÚÎÒÔÚEclipseÏÂDebug£¬¶ø²»³öÏÖÔÚRunµÄʱºò£¬¿ÉÄܺÍdebugÓйØ

On 4/5/07, Xell Zhang <xellzhang在gmail.com> wrote:
>
> Ó¦¸Ã²»ÊÇ´òÓ¡µÄÎÊÌ⣬ÒòΪ¾ÍËãÎÒ²»µ÷ÓÃÒ²»á³öÏÖÕâ¸öÒì³£
>
> On 4/5/07, ¼¾º£Ã÷ <jihaiming在163.com> wrote:
> >
> > ºÇºÇ. ÎÒÒ²ÊÇÓÃIDELÏÂÔËÐеÄ. ûÓÐÊÔ¹ýEclipseµÄ²å¼þ. Äã¿ÉÒÔÈÃËüÊä³öµ½Ò»¸öÎļþ
> > ÖÐÊÔÊÔÄØ. ¿´»¹»á²»»á³öÒì³£. Ò²ÐíÊÇ´òÓ¡µÄʱºòÓÐÎÊÌâ.
> >
> > > ÄѵÀÕæµÄÊÇ´«ËµÖеÄRP²»ºÃ¡­¡­ÎÒÓõÄEclipse+pydev²å¼þ£¬ºÍÕâ¸öÓйØϵ£¿ÒòΪÎÒÔÚ
> > > IDELÏÂÔËÐÐûÓÐÒì³£±¨¸æ¡­¡­
> > >
> > > On 4/5/07, ¼¾º£Ã÷ < jihaiming在163.com> wrote:
> > >>
> > >> лл.
> > >> ¸Õ²ÅÎÒÔÚÎҵĻúÆ÷ÉÏÊÔÑéÁËÒ»ÏÂ. XP sp2, 32λ
> > >> ½á¹ûÕý³£, ÎÞÒì³£±¨¸æ.
> > >>
> > >> > ´úÂëºÜ¼òµ¥£¬ÈçÏ£º
> > >> > def GetHtmlSource(url):
> > >> >     try:
> > >> >         fp = urllib.urlopen(url)
> > >> >         source = fp.read()
> > >> >         fp.close()
> > >> >     except:
> > >> >         print '\nSome error/exception occurred in function:
> > >> > GetHtmlSource'
> > >> >
> > >> >     return source
> > >> >
> > >> > start_url = 'http://www.google.com/'
> > >> > page_source = GetHtmlSource(start_url)
> > >> > print page_source
> > >> >
> > >> > ÔËÐкó¿ÉÒÔÕýÈ·Êä³öÒ³ÃæÔ´Â룬µ«ÊÇ×îºó»áÓÐÄǸöÒì³££¬ÎÒ¶¼Òª·èÁË¡­¡­
> > >> >
> > >> > On 4/5/07, ¼¾º£Ã÷ <jihaiming在163.com> wrote:
> > >> >>
> > >> >> hi, ÄãºÃ, Äܰѽű¾´«ÎÒÒ»·Ý, ÈÃÎÒѧϰһÏÂÂð?
> > >> >> ÎÒ¸Õ¸Õѧϰpython, ²ËÄñ. Ïë¶à½è¼ø½è¼ø..
> > >> >>
> > >> >> > ²»È»²»¿ÉÄܳɹ¦ÔËÐа¡¡£
> > >> >> > ÎҵijÌÐòÔËÐнá¹ûû´í£¬µ«ÊÇ×îºó»á³öÏÖÕâ¸öÒì³£µÄÌáʾ¡­¡­ÄѵÀ¾ÍÎÒÒ»¸öÈË
> > >> Åöµ½
> > >> >> ÁË
> > >> >> > ¡­¡­ ÓôÃÆ¡£
> > >> >> > ÎÒÊÇÔÚwindows xp SP2 32bit »·¾³ÏÂÔËÐеģ¬»úÆ÷ÊÇ64bitµÄ£¬²»¹ýûʲô
> > >> ¹Øϵ
> > >> >> °É
> > >> >> > ¡­¡­
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> ================================
> > >> >> ÄãµÄÅóÓÑ:
> > >> >>        º£Ã÷
> > >> >> missing you~~~~~
> > >> >> Telephone:15910824796
> > >> >> Email: jihaiming.net在gmail.com
> > >> >> Office: 010-85135298
> > >> >>
> > >> >> _______________________________________________
> > >> >> python-chinese
> > >> >> Post: send python-chinese在lists.python.cn
> > >> >> Subscribe: send subscribe to
> > python-chinese-request在lists.python.cn
> > >> >> Unsubscribe: send unsubscribe to
> > >> python-chinese-request在lists.python.cn
> > >> >> Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > >>
> > >>
> > >>
> > >> --
> > >> ================================
> > >> ÄãµÄÅóÓÑ:
> > >>        º£Ã÷
> > >> missing you~~~~~
> > >> Telephone:15910824796
> > >> Email: jihaiming.net在gmail.com
> > >> Office: 010-85135298
> > >>
> > >> _______________________________________________
> > >> python-chinese
> > >> Post: send python-chinese在lists.python.cn
> > >> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > >> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> >
> > >> Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
> >
> >
> > --
> > ================================
> > ÄãµÄÅóÓÑ:
> >        º£Ã÷
> > missing you~~~~~
> > Telephone:15910824796
> > Email: jihaiming.net在gmail.com
> > Office: 010-85135298
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070406/5622fa6b/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年04月07日 星期六 00:39

马踏飞燕 honeyday.mj在gmail.com
星期六 四月 7 00:39:05 HKT 2007

这个应该是pydev的问题了,不影响编程的话就不用管了。

在 07-4-6,Xell Zhang<xellzhang在gmail.com> 写道:
> 我还发现一点,这个问题只出现在我在Eclipse下Debug,而不出现在Run的时候,可能和debug有关
>
>
> On 4/5/07, Xell Zhang <xellzhang在gmail.com> wrote:
> > 应该不是打印的问题,因为就算我不调用也会出现这个异常
> >
> >
> >
> > On 4/5/07, 季海明 <jihaiming在163.com> wrote:
> > > 呵呵. 我也是用IDEL下运行的. 没有试过Eclipse的插件. 你可以让它输出到一个文件
> > > 中试试呢. 看还会不会出异常. 也许是打印的时候有问题.
> > >
> > > > 难道真的是传说中的RP不好……我用的Eclipse+pydev插件,和这个有关系?因为我在
> > > > IDEL下运行没有异常报告……
> > > >
> > > > On 4/5/07, 季海明 < jihaiming在163.com> wrote:
> > > >>
> > > >> 谢谢.
> > > >> 刚才我在我的机器上试验了一下. XP sp2, 32位
> > > >> 结果正常, 无异常报告.
> > > >>
> > > >> > 代码很简单,如下:
> > > >> > def GetHtmlSource(url):
> > > >> >     try:
> > > >> >         fp = urllib.urlopen(url)
> > > >> >         source = fp.read()
> > > >> >         fp.close()
> > > >> >     except:
> > > >> >         print '\nSome error/exception occurred in function:
> > > >> > GetHtmlSource'
> > > >> >
> > > >> >     return source
> > > >> >
> > > >> > start_url = ' http://www.google.com/'
> > > >> > page_source = GetHtmlSource(start_url)
> > > >> > print page_source
> > > >> >
> > > >> > 运行后可以正确输出页面源码,但是最后会有那个异常,我都要疯了……
> > > >> >
> > > >> > On 4/5/07, 季海明 < jihaiming在163.com> wrote:
> > > >> >>
> > > >> >> hi, 你好, 能把脚本传我一份, 让我学习一下吗?
> > > >> >> 我刚刚学习python, 菜鸟. 想多借鉴借鉴..
> > > >> >>
> > > >> >> > 不然不可能成功运行啊。
> > > >> >> > 我的程序运行结果没错,但是最后会出现这个异常的提示……难道就我一个人
> > > >> 碰到
> > > >> >> 了
> > > >> >> > …… 郁闷。
> > > >> >> > 我是在windows xp SP2 32bit 环境下运行的,机器是64bit的,不过没什么
> > > >> 关系
> > > >> >> 吧
> > > >> >> > ……
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >> --
> > > >> >> ================================
> > > >> >> 你的朋友:
> > > >> >>        海明
> > > >> >> missing you~~~~~
> > > >> >> Telephone:15910824796
> > > >> >> Email: jihaiming.net在gmail.com
> > > >> >> Office: 010-85135298
> > > >> >>
> > > >> >> _______________________________________________
> > > >> >> python-chinese
> > > >> >> Post: send python-chinese在lists.python.cn
> > > >> >> Subscribe: send subscribe to
> python-chinese-request在lists.python.cn
> > > >> >> Unsubscribe: send unsubscribe to
> > > >> python-chinese-request在lists.python.cn
> > > >> >> Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> ================================
> > > >> 你的朋友:
> > > >>        海明
> > > >> missing you~~~~~
> > > >> Telephone:15910824796
> > > >> Email: jihaiming.net在gmail.com
> > > >> Office: 010-85135298
> > > >>
> > > >> _______________________________________________
> > > >> python-chinese
> > > >> Post: send python-chinese在lists.python.cn
> > > >> Subscribe: send subscribe to
> python-chinese-request在lists.python.cn
> > > >> Unsubscribe: send unsubscribe to
> python-chinese-request在lists.python.cn
> > > >> Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
> > >
> > >
> > >
> > > --
> > > ================================
> > > 你的朋友:
> > >        海明
> > > missing you~~~~~
> > > Telephone:15910824796
> > > Email: jihaiming.net在gmail.com
> > > Office: 010-85135298
> > >
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese在lists.python.cn
> > > Subscribe: send subscribe to
> python-chinese-request在lists.python.cn
> > > Unsubscribe: send unsubscribe to
> python-chinese-request在lists.python.cn
> > > Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
> >
> >
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to
> python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to
> python-chinese-request在lists.python.cn
> Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号