E&S CVS Commit: PEAK - Lots of enhancements:

tsarna at eby-sarna.com tsarna at eby-sarna.com
Wed Aug 6 19:00:00 EDT 2003


Module Name:	PEAK
Committed By:	tsarna
Date:		Wed Aug  6 22:59:42 UTC 2003

Modified Files:
	PEAK/src/peak/running/tools/n2: main.py ns.py sql.py
Added Files:
	PEAK/src/peak/running/tools/n2: rlhist.py

Log Message:
Lots of enhancements:

- the python interactor now users __main__'s dict. This fixes some
  issues with pdb, rlcompleter, and other stuff that kind of expects
  interactive use only from __main__

- SQL's \python now accepts arguments, so you can do things like:

        \python import sys

- SQL ${} variable expansions can now also be python expressions,
  evaluated in __main__, if prefixed with an =:

        1> \echo ${=1+1}
        2

- readline history files are now per-interactor, so you don't have to
  scroll through python code in sql mode or sql in namespace mode, etc.

- Fix another SQSH behavior difference PJE pointed out: after \buf-edit
  (really, any command IFF it changes the !. buffer), the contents of !.
  will be appended to the readline history.

and finally:

- TAB COMPLETION! uses rlcompleter in python mode and a custom completer
  in SQL mode. Used the default mode for ns, currently. The SQL
  completer currently completes shell commands, variable names ($foo),
  buffer names (!foo) and variable expansions (${foo}). Will need some
  sort of per-SQLManageConnection implementation adapter to be able to
  complete table names or anything fancy like that.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/running/tools/n2/main.py.diff?r1=1.4&r2=1.5
http://cvs.eby-sarna.com/PEAK/src/peak/running/tools/n2/ns.py.diff?r1=1.6&r2=1.7
http://cvs.eby-sarna.com/PEAK/src/peak/running/tools/n2/rlhist.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/running/tools/n2/sql.py.diff?r1=1.12&r2=1.13

To generate a diff of this commit:
cvs rdiff -r1.4 -r1.5 PEAK/src/peak/running/tools/n2/main.py
cvs rdiff -r1.6 -r1.7 PEAK/src/peak/running/tools/n2/ns.py
cvs rdiff -r0 -r1.1 PEAK/src/peak/running/tools/n2/rlhist.py
cvs rdiff -r1.12 -r1.13 PEAK/src/peak/running/tools/n2/sql.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




More information about the source-changes mailing list