* Updates to make the Sphinx output doc better

This commit is contained in:
markm 2009-03-05 23:28:39 +00:00
parent daf55a1f12
commit 3923fdc89f

@ -21,8 +21,9 @@
"""The application module is the main one that users will user first. """The application module is the main one that users will user first.
When starting to automate and application you must initialize an instance When starting to automate and application you must initialize an instance
of the Application class. Then you must `start_()`_ that application or of the Application class. Then you must :func:`Application.Start` that
`Connect_()`_ to a running instance of that application. application or :func:`Application.Connect()` to a running instance of that
application.
Once you have an Application instance you can access dialogs in that Once you have an Application instance you can access dialogs in that
application either by using one of the methods below. :: application either by using one of the methods below. ::
@ -38,19 +39,17 @@ in almost exactly the same ways. ::
ctrl = dlg.Window_(title = "Your control", classname = "Button", ...) ctrl = dlg.Window_(title = "Your control", classname = "Button", ...)
ctrl = dlg["Your control"] ctrl = dlg["Your control"]
**Note:** For attribute access of controls and dialogs you do not have to .. note::
For attribute access of controls and dialogs you do not have to
have the title of the control exactly, it does a best match of the have the title of the control exactly, it does a best match of the
avialable dialogs or controls. avialable dialogs or controls.
**See also:** .. seealso::
`findwindows.find_windows()`_ for the keyword arguments that can be
passed to both `Application.window_()`_ and `WindowSpecification.Window_()`_
.. _Start_(): class-pywinauto.application.Application.html#start_ :func:`pywinauto.findwindows.find_windows` for the keyword arguments that can be
.. _Connect_(): class-pywinauto.application.Application.html#connect_ passed to both :func:`Application.window_` and
.. _findwindows.find_windows(): module-pywinauto.findwindows.html#find_windows :func:`WindowSpecification.Window_`
.. _Application.Window_(): class-pywinauto.application.Application.html#window_
.. _WindowSpecification.Window_(): class-pywinauto.application.WindowSpecification.html#control_
""" """
@ -169,7 +168,7 @@ class WindowSpecification(object):
to be used to access dialogs and controls. to be used to access dialogs and controls.
Both this and __getattr__ use the rules outlined in the Both this and :func:`__getattr__` use the rules outlined in the
HowTo document. HowTo document.
""" """
@ -199,7 +198,7 @@ class WindowSpecification(object):
raise AttributeError(message) raise AttributeError(message)
# if we get here then we must have only had one criteria so far # if we get here then we must have only had one criteria so far
# so create a new WindowSpecification for this control # so create a new :class:`WindowSpecification` for this control
new_item = WindowSpecification(self.app, self.criteria[0]) new_item = WindowSpecification(self.app, self.criteria[0])
# add our new criteria # add our new criteria
@ -218,7 +217,7 @@ class WindowSpecification(object):
requested is an attribute of DialogWrapper then resolve the requested is an attribute of DialogWrapper then resolve the
dialog and return the requested attribute. dialog and return the requested attribute.
Otherwise delegate functionality to __getitem__() - which Otherwise delegate functionality to :func:`__getitem__` - which
sets the appropriate criteria for the control. sets the appropriate criteria for the control.
""" """
@ -317,9 +316,14 @@ class WindowSpecification(object):
* **retry_interval** How long to sleep between each retry * **retry_interval** How long to sleep between each retry
e.g. self.Dlg.Wait("exists enabled visible ready") An example to wait until the dialog
exists, is ready, enabled and visible
See also: ``Application.WaitNot()`` self.Dlg.Wait("exists enabled visible ready")
.. seealso::
:func:`WindowSpecification.WaitNot()`
""" """
# set the current timings -couldn't set as defaults as they are # set the current timings -couldn't set as defaults as they are
@ -396,7 +400,9 @@ class WindowSpecification(object):
e.g. self.Dlg.WaitNot("exists enabled visible ready") e.g. self.Dlg.WaitNot("exists enabled visible ready")
See also: ``Application.WaitNot("exists enabled visible ready")`` .. seealso::
:func:`WindowSpecification.Wait()`
""" """
# set the current timings -couldn't set as defaults as they are # set the current timings -couldn't set as defaults as they are