Python论坛  - 讨论区

标题:[python-chinese] 求助:为什么我的wxPython中的wx.html.HtmlWindow不能工作

2007年04月07日 星期六 22:13

Li Qingfeng liqfemail在gmail.com
星期六 四月 7 22:13:27 HKT 2007

Îļþ´úÂëÈçÏ£º
import wx
import wx.html

class MyHtmlFrame(wx.Frame):

    def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, -1, title, size=(600,400))
        html = wx.html.HtmlWindow(self)
        if "gtk2" in wx.PlatformInfo:
            html.SetStandardFonts()
        html.LoadPage(
            "
http://www.pythonthreads.com/articles/python/incorporating-into-wxpython-part-1.html
")

app = wx.PySimpleApp()
frm = MyHtmlFrame(None, "Simple HTML Browser")
frm.Show()
app.MainLoop()

ÕâÖ»ÊÇÕÕ°áwxPython in
actionÊéÖеÄÀý×Ó£¬µ«Ã¿´ÎÔËÐоͻáÕ¼cpu100%£¬¶øÇÒ²¢Ã»ÓÐFrameÏÔʾ³öÀ´¡£Ö»ÖªµÀÎÊÌâ³öÔÚLoadPageº¯ÊýÄÇÀÓÃÆäËûº¯ÊýÈçSetPageÊÇ¿ÉÒԵġ£Çë¸÷λָ½Ì£¡
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070407/ed5ee9bf/attachment.htm 

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

2007年04月09日 星期一 10:02

马踏飞燕 honeyday.mj在gmail.com
星期一 四月 9 10:02:54 HKT 2007

找个简单的页面,那个页面太复杂了,而且访问的速度也太慢。
py.html只适合显示一些自己写的简单的html帮助页面,要想显示外面的网站,还是用封装了IE的那个activex控件吧。

在 07-4-7,Li Qingfeng<liqfemail在gmail.com> 写道:
> 文件代码如下:
> import wx
> import wx.html
>
> class MyHtmlFrame(wx.Frame):
>
>     def __init__(self, parent, title):
>         wx.Frame.__init__(self, parent, -1, title, size=(600,400))
>         html = wx.html.HtmlWindow (self)
>         if "gtk2" in wx.PlatformInfo:
>             html.SetStandardFonts()
>         html.LoadPage(
>             "
> http://www.pythonthreads.com/articles/python/incorporating-into-wxpython-part-1.html")
>
> app = wx.PySimpleApp()
> frm = MyHtmlFrame(None, "Simple HTML Browser")
> frm.Show()
> app.MainLoop()
>
> 这只是照搬wxPython in
> action书中的例子,但每次运行就会占cpu100%,而且并没有Frame显示出来。只知道问题出在LoadPage函数那里,用其他函数如SetPage是可以的。请各位指教!
>
> _______________________________________________
> 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月09日 星期一 11:11

Li Qingfeng liqfemail在gmail.com
星期一 四月 9 11:11:53 HKT 2007

ÔÚGoogle
groupµÄPython°æÉÏÓÐÈ˸øÎһشðÁË£¬ÒªÔÚMainLoop()¿ªÊ¼Ö®ºóLoadPage()²Å¿ÉÒÔÕý³£¹¤×÷£¬±ÈÈçÔÚ¸÷ÖÖʼþ´¦Àíº¯ÊýÖÐLoadPage()£¬ÊÔ¹ýȷʵÈç´Ë¡£
µ«ÊÇHtmlWindowµÄÏÔʾЧ¹ûȷʵ²»¼Ñ£¬ºÜ¶à¸´ÔÓÒ»µãµÄÒ³ÃæÔªËض¼²»ÄÜÕý³£ÏÔʾ¡£
²»ÖªµÀpython GUIÖÐÔõôǶÈëIE£¬Çë¸øÎÒÖ¸µã¡£

ÔÚ07-4-9£¬Âí̤·ÉÑà <honeyday.mj在gmail.com> дµÀ£º
>
> ÕÒ¸ö¼òµ¥µÄÒ³Ã棬ÄǸöÒ³ÃæÌ«¸´ÔÓÁË£¬¶øÇÒ·ÃÎʵÄËÙ¶ÈҲ̫Âý¡£
> py.htmlÖ»ÊʺÏÏÔʾһЩ×Ô¼ºÐ´µÄ¼òµ¥µÄhtml°ïÖúÒ³Ã棬ҪÏëÏÔʾÍâÃæµÄÍøÕ¾£¬»¹ÊÇÓ÷â×°ÁËIEµÄÄǸöactivex¿Ø¼þ°É¡£
>
> ÔÚ 07-4-7£¬Li Qingfeng<liqfemail在gmail.com> дµÀ£º
> > Îļþ´úÂëÈçÏ£º
> > import wx
> > import wx.html
> >
> > class MyHtmlFrame(wx.Frame):
> >
> >     def __init__(self, parent, title):
> >         wx.Frame.__init__(self, parent, -1, title, size=(600,400))
> >         html = wx.html.HtmlWindow (self)
> >         if "gtk2" in wx.PlatformInfo:
> >             html.SetStandardFonts()
> >         html.LoadPage(
> >             "
> >
> http://www.pythonthreads.com/articles/python/incorporating-into-wxpython-part-1.html
> ")
> >
> > app = wx.PySimpleApp()
> > frm = MyHtmlFrame(None, "Simple HTML Browser")
> > frm.Show()
> > app.MainLoop()
> >
> > ÕâÖ»ÊÇÕÕ°áwxPython in
> >
> actionÊéÖеÄÀý×Ó£¬µ«Ã¿´ÎÔËÐоͻáÕ¼cpu100%£¬¶øÇÒ²¢Ã»ÓÐFrameÏÔʾ³öÀ´¡£Ö»ÖªµÀÎÊÌâ³öÔÚLoadPageº¯ÊýÄÇÀÓÃÆäËûº¯ÊýÈçSetPageÊÇ¿ÉÒԵġ£Çë¸÷λָ½Ì£¡
> >
> > _______________________________________________
> > 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/20070409/bf0f7ed3/attachment.htm 

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

2007年04月09日 星期一 11:20

jessinio smith jessinio在gmail.com
星期一 四月 9 11:20:13 HKT 2007

"python GUIÖÐÔõôǶÈëIE"ÓÐÕâÖÖÓ÷¨µÄÂ𣿣¿

ÎÒºÜÏ뿴һϣ¡



On 4/9/07, Li Qingfeng <liqfemail在gmail.com> wrote:
>
> ÔÚGoogle
> groupµÄPython°æÉÏÓÐÈ˸øÎһشðÁË£¬ÒªÔÚMainLoop()¿ªÊ¼Ö®ºóLoadPage()²Å¿ÉÒÔÕý³£¹¤×÷£¬±ÈÈçÔÚ¸÷ÖÖʼþ´¦Àíº¯ÊýÖÐLoadPage()£¬ÊÔ¹ýȷʵÈç´Ë¡£
> µ«ÊÇHtmlWindowµÄÏÔʾЧ¹ûȷʵ²»¼Ñ£¬ºÜ¶à¸´ÔÓÒ»µãµÄÒ³ÃæÔªËض¼²»ÄÜÕý³£ÏÔʾ¡£
> ²»ÖªµÀpython GUIÖÐÔõôǶÈëIE£¬Çë¸øÎÒÖ¸µã¡£
>
> ÔÚ07-4-9£¬ Âí̤·ÉÑà <honeyday.mj在gmail.com> дµÀ£º
> >
> > ÕÒ¸ö¼òµ¥µÄÒ³Ã棬ÄǸöÒ³ÃæÌ«¸´ÔÓÁË£¬¶øÇÒ·ÃÎʵÄËÙ¶ÈҲ̫Âý¡£
> > py.htmlÖ»ÊʺÏÏÔʾһЩ×Ô¼ºÐ´µÄ¼òµ¥µÄhtml°ïÖúÒ³Ã棬ҪÏëÏÔʾÍâÃæµÄÍøÕ¾£¬»¹ÊÇÓ÷â×°ÁËIEµÄÄǸöactivex¿Ø¼þ°É¡£
> >
> > ÔÚ 07-4-7£¬Li Qingfeng<liqfemail在gmail.com> дµÀ£º
> > > Îļþ´úÂëÈçÏ£º
> > > import wx
> > > import wx.html
> > >
> > > class MyHtmlFrame(wx.Frame):
> > >
> > >     def __init__(self, parent, title):
> > >         wx.Frame.__init__(self, parent, -1, title, size=(600,400))
> > >         html = wx.html.HtmlWindow (self)
> > >         if "gtk2" in wx.PlatformInfo:
> > >             html.SetStandardFonts()
> > >         html.LoadPage(
> > >             "
> > >
> > http://www.pythonthreads.com/articles/python/incorporating-into-wxpython-part-1.html
> > ")
> > >
> > > app = wx.PySimpleApp()
> > > frm = MyHtmlFrame(None, "Simple HTML Browser")
> > > frm.Show()
> > > app.MainLoop()
> > >
> > > ÕâÖ»ÊÇÕÕ°áwxPython in
> > >
> > actionÊéÖеÄÀý×Ó£¬µ«Ã¿´ÎÔËÐоͻáÕ¼cpu100%£¬¶øÇÒ²¢Ã»ÓÐFrameÏÔʾ³öÀ´¡£Ö»ÖªµÀÎÊÌâ³öÔÚLoadPageº¯ÊýÄÇÀÓÃÆäËûº¯ÊýÈçSetPageÊÇ¿ÉÒԵġ£Çë¸÷λָ½Ì£¡
> > >
> > > _______________________________________________
> > > 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/20070409/ed5f5d38/attachment.htm 

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

2007年04月09日 星期一 11:24

Li Qingfeng liqfemail在gmail.com
星期一 四月 9 11:24:22 HKT 2007

ÎÒµÄÒâ˼¾ÍÊÇÔÚÎÒµÄÈí¼þ½çÃæÀïÃæǶÈëÒ»¸ö¼òµ¥µÄä¯ÀÀÆ÷Panel²é¿´Ä³¸öÌض¨µÄURLÍøÒ³£¬HtmlWindow¾ÍÊÇÏÔʾЧ¹ûÌ«²îÁËÒ»µã¡£²»ÖªµÀÓÐʲô°ì·¨¿ÉÒÔ½â¾öÕâ¸öÎÊÌâ¡£

ÔÚ07-4-9£¬jessinio smith <jessinio在gmail.com> дµÀ£º
>
> "python GUIÖÐÔõôǶÈëIE"ÓÐÕâÖÖÓ÷¨µÄÂ𣿣¿
>
> ÎÒºÜÏ뿴һϣ¡
>
>
>
> On 4/9/07, Li Qingfeng <liqfemail在gmail.com> wrote:
> >
> > ÔÚGoogle
> > groupµÄPython°æÉÏÓÐÈ˸øÎһشðÁË£¬ÒªÔÚMainLoop()¿ªÊ¼Ö®ºóLoadPage()²Å¿ÉÒÔÕý³£¹¤×÷£¬±ÈÈçÔÚ¸÷ÖÖʼþ´¦Àíº¯ÊýÖÐLoadPage()£¬ÊÔ¹ýȷʵÈç´Ë¡£
> >
> > µ«ÊÇHtmlWindowµÄÏÔʾЧ¹ûȷʵ²»¼Ñ£¬ºÜ¶à¸´ÔÓÒ»µãµÄÒ³ÃæÔªËض¼²»ÄÜÕý³£ÏÔʾ¡£
> > ²»ÖªµÀpython GUIÖÐÔõôǶÈëIE£¬Çë¸øÎÒÖ¸µã¡£
> >
> > ÔÚ07-4-9£¬ Âí̤·ÉÑà <honeyday.mj在gmail.com> дµÀ£º
> > >
> > > ÕÒ¸ö¼òµ¥µÄÒ³Ã棬ÄǸöÒ³ÃæÌ«¸´ÔÓÁË£¬¶øÇÒ·ÃÎʵÄËÙ¶ÈҲ̫Âý¡£
> > > py.htmlÖ»ÊʺÏÏÔʾһЩ×Ô¼ºÐ´µÄ¼òµ¥µÄhtml°ïÖúÒ³Ã棬ҪÏëÏÔʾÍâÃæµÄÍøÕ¾£¬»¹ÊÇÓ÷â×°ÁËIEµÄÄǸöactivex¿Ø¼þ°É¡£
> > >
> > > ÔÚ 07-4-7£¬Li Qingfeng< liqfemail在gmail.com> дµÀ£º
> > > > Îļþ´úÂëÈçÏ£º
> > > > import wx
> > > > import wx.html
> > > >
> > > > class MyHtmlFrame(wx.Frame):
> > > >
> > > >     def __init__(self, parent, title):
> > > >         wx.Frame.__init__(self, parent, -1, title, size=(600,400))
> > > >         html = wx.html.HtmlWindow (self)
> > > >         if "gtk2" in wx.PlatformInfo:
> > > >             html.SetStandardFonts()
> > > >         html.LoadPage(
> > > >             "
> > > >
> > > http://www.pythonthreads.com/articles/python/incorporating-into-wxpython-part-1.html
> > > ")
> > > >
> > > > app = wx.PySimpleApp()
> > > > frm = MyHtmlFrame(None, "Simple HTML Browser")
> > > > frm.Show()
> > > > app.MainLoop()
> > > >
> > > > ÕâÖ»ÊÇÕÕ°áwxPython in
> > > >
> > > actionÊéÖеÄÀý×Ó£¬µ«Ã¿´ÎÔËÐоͻáÕ¼cpu100%£¬¶øÇÒ²¢Ã»ÓÐFrameÏÔʾ³öÀ´¡£Ö»ÖªµÀÎÊÌâ³öÔÚLoadPageº¯ÊýÄÇÀÓÃÆäËûº¯ÊýÈçSetPageÊÇ¿ÉÒԵġ£Çë¸÷λָ½Ì£¡
> > > >
> > > > _______________________________________________
> > > > 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
> >
>
>
>
> --
> ×¢ÒâÉíÌ壬ÉíÌåÊǸïÃüµÄ±¾Ç®£¡£¡
> _______________________________________________
> 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/20070409/ba2efdc3/attachment.html 

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

2007年04月09日 星期一 11:47

Can Xue xuecan在gmail.com
星期一 四月 9 11:47:43 HKT 2007

wxPython Demo 里面有个 ActiveX_IEHtmlWindow 的例子

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

2007年04月09日 星期一 12:16

Li Qingfeng liqfemail在gmail.com
星期一 四月 9 12:16:04 HKT 2007

Õâ¸ö¹ûÈ»Ï൱ºÃÓ㬳ýÁ˲»ÄÜ¿çƽ̨¡£Ð»Ð»ÄãÁË£¡

2007/4/9, Can Xue <xuecan在gmail.com>:
>
> wxPython Demo ÀïÃæÓиö ActiveX_IEHtmlWindow µÄÀý×Ó
> _______________________________________________
> 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/20070409/70c7e3f9/attachment.htm 

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

2007年04月09日 星期一 21:25

马踏飞燕 honeyday.mj在gmail.com
星期一 四月 9 21:25:06 HKT 2007

哈哈,手真快呀!
就是这个了,我现在用的也是。
原来的HtmlWindow最大的用途就是做一个about对话框了,呵呵。

2007/4/9, Can Xue <xuecan在gmail.com>:
> wxPython Demo 里面有个 ActiveX_IEHtmlWindow 的例子
> _______________________________________________
> 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月10日 星期二 12:57

Can Xue xuecan在gmail.com
星期二 四月 10 12:57:55 HKT 2007

ActiveX_IEHtmlWindow 也有问题,高度依赖于最终用户对 IE
的设置。如果安全性设置为高,又或者有许多提示尚未屏蔽(对于新装的机器或者极少使用 IE 的用户),嵌入的
ActiveX_IEHtmlWindow 表现将无法预测。

在 07-4-9,马踏飞燕<honeyday.mj在gmail.com> 写道:
> 哈哈,手真快呀!
> 就是这个了,我现在用的也是。
> 原来的HtmlWindow最大的用途就是做一个about对话框了,呵呵。
>
> 2007/4/9, Can Xue <xuecan在gmail.com>:
> > wxPython Demo 里面有个 ActiveX_IEHtmlWindow 的例子
> > _______________________________________________
> > 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号