[Sans] Python Scripte auch als Shell nutzbar :-)

Steven Armstrong asteven at ethz.ch
Tue Dec 8 23:03:40 CET 2009


Hallo zusammen

Was ich bei der Demo noch erwaehnen wollte und dann doch vergessen habe:
Die meisten von den Python CLI Scripten kann man auch als interaktive
Shell aufrufen, e.g.:

netinfo -i

netinfo> icos-test.inf.ethz.ch
INFO: Searching by hostname: ['icos-test.inf.ethz.ch']
CAB/E/48 UTP128536 NET Cx::781 icos-test.inf.ethz.ch 129.132.12.165
00:1B:FC:A2:C3:9F
netinfo> cable UTP128536
INFO: Searching by cable: ['UTP128536']
CAB/E/48 UTP128536 NET Cx::781 icos-test.inf.ethz.ch 129.132.12.165
00:1B:FC:A2:C3:9F
CAB/E/48 UTP128536 NET Cx::781 ns2.icos.ethz.ch 129.132.12.205
00:1B:FC:A2:C3:9F
netinfo> quit

quit|exit|q beendet den Spass :-)

readline history wird unter
${XDG_CONFIG_HOME:-~/.config}/sans/$cmd.history gespeichert

Cheers,
Steven
-- 
Steven Armstrong
Institute of Computational Science, ETH Zurich
IT Management & Support
Universitaetsstrasse 6, CAB E48
8092 Zurich, Switzerland
Phone: +41 44 632 25 24




More information about the Sans mailing list