def OpenHelpFile(fileName, helpCmd=None, helpArg=None):
 win32ui.DoWaitCursor(1)
 try:
  if (helpCmd is None):
   helpCmd = win32con.HELP_CONTENTS
  ext = os.path.splitext(fileName)[1].lower()
  if (ext == '.hlp'):
   win32api.WinHelp(win32ui.GetMainFrame().GetSafeHwnd(), fileName, helpCmd, helpArg)
  elif (0 and (ext == '.chm')):
   import win32help
   global htmlhelp_handle
   helpCmd = html_help_command_translators.get(helpCmd, helpCmd)
   frame = 0
   if (htmlhelp_handle is None):
    (htmlhelp_hwnd, htmlhelp_handle) = win32help.HtmlHelp(frame, None, win32help.HH_INITIALIZE)
   win32help.HtmlHelp(frame, fileName, helpCmd, helpArg)
  else:
   win32api.ShellExecute(0, 'open', fileName, None, '', win32con.SW_SHOW)
  return fileName
 finally:
  win32ui.DoWaitCursor((-1))

def OpenHelpFile ( fileName , helpCmd = None , helpArg = None ) : win32ui . DoWaitCursor ( 1 ) try : if ( helpCmd is None ) : helpCmd = win32con . HELP_CONTENTS ext = os . path . splitext ( fileName ) [ 1 ] . lower ( ) if ( ext == '.hlp' ) : win32api . WinHelp ( win32ui . GetMainFrame ( ) . GetSafeHwnd ( ) , fileName , helpCmd , helpArg ) elif ( 0 and ( ext == '.chm' ) ) : import win32help global htmlhelp_handle helpCmd = html_help_command_translators . get ( helpCmd , helpCmd ) frame = 0 if ( htmlhelp_handle is None ) : ( htmlhelp_hwnd , htmlhelp_handle ) = win32help . HtmlHelp ( frame , None , win32help . HH_INITIALIZE ) win32help . HtmlHelp ( frame , fileName , helpCmd , helpArg ) else : win32api . ShellExecute ( 0 , 'open' , fileName , None , '' , win32con . SW_SHOW ) return fileName finally : win32ui . DoWaitCursor ( ( - 1 ) )
open a help file .