[pywin32-checkins] pywin32/Pythonwin/doc guienvironment.html, 1.1, 1.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2009-04-06 12:19:58
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/doc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11384/doc Modified Files: guienvironment.html Log Message: Fix [2686042] - pythonwin documentation out of date Index: guienvironment.html =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/doc/guienvironment.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** guienvironment.html 1 Sep 1999 23:33:32 -0000 1.1 --- guienvironment.html 6 Apr 2009 12:19:54 -0000 1.2 *************** *** 1,44 **** <HTML> ! <HEAD> ! <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> ! <META NAME="Generator" CONTENT="Microsoft Word 97"> ! <TITLE>Pythonwin GUI Environment</TITLE> ! <META NAME="Template" CONTENT="D:\Program Files\Microsoft Office\Office\html.dot"> </HEAD> ! <BODY LINK="#0000ff" VLINK="#800080"> - <H1><IMG SRC="pythonwin.gif" WIDTH=64 HEIGHT=64>Pythonwin GUI Environment </H1> <P>This document describes the Pythonwin GUI environment. There are quite a few little features hidden away! </P> ! <P>It has a discussion on the General Environment (including the <A HREF="#InteractiveWindow">Interactive Window</A> and <A HREF="#MenuandToolbar">Menu and Toolbar</A>), and the <A HREF="#CommandLineArguments">Command Line Arguments</A> supported. </P> <H2>General Environment </H2> <H3><A NAME="InteractiveWindow">Interactive Window</A> </H3> ! <P>The Interactive Window is a little Python program which simulates the built-in Python interpreter. It is implemented in intpyapp.py (which in turn uses winout.py - a general purpose "output window".) </P> <H4>Pressing Enter </H4> ! <P>Whenever you press Enter, the interactive window has a look at the context, to try and decide what to do. </P> ! <P>If the line is recognised as a "block" (ie, the first line starts with ">>> ", and the rest start with " "), it checks to see if we are at the end of the window. If not, the block is copied to the end of the buffer - nothing is executed - enter must be pressed again to force execution. </P> ! <P>If we are at the end of the buffer, it <I>always</I> attempts to execute the line. If Python indicates "unexpected end of file", then it assumes the block should continue, and emits the " " for the next line. </P> ! <P>If the line is recognised as part of a Python exception, then some special processing is done. If the line contains a filename and line number, it locates that file, and jumps to the offending line. </P> ! <P>If the line is recognised as being an exception generated by COM (aka OLE), and the exception contains reference to a WinHelp file, the help topic is opened. </P> <H3><A NAME="MenuandToolbar">Menu and Toolbar</A> </H3> <H4>File Open/Close/Save/Print/etc. </H4> ! <P>All perform the obvious file operations. Pythonwin follows the standard MFC framework, and allows Python programs to plug-in support for other file types. </P> <H4>Locate File </H4> ! <P>Allows quick location of a Python scripts. Typing in the base name of a file will force a search of all the directories on sys.path, until a match is found. </P> ! <P>To locate a module in a package, use a (back) slash instead of a dot - eg, to locate "win32com.client.dynamic", type in "win32com\client/dynamic" </P> <H4>Import Script </H4> ! <P>Imports or reloads a script - just like "import scriptname"/"reload(scriptname)" - (Pythonwin determines if the operation is an import or reload, It also handles "ni" modules with some success!) </P> ! <P>If you select this (or use <Ctrl-I>) when a .py file is open, that file is saved and imported. If a current file can not be located, it will ask for a file to import via a File dialog. </P> ! <P>If a syntax error occurs, the location will be moved to in the editor. </P> <H4>Run Script </H4> ! <P>Runs a script, as if the file was passed on the command line. A dialog is opened, asking the script name and arguments (unless the <Shift> key is held down) </P> <H2><A NAME="CommandLineArguments">Command Line Arguments</A> </H2> ! <P>The following command line arguments are recognised. Note that these are implemented in "intpyapp.py", so should be pretty easy to change! </P> <H4>/run scriptname args </H4> ! <P>Runs the named script. Works just like "Python.exe scriptname args", except it is run in the GUI environment, and output goes to the interactive window. </P> ! <H4>/runargs scriptname args </H4> <P>As above, except the normal Pythonwin 'Run Script' dialog is shown. </P> <H4>/edit filename.py </H4> ! <P>Edits the filename. The /edit is currently optional, but in the future, the "default argument handling" may be changed. </P> <H4>/app specialscriptname args </H4> ! <P>Runs a special "application script". The application script can change the entire look and feel of a Pythonwin program - almost as much flexibility as the C++ programmer has when they first start their application). An example of this is "dlgapp.py" in the Pythonwin distribution. </P></BODY> </HTML> --- 1,104 ---- <HTML> ! <HEAD> ! <TITLE>Pythonwin GUI Environment</TITLE> </HEAD> ! <BODY> ! <H1><IMG SRC="pythonwin.gif" WIDTH=64 HEIGHT=64>Pythonwin GUI Environment</H1> <P>This document describes the Pythonwin GUI environment. There are quite a few little features hidden away! </P> ! <P>It has a discussion on the General Environment (including the ! <A HREF="#InteractiveWindow">Interactive Window</A> and <A HREF="#MenuandToolbar">Menu and Toolbar</A>), ! and the <A HREF="#CommandLineArguments">Command Line Arguments</A> supported. </P> ! <H2>General Environment </H2> <H3><A NAME="InteractiveWindow">Interactive Window</A> </H3> ! <P>The Interactive Window is a little Python program which simulates the ! built-in Python interpreter. It is implemented in intpyapp.py (which ! in turn uses winout.py - a general purpose "output window".) ! </P> <H4>Pressing Enter </H4> ! <P>Whenever you press Enter, the interactive window has a look at ! the context, to try and decide what to do. ! </P> ! <P>If the line is recognised as a "block" (ie, the first line starts with ! ">>> ", and the rest start with " "), it checks to see if we ! are at the end of the window. If not, the block is copied to the end of ! the buffer - nothing is executed - enter must be pressed again to force ! execution. ! </P> ! <P>If we are at the end of the buffer, it <I>always</I> attempts to execute ! the line. If Python indicates "unexpected end of file", then it assumes ! the block should continue, and emits the " " for the next line. ! </P> ! <P>If the line is recognised as part of a Python exception, then some special ! processing is done. If the line contains a filename and line number, it ! locates that file, and jumps to the offending line. ! </P> ! <P>If the line is recognised as being an exception generated by COM (aka OLE), ! and the exception contains reference to a WinHelp file, the help topic is ! opened. ! </P> <H3><A NAME="MenuandToolbar">Menu and Toolbar</A> </H3> <H4>File Open/Close/Save/Print/etc. </H4> ! <P>All perform the obvious file operations. Pythonwin follows the standard ! MFC framework, and allows Python programs to plug-in support for other file ! types. ! </P> <H4>Locate File </H4> ! <P>Allows quick location of a Python scripts. Typing in the base name of a ! file will force a search of all the directories on sys.path, until a match ! is found. ! </P> ! <P>To locate a module in a package you can use either a (back) slash or a ! dot - eg, to locate "win32com.client.dynamic", you can enter in ! "win32com\client/dynamic" ! </P> <H4>Import Script </H4> ! <P>Imports or reloads a script - just like ! "import scriptname"/"reload(scriptname)" - (Pythonwin determines if the ! operation is an import or reload, It also handles "ni" modules with some ! success!) ! </P> ! <P>If you select this (or use <Ctrl-I>) when a .py file is open, that ! file is saved and imported. If a current file can not be located, it will ! ask for a file to import via a File dialog. ! </P> ! <P>If a syntax error occurs, the location will be moved to in the editor. ! </P> <H4>Run Script </H4> ! <P>Runs a script, as if the file was passed on the command line. A dialog is ! opened, asking the script name and arguments (unless the <Shift> key ! is held down) ! </P> <H2><A NAME="CommandLineArguments">Command Line Arguments</A> </H2> ! <P>The following command line arguments are recognised. Note that these are ! implemented in "intpyapp.py", so should be pretty easy to change! ! </P> ! <H4>/new</H4> ! <H4><i>(deprecated)</i>/nodde</H4> ! <P>Creates a new instance of the application even if one is already running. ! </P> ! ! <H4>/edit filename</H4> ! <P>Edit the named file. ! </P> ! <H4>/run scriptname args </H4> ! <P>Runs the named script. Works just like "Python.exe scriptname args", except ! it is run in the GUI environment, and output goes to the interactive ! window. ! </P> ! <H4>/rundlg scriptname args </H4> <P>As above, except the normal Pythonwin 'Run Script' dialog is shown. </P> <H4>/edit filename.py </H4> ! <P>Edits the filename. The /edit is currently optional, but in the future, ! the "default argument handling" may be changed. ! </P> <H4>/app specialscriptname args </H4> ! <P>Runs a special "application script". The application script can change the ! entire look and feel of a Pythonwin program - almost as much flexibility as ! the C++ programmer has when they first start their application). An example ! of this is "dlgapp.py" in the Pythonwin distribution. ! </P> ! </BODY> </HTML> |