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.
change error messages to be a little more straightforward
change definition of FULL_PATH so that an error is raised if the
setuid wrapper is used un-edited
1. use dict.get instead of try/except KeyError
2. if the url scheme is 'http' then avoid the series of
'if var in [someseq]:'. instead, inline all of the code.
3. find = string.find
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.
that file in fact did not exist or at least was not used. Change this
so that __file__ is *only* set to the .pyc/.pyo file when it actually
read the code object from it; otherwise __file__ is set to the .py
file.
happen when you use a non-keyword argument after a keyword argument,
and in this case you also get a syntax error. I fully suspect that
the underflow is caused by the code that stops generating code when it
detects the syntax error, but I can't find the culprit right now. I
know, I know.)
The MS compiler doesn't call it 'long long', it uses __int64,
so a new #define, LONG_LONG, has been added and all occurrences
of 'long long' are replaced with it.
2-digit years are now converted using rules that are (according to
Fredrik Lundh) recommended by POSIX or X/Open: 0-68 mean 2000-2068,
69-99 mean 1969-1999.
2-digit years are now only accepted if time.accept2dyear is set to a
nonzero integer; if it is zero or not an integer or absent, only year
values >= 1900 are accepted. Year values 100-1899 and negative year
values are never accepted.
The initial value of time.accept2dyear depends on the environment
variable PYTHONY2K: if PYTHONY2K is set and non-empty,
time.accept2dyear is initialized to 0; if PYTHONY2K is empty or not
set, time.accept2dyear is initialized to 0.