a oe@slddlZddlZddlZddlZdZdZdZddZddZd d Z dd l m Z e d krhddl Z e dS) NzThis demo program is not designed to be run as a Script, but is probably used by some other test program. Please try another demo. zThis demo program can only be run from inside of Pythonwin You must start Pythonwin, and select 'Run' from the toolbar or File menu zThis demo program is a 'Pythonwin Application'. It is more demo code than an example of Pythonwin's capabilities. To run it, you must execute the command: pythonwin.exe /app "%s" Would you like to execute it now? cCsddl}|tddS)NrDemos)win32ui MessageBox NotScriptMsg)rr@C:\Program Files\Certbot\pkgs\pythonwin\pywin\Demos\demoutils.py NotAScript!srcCs&ddlm}|}|s"ttd|S)Nr HaveGoodGUIr)pywin.framework.appr rr NeedGUIMsg)r rcrrr NeedGoodGUI's   rc Csddl}|ttjddtj}|tjkrz.| }t |dddtjdddWn6t j y}z|d|dWYd}~n d}~00dS)Nrrz pythonwin.exez /app "%s"zError executing command - %s) rr NeedAppMsgsysargvwin32conZMB_YESNOZIDYESZ GetMainFrameZ GetSafeHwndwin32apiZ ShellExecuteerror)rr parentZdetailsrrrNeedApp0s  rr __main__)rrrrrr rrrrr r __name__Z demoutilsrrrrs