<s> import os <EOL> import time <EOL> import wx <EOL> import wx . html <EOL> from eve_mlp . gui . common import webload , EVT_WEBLOAD <EOL> class NewsPanel ( wx . html . HtmlWindow ) : <EOL> def __init__ ( self , parent , url ) : <EOL> html = wx . html . HtmlWindow . __init__ ( self , parent ) <EOL> try : <EOL> if os . path . exists ( url ) : <EOL> self . SetPage ( file ( url ) . read ( ) ) <EOL> else : <EOL> self . SetPage ( "<STR_LIT>" ) <EOL> self . Bind ( EVT_WEBLOAD , self . OnWebLoad ) <EOL> webload ( self , url ) <EOL> except Exception as e : <EOL> self . SetPage ( "<STR_LIT>" % ( url , str ( e ) ) ) <EOL> def OnWebLoad ( self , evt ) : <EOL> self . SetPage ( evt . GetValue ( ) ) </s>
