summaryrefslogtreecommitdiffstats
path: root/Lib/cmd.py
Commit message (Collapse)AuthorAgeFilesLines
* Duh. cmdqueue should be an instance variable, not a class variable.Guido van Rossum2003-01-131-1/+1
| | | | | | This was introduced in 1998 in rev. 1.13, where I imported extensive patches that, I am sad to say, I didn't review as carefully as I should have.
* Add a better columnizer to print_topics().Guido van Rossum2002-12-021-7/+58
|
* Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i)Raymond Hettinger2002-06-301-4/+2
|
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-1/+1
|
* Patch 560023 adding docstrings. 2.2 Candidate (after verifying modules were ↵Raymond Hettinger2002-05-291-0/+62
| | | | not updated after 2.2).
* tighten up except - in this context, AttributeError is the only exceptionSkip Montanaro2002-03-241-2/+2
| | | | that can be raised - do_help won't be called if arg is not a string
* Flush stdout before reading next command. Closes SF bug 526357.Neil Schemenauer2002-03-231-0/+1
|
* Whitespace normalization.Tim Peters2001-08-091-5/+5
|
* Patch #416224: add readline completion to cmd.Cmd.Martin v. Löwis2001-07-281-15/+84
|
* Use string.ascii_letters instead of string.letters (SF bug #226706).Fred Drake2001-07-201-1/+1
|
* This is SF patch #405952, by Anthony Baxter:Guido van Rossum2001-03-221-5/+14
| | | | | | | | | | | | | | | cmd.py uses raw_input(); eats SIGCLD: I discovered a rather nasty side effect of the standard cmd.py library today. If it's sitting inside raw_input(), any SIGCLDs that get sent to your application get silently eaten and ignored. I'm assuming that this is something that readline is thoughtfully doing for me. This patch adds an instance attr that allows the user to select to not use raw_input(), but instead use sys.stdin.readline() [Changed slightly to catch EOFError only for raw_input().]
* String method conversion.Eric S. Raymond2001-02-091-2/+2
|
* unnecessary semicolonJeremy Hylton2001-01-261-1/+1
|
* added __all__ lists to a number of Python modulesSkip Montanaro2001-01-201-0/+2
| | | | | | | | added test script and expected output file as well this closes patch 103297. __all__ attributes will be added to other modules without first submitting a patch, just adding the necessary line to the test script to verify more-or-less correct implementation.
* Update the code to better reflect recommended style:Fred Drake2000-12-121-1/+1
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Bug fix: ? and ! were not full aliases for `help' and `shell' as implied inEric S. Raymond2000-07-111-6/+6
| | | | the documentation; the cases `? foo' and `! foo' failed.
* Mass patch by Ka-Ping Yee:Guido van Rossum2000-02-021-180/+180
| | | | | | | | | | | 1. Comments at the beginning of the module, before functions, and before classes have been turned into docstrings. 2. Tabs are normalized to four spaces. Also, removed the "remove" function from dircmp.py, which reimplements list.remove() (it must have been very old).
* No need to import sys or linecache. (Andrew Dalke & kjpylint)Guido van Rossum1999-05-031-2/+0
|
* Patch by Michael Scharf. He writes:Guido van Rossum1999-03-121-0/+9
| | | | | | | | | | | The module cmd requires for each do_xxx command a help_xxx function. I think this is a little old fashioned. Here is a patch: use the docstring as help if no help_xxx function can be found. [I'm tempted to rip out all the help_* functions from pdb, but I'll resist it. Any takers? --Guido]
* Richard Wolff's changes:Guido van Rossum1998-09-111-1/+16
| | | | | | | | cmd.py has incorporated the changes we discussed a couple of weeks ago (a command queue, returning line from precmd, and stop from postcmd) and some changes to help that were occasioned because I wanted to inherit from pdb which inherits from cmd.py and the help routine didn't look for commands or the associated help deeply enough.
* Changes by Richard Wolff:Guido van Rossum1998-08-271-13/+21
| | | | | | | | | | | | | | | | 1) I added a command queue which is helpful to me (at least so far) and would also allow syntax like 's;s' (step; step) in conjunction with precmd 2) doc_leader allows the derived class to print a message before the help output. Defaults to current practise of a blank line 3) nohelp allows one to override the 'No help on' message. I need 'Undefined command: "%s". Try "help".' 4) Pass line to self.precmd to allow one to do some parsing: change first word to lower case, strip out a leading number, whatever. 5) Pass the result of onecmd and the input line to postcmd. This allows one to ponder the stop result before it is effective. 6) emptyline() requires a if self.lastcmd: conditional because if the first command is null (<cr>), you get an infinite recursion with the code as it stands.
* Fix another bug in ESR's changes. In order to work properly,Guido van Rossum1998-07-201-4/+2
| | | | | onecmd(line) must return the value returned by emptyline() or default(line).
* Gotta have an __init__() method -- pdb.py calls it!Guido van Rossum1998-07-011-0/+2
|
* Improved by Eric Raymond.Guido van Rossum1998-06-291-17/+84
|
* Shouldn't use newdir.dir(), which no longer exists!Guido van Rossum1998-05-221-2/+1
|
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-3/+31
|
* * Mass change: get rid of all init() methods, in favor of __init__()Guido van Rossum1993-12-171-3/+0
| | | | | | | constructors. There is no backward compatibility. Not everything has been tested. * aiff.{py,doc}: deleted in favor of aifc.py (which contains its docs as comments)
* pdb.py, bdb.py, cmd.py: use __init__() instead of init()Guido van Rossum1993-06-231-1/+1
|
* * aifc.py: don't die on invalid MARK chunkGuido van Rossum1993-06-201-3/+5
| | | | | | | * calendar.py: remove stuff now built in time; some cleanup and generalization in the calendar printing * cmd.py: use __init__. * tzparse.py: This module is no longer necessary -- use builtin time instead!
* * change default line numbers for 'list' in pdb.pyGuido van Rossum1992-11-051-2/+2
| | | | | | | | | * changed eval() into getattr() in cmd.py * added dirname(), basename() and (dummy) normath() to macpath.py * renamed nntp.py to nntplib.py * Made string.index() compatible with strop.index() * Make string.atoi('') raise string.atoi_error rather than ValueError * Added dirname() and normpath() to posixpath.
* Module getattr doesn't exist any more, it's now called newdir.Guido van Rossum1992-08-191-2/+2
|
* Don't print repeated commands.Guido van Rossum1992-01-271-1/+0
|
* Initial revisionGuido van Rossum1992-01-241-0/+65