# HG changeset patch # User catherine.devlin@gmail.com # Date 1278545241 14400 # Node ID fbd780b5994b6c047a3765fe4e9379af4806ddcf # Parent be4194f41916d56dda7365e711047463ab5aaa57# Parent 49bd3dc5c2054e58d2868faca04266bcdb0836c9 including deb packaging changes from Jens diff -r 49bd3dc5c205 -r fbd780b5994b cmd2.py --- a/cmd2.py Tue May 18 20:59:14 2010 +0200 +++ b/cmd2.py Wed Jul 07 19:27:21 2010 -0400 @@ -99,7 +99,7 @@ def options(option_list): '''Used as a decorator and passed a list of optparse-style options, - alters a cmd2 methodo populate its ``opts`` argument from its + alters a cmd2 method to populate its ``opts`` argument from its raw text argument. Example: transform diff -r 49bd3dc5c205 -r fbd780b5994b docs/alternatives.rst --- a/docs/alternatives.rst Tue May 18 20:59:14 2010 +0200 +++ b/docs/alternatives.rst Wed Jul 07 19:27:21 2010 -0400 @@ -36,7 +36,7 @@ doesn't retain full cmd_ compatibility, shares its basic structure with cmd_. -.. _cmdln_ http://pypi.python.org/pypi/cmdln +.. _cmdln: http://pypi.python.org/pypi/cmdln .. _CmdLoop: http://pypi.python.org/pypi/CmdLoop diff -r 49bd3dc5c205 -r fbd780b5994b docs/freefeatures.rst --- a/docs/freefeatures.rst Tue May 18 20:59:14 2010 +0200 +++ b/docs/freefeatures.rst Wed Jul 07 19:27:21 2010 -0400 @@ -5,6 +5,8 @@ These features are provided "for free" to a cmd_-based application simply by replacing ``import cmd`` with ``import cmd2 as cmd``. +.. _cmd: http://docs.python.org/library/cmd.html#module-cmd + Script files ============ @@ -28,7 +30,7 @@ ``app.commentGrammars`` with a different pyparsing_ grammar. -Comments can be useful in :ref:`script`s. Used +Comments can be useful in :ref:`scripts`. Used in an interactive session, they may indicate mental imbalance. @@ -42,6 +44,8 @@ (Cmd) speak it was /* not */ delicious! # Yuck! it was delicious! +.. _pyparsing: http://pyparsing.wikispaces.com/ + Commands at invocation ====================== @@ -70,16 +74,14 @@ - sent to the paste buffer, ready for the next Copy operation, by ending with a bare ``>``, as in ``mycommand args >``.. Redirecting to paste buffer requires software to be installed on the operating - system, pywin32_ on Windows or xclip_ on *nix. + system, pywin32_ on Windows or xclip_ on \*nix. -.. _pywin32:: http://sourceforge.net/projects/pywin32/ -.. _xclip:: http://www.cyberciti.biz/faq/xclip-linux-insert-files-command-output-intoclipboard/ +.. _pywin32: http://sourceforge.net/projects/pywin32/ +.. _xclip: http://www.cyberciti.biz/faq/xclip-linux-insert-files-command-output-intoclipboard/ Python ====== -:: - The ``py`` command will run its arguments as a Python command. Entered without arguments, it enters an interactive Python session. That session can call diff -r 49bd3dc5c205 -r fbd780b5994b docs/index.rst --- a/docs/index.rst Tue May 18 20:59:14 2010 +0200 +++ b/docs/index.rst Wed Jul 07 19:27:21 2010 -0400 @@ -38,7 +38,7 @@ * `cmd2 project page`_ * `PyCon 2010 presentation `_, *Easy Command-Line Applications with cmd and cmd2*: - `slides `_, + :doc:`slides `, `video `_ These docs will refer to ``App`` as your ``cmd2.Cmd`` diff -r 49bd3dc5c205 -r fbd780b5994b docs/unfreefeatures.rst --- a/docs/unfreefeatures.rst Tue May 18 20:59:14 2010 +0200 +++ b/docs/unfreefeatures.rst Wed Jul 07 19:27:21 2010 -0400 @@ -23,7 +23,7 @@ ``cmd2`` passes ``arg`` to a ``do_`` method (or ``default`) as a ParsedString, a subclass of string that includes an attribute ``parsed``. -``parsed`` is a ``pyparsing.ParseResults``_ +``parsed`` is a ``pyparsing.ParseResults`` object produced by applying a pyparsing_ grammar applied to ``arg``. It may include: @@ -60,7 +60,7 @@ If ``parsed`` does not contain an attribute, querying for it will return ``None``. (This -is a characteristic of ``pyparsing.ParseResults``_.) +is a characteristic of ``pyparsing.ParseResults``.) ParsedString was developed to support sqlpython_ and reflects its needs. The parsing grammar and @@ -74,6 +74,12 @@ be no result unless you change your application to *use* ``arg.parsed``.) +.. _sqlpython: http://pypi.python.org/pypi/sqlpython/ + +.. _cmd: http://docs.python.org/library/cmd.html#module-cmd + +.. _pyparsing: http://pyparsing.wikispaces.com/ + Environment parameters ======================