summaryrefslogtreecommitdiff
path: root/example
Commit message (Collapse)AuthorAgeFilesLines
* Changes to make our project as welcoming as possible for new contributors.Todd Leonhardt2017-02-264-127/+0
| | | | | | | Changes include: 1) Added CONTRIBUTING.md with detailed instructions for how to contribute, which should be especially useful to those new to open source in general or GitHub in particular 2) Added CODE_OF_CONDUCT.md which sets ground rules for participants’ behavior and helps to facilitate a friendly, welcoming environment 3) Renamed the "example" directory to "examples" in the hope that one day soon there may be more than a single example ;-)
* Added optional parameter to cmd2.Cmd.__init() to enable an "ipy" command.Todd Leonhardt2017-02-181-0/+4
| | | | | | If IPython is installed AND the __init__ initilizer is passed a "use_ipython" keyword argument set to "True", then and "ipy" command will be present. This ipy command starts an interactive IPython shell embedded within the cmd2 application. This IPython shell has access to all of the local variables (e.g. self), but any modifications made within it will NOT persist once it is exited. This IPython shell doesn't have tight integration with the Python interpreter running the cmd2 application like the Python interpreter available with the "py" command. However, due to features such as tab-completion and built-in help, the IPython shell is a lot more efficient for developers to use to debug their cmd2 applications - the introspection on self is extremely useful for getting to the bottom of thorny debugging problems.
* Documented undocumented commands and removed command aliases.Todd Leonhardt2017-02-051-7/+2
| | | | | | | | The out-of-the-box help menu now looks a lot cleaner: - All redundant command aliases have been removed (NOTE: They can still be used if self.abbrev is True, which is the default) - All previously undocumented commands have been documented - Unit tests and README.rst documentation has been updated to reflect new behavior
* Added unit tests for the edit command.Todd Leonhardt2017-02-041-0/+2
| | | | With os.system() call mocked out to prevent actually opening an editor.
* Changed header comment in cmd2.py to refer to GitHub repo instead of old ↵Todd Leonhardt2017-01-231-17/+1
| | | | assembla mercurial one. Also changed exampleSession.txt example transcript to not include the "set" command since the output was platform dependent due to the default editor varying.
* For do_py(), moved the definition of the run() command earlier.Todd Leonhardt2017-01-111-0/+3
| | | | | | | | | This is so that it will allow the user to run a Python script directly from the Cmd prompt even before an interactive Python shell has ever been invoked via: py run('script.py') This fixes a bug where it wouldn't allow that to occur until the user entered just "py" at the Cmd prompt. Also added a trivial Python script script.py to the example directory for the purposes of testing script execution.
* Fixed example.py and exampleSession.txt so that the example runs and the ↵TL2017-01-112-15/+25
| | | | | | test passes when running "python example.py -t exampleSession.txt". Also made the front-page documentation consistent so it references the actual code and text in this modified example.
* Whitespace change to be mostly PEP8 compliantTodd Leonhardt2016-12-091-3/+4
|
* First stage of refactoring to support full simultaneous Python 2 and 3 ↵Todd Leonhardt2016-12-091-1/+1
| | | | compatibility via use of the six module.
* Minor cleanupFederico Ceratto2016-02-231-3/+5
|
* update Trove classifiersCatherine Devlin2014-03-131-1/+1
|
* Indicate change in repository host to bitbucketCatherine Devlin2012-05-262-0/+126