1、ipython安装:
$apt-get install python-ipython
2、ipython是*nux下增强的python shell工具,支持TAB补全
![羡慕](http://static.blog.csdn.net/xheditor/xheditor_emot/default/envy.gif)
root@ubuntu:~# ipython
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
Type "copyright", "credits" or "license" for more information.
IPython 0.10.2 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: ls
Desktop/ Downloads/ NetBeansProjects/ Public/ Videos/
Documents/ Music/ Pictures/ Templates/
In [2]: cd D
Desktop/ Documents/ Downloads/
In [2]: cd Documents/
/root/Documents
In [3]: !ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:d1:2d:f9
inet addr:192.168.1.104 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fed1:2df9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:34853 errors:0 dropped:0 overruns:0 frame:0
TX packets:21183 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32258139 (32.2 MB) TX bytes:5295207 (5.2 MB)
Interrupt:19 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1106 errors:0 dropped:0 overruns:0 frame:0
TX packets:1106 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:188776 (188.7 KB) TX bytes:188776 (188.7 KB)
In [4]: %
%Exit %debug %logstop %prun %runlog
%Pprint %dhist %lsmagic %psearch %save
%Quit %dirs %macro %psource %sc
%alias %doctest_mode %magic %pushd %store
%autocall %ed %p %pwd %sx
%autoindent %edit %page %pycat %system_verbose
%automagic %env %paste %quickref %time
%bg %exit %pdb %quit %timeit
%bookmark %hist %pdef %r %unalias
%cd %history %pdoc %rehash %upgrade
%clear %logoff %pfile %rehashx %who
%color_info %logon %pinfo %rep %who_ls
%colors %logstart %popd %reset %whos
%cpaste %logstate %profile %run %xmode
In [4]: import p
pango pildriver posix pyatspi
pangocairo pilfile posixfile pyclbr
papyon pilfont posixpath pycurl
paramiko pilprint pprint pydoc
parser pipes problem_report pydoc_data
pcardext piston_mini_client profile pyexpat
pdb pkg_resources pspersistence pygst
pexpect pkgutil pstats pygtk
pickle platform pty pyinotify
pickleshare plistlib pwd pynotify
pickletools popen2 pxssh pyparsing
pilconvert poplib py_compile
In [4]: import paramiko
In [5]: c = paramiko.SSHC
paramiko.SSHClient paramiko.SSHConfig
In [5]: c = paramiko.SSHClient()
In [6]: c.
c.__class__ c.__setattr__ c._transport
c.__delattr__ c.__sizeof__ c.close
c.__dict__ c.__str__ c.connect
c.__doc__ c.__subclasshook__ c.exec_command
c.__format__ c.__weakref__ c.get_host_keys
c.__getattribute__ c._agent c.get_transport
c.__hash__ c._auth c.invoke_shell
c.__init__ c._host_keys c.load_host_keys
c.__module__ c._host_keys_filename c.load_system_host_keys
c.__new__ c._log c.open_sftp
c.__reduce__ c._log_channel c.save_host_keys
c.__reduce_ex__ c._policy c.set_log_channel
c.__repr__ c._system_host_keys c.set_missing_host_key_policy