E&S CVS Commit: PEAK - Initial import of N2 (Namespace Navigator) utility.

tsarna at eby-sarna.com tsarna at eby-sarna.com
Tue Jul 1 15:15:00 EDT 2003


Module Name:	PEAK
Committed By:	tsarna
Date:		Tue Jul  1 19:14:53 UTC 2003

Modified Files:
	PEAK: setup.py
	PEAK/src/peak: peak.ini
Added Files:
	PEAK/src/peak/running/tools: __init__.py
	PEAK/src/peak/running/tools/n2: __init__.py commands.py interfaces.py
	    main.py ns.py

Log Message:
Initial import of N2 (Namespace Navigator) utility.

This is a sort of all-purpose Swiss Army Knife for PEAK.  It's a sh-like
shell for navigating peak.naming contexts, complete with IO redirection!
It's an enhanced Python interactive command line! It's a sqsh-like
interactive database shell [1]! It's an extensible environment for
interacting with any python object! It's a floor wax, and a desert
topping!

This is an almost total rewrite of the (unreleased) original. It was
completely refactored to take advantage of adaption [2], changes in
peak.naming, the peak.running commands stuff, completely rewritten
argument parsing code, and more. This fixed all sorts of ugliness in the
original code, and made it much more extensible.

Note that this has not been tested much, especially the namespace shell,
because "nis:" has stopped working and that was my primary test case.
It also needs documentation and there are still some things to do to the
code... But you can play with it now.

usage: peak n2 [-e] [-p] [name]

-e      if name lookup fails, go into python interactor anyway
-p      use python interactor even if there is a more specific interactor
        (implies -e)

[1] The SQL interactor has not been ported from the old code yet, but
    that's coming soon.

[2] Phillip makes fun of me for saying adaption instead of adaptation,
    but dictionary.com say "adaption" is OK. :-)

    Besides, "adaption" sounds like it goes with adapt().  Seems like
    adaptation would have a function called adaptate() ;-).  And for that
    matter, shouldn't Canadians come from a country called Canadia?


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/setup.py.diff?r1=1.67&r2=1.68
http://cvs.eby-sarna.com/PEAK/src/peak/peak.ini.diff?r1=1.53&r2=1.54
http://cvs.eby-sarna.com/PEAK/src/peak/running/tools/__init__.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/running/tools/n2/__init__.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/running/tools/n2/commands.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/running/tools/n2/interfaces.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/running/tools/n2/main.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/running/tools/n2/ns.py?rev=1.1&content-type=text/vnd.viewcvs-markup

To generate a diff of this commit:
cvs rdiff -r1.67 -r1.68 PEAK/setup.py
cvs rdiff -r1.53 -r1.54 PEAK/src/peak/peak.ini
cvs rdiff -r0 -r1.1 PEAK/src/peak/running/tools/__init__.py
cvs rdiff -r0 -r1.1 PEAK/src/peak/running/tools/n2/__init__.py \
    PEAK/src/peak/running/tools/n2/commands.py \
    PEAK/src/peak/running/tools/n2/interfaces.py \
    PEAK/src/peak/running/tools/n2/main.py \
    PEAK/src/peak/running/tools/n2/ns.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