2007年04月07日 星期六 22:13
Îļþ´úÂëÈçÏ£º 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
2007年04月09日 星期一 10:02
找个简单的页面,那个页面太复杂了,而且访问的速度也太慢。 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 >
2007年04月09日 星期一 11:11
ÔÚ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
2007年04月09日 星期一 11:20
"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
2007年04月09日 星期一 11:24
ÎÒµÄÒâ˼¾ÍÊÇÔÚÎÒµÄÈí¼þ½çÃæÀïÃæǶÈëÒ»¸ö¼òµ¥µÄä¯ÀÀÆ÷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
2007年04月09日 星期一 11:47
wxPython Demo 里面有个 ActiveX_IEHtmlWindow 的例子
2007年04月09日 星期一 12:16
Õâ¸ö¹ûÈ»Ï൱ºÃÓ㬳ýÁ˲»ÄÜ¿çƽ̨¡£Ð»Ð»ÄãÁË£¡ 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
2007年04月09日 星期一 21:25
哈哈,手真快呀! 就是这个了,我现在用的也是。 原来的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
2007年04月10日 星期二 12:57
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
Zeuux © 2025
京ICP备05028076号