python---把tab.py的tab键自动补齐命令脚本,放入包目录下,python所有文件都可以使用

来源:互联网 发布:js如何隐藏div 编辑:程序博客网 时间:2024/06/04 22:16

把tab.py的tab键自动补齐命令,放入包目录下,python所有文件都可以使用

root@kali:~/python/snmp# ls /usr/lib/python2.7/dist-packages/ADNS.py                                        IPy.py                                         pyparsing.pycadns_python-1.2.1.egg-info                     jsonpickle                                     PyQt4adns.so                                        jsonpickle-0.4.0.egg-info                      pyqtgraphANSI.py                                        keepnote                                       pyqtgraph-0.0.0.egg-infoapt                                            keepnote-0.7.8.egg-info                        pyscard-1.6.14.egg-infoapt_inst.so                                    ldb.so                                         pyserial-2.5.egg-infoapt_pkg.so                                     libexiv2python.so                              PySideaptsources                                     libmproxy                                      pysnmpargcomplete                                    libxml2mod.so                                  pysnmp-4.2.2.egg-infoargcomplete-0.8.1.egg-info                     libxml2.py                                     pysnmp_appsasync                                          libxsltmod.so                                  pysnmp_apps-0.3.2.egg-infoasync-0.6.1.egg-info                           libxslt.py                                     pysnmp_mibsbackports                                      louis                                          pysnmp_mibs-0.1.3.egg-infobackports.ssl_match_hostname-3.4.0.2.egg-info  louis-2.4.1.egg-info                           pysqlite2bbqsql                                         lsb_release.py                                 pysqlite-2.6.3.egg-infoBBQSQL-1.0.egg-info                            lsb_release.pyc                                pysvnBeautifulSoup-3.2.1.egg-info                   lxml                                           python_apt-0.8.8.2.egg-infobeautifulsoup4-4.1.0.egg-info                  lxml-2.3.2.egg-info                            python_dateutil-1.5.egg-infoBeautifulSoup.py                               M2Crypto                                       python_debian-0.1.21.egg-infoBeautifulSoup.pyc                              M2Crypto-0.21.1.egg-info                       python_ntlm-1.0.1.egg-infoBeautifulSoupTests.py                          Magic_file_extensions-0.2.egg-info             python-support.pthbinwalk                                        magic.py                                       pytidylib-0.2.1.egg-infobinwalk-2.0.0.egg-info                         magic.pyc                                      pytzbitarray                                       mechanize                                      pytz-2012c.egg-infobitarray-0.8.0.egg-info                        mechanize-0.2.5.egg-info                       pyusb-1.0.0a3.egg-infoblindelephant                                  mercurial                                      pyxBlindElephant-1.0.egg-info                     mercurial-2.2.2.egg-info                       PyX-0.11.1.egg-infoBrlapi-0.5.7.egg-info                          metaconfig                                     PyYAML-3.10.egg-infobrlapi.so                                      metaconfig-0.1.4a1.egg-info                    radialnetbs4                                            mitmproxy-0.11.3.egg-info                      READMEbson                                           mx                                             requestscaribou                                        MySQLdb                                        requests-0.12.1.egg-infocffi                                           _mysql_exceptions.py                           rfidiotcffi-0.8.1.egg-info                            _mysql_exceptions.pyc                          rfidiot-1.0.egg-info_cffi_backend.so                               MySQL_python-1.2.3.egg-info                    sambachardet                                        _mysql.so                                      scapychardet-2.0.1.egg-info                         ndiff.py                                       scapy-2.2.0.egg-infoclamd-1.0.1.egg-info                           netaddr                                        scipyclamd.py                                       netaddr-0.7.7.egg-info                         scipy-0.10.1.egg-infocolorama                                       netlib                                         screen.pycolorama-0.2.4.egg-info                        netlib-0.11.1.egg-info                         serialConfigArgParse-0.9.3.egg-info                  nfspy                                          setuptoolsconfigargparse.py                              NfSpy-1.0.egg-info                             setuptools.egg-infoconfigobj-4.7.2.egg-info                       nltk                                           setuptools.pthconfigobj.py                                   nltk-2.0.4.egg-info                            simplejsonCrypto                                         nose                                           simplejson-2.5.2.egg-infocryptography                                   nose-1.1.2.egg-info                            sipconfig_nd.pycryptography-0.6.1.egg-info                    ntlm                                           sipconfig.pyd2to1                                          oauth                                          sip.sod2to1-0.2.7.egg-info                           oauth-1.0.1.egg-info                           site.pydarts                                          oauthlib                                       six-1.8.0.egg-infodarts.util.lru-0.5.egg-info                    oauthlib-0.1.2.egg-info                        six.pydarts.util.lru-0.5-nspkg.pth                   OpenGL                                         smartcarddateutil                                       OpenSSL                                        smmapdbus                                           packagekit                                     smmap-0.8.2.egg-info_dbus_bindings.so                              PAM-0.4.2.egg-info                             speechd_dbus_glib_bindings.so                         PAMmodule.so                                   speechd_configdeb822.py                                      paramiko                                       sqlalchemydebconf.py                                     paramiko-1.7.7.1.egg-info                      SQLAlchemy-0.7.8.egg-infodebian                                         passlib                                        talloc.sodebian_bundle                                  passlib-1.5.3.egg-info                         tdb.sodff                                            pcapy-0.10.8.egg-info                          testsdissy                                          pcapy.so                                       tidylibdissy-9.egg-info                               pdfminer                                       tornadodistorm3                                       pdfminer-20110515.egg-info                     tornado-4.0.2.egg-infodistorm3-3.egg-info                            pexpect-2.4.egg-info                           tweepydistribute-0.6.24dev_r0.egg-info               pexpect.py                                     tweepy-1.7.1.egg-infodns                                            pexpect.pyc                                    twistedDNS                                            phply                                          Twisted-12.0.0.egg-infoDNSBL.py                                       phply-dev.egg-info                             Twisted_Conch-12.0.0.egg-infodnspython-1.10.0.egg-info                      phply-dev-nspkg.pth                            Twisted_Core-12.0.0.egg-infodrv_libxml2.py                                 PIL                                            Twisted_Lore-12.0.0.egg-infoeasygui-0.96.egg-info                          PIL.pth                                        Twisted_Mail-12.0.0.egg-infoeasygui.py                                     pip                                            Twisted_Names-12.0.0.egg-infoeasy-install.pth                               pip-1.1.egg-info                               Twisted_News-12.0.0.egg-infoeasy_install.py                                pkg_resources.py                               Twisted_Runner-12.0.0.egg-infoesmre-0.3.1.egg-info                           pkg_resources.pyc                              Twisted_Web-12.0.0.egg-infoesmre.py                                       ply                                            Twisted_Words-12.0.0.egg-infoesm.so                                         ply-3.4.egg-info                               urwidfdpexpect.py                                   psycopg2                                       urwid-1.0.1.egg-infoFSM.py                                         psycopg2-2.4.5.egg-info                        usbfuseparts                                      pxssh.py                                       validate.pyfuse.py                                        pyasn1                                         volatilityfuse_python-0.2.1.egg-info                     pyasn1-0.1.3.egg-info                          volatility-2.4.egg-infogi                                             pyatspi                                        wapiti-2.3.0.egg-infogit                                            pybloomfiltermmap-0.3.11-py2.7-linux-i686.egg  wapitiCoregitdb                                          pycparser                                      wx-2.8-gtk2-unicodegitdb-0.5.4.egg-info                           pycparser-2.07.egg-info                        wx.pthgithub                                         pycrypto-2.6.egg-info                          wxPython_common-2.8.12.1.egg-infoGitPython-0.3.2.RC1.egg-info                   pycryptopp                                     wxversion.pyglib                                           pycryptopp-0.5.29.egg-info                     xapiangobject                                        pydns-2.3.6.egg-info                           xdot-0.5.egg-infogridfs                                         pyexiv2                                        xdot.pygtk-2.0                                        PyGithub-1.23.0.egg-info                       yamlgtk-2.0-pysupport-compat.pth                   pygments                                       _yaml.sogtksourceview2.so                              Pygments-1.5.egg-info                          yara_python-1.7.egg-infoguess_language                                 pygtk.pth                                      yara.soguess_language-0.2.egg-info                    pygtk.py                                       zenmap-6.47.egg-infoHalberd                                        pygtk.pyc                                      zenmapCorehalberd-0.2.4.egg-info                         pymongo                                        zenmapGUIhgext                                          pymongo-2.2.egg-info                           zimhttplib2                                       PyOpenGL-3.0.1.egg-info                        zim-0.56.egg-infohttplib2-0.7.4.egg-info                        pyOpenSSL-0.14.egg-info                        zopeinvest                                         pyparsing-1.5.6.egg-info                       zope.interface-3.6.1.egg-infoIPy-0.75.egg-info                              pyparsing.py                                   zope.interface-3.6.1-nspkg.pth#tab.py的tab键自动补齐命令脚本root@kali:~/python/snmp# cat /root/python/snmp/tab.py #pyhton startup fileimport sysimport readlineimport rlcompleterimport atexitimport os#tab completionreadline.parse_and_bind('tab:complete')#history filehistfile = os.path.join(os.environ['HOME'],'.pythonhistory')try:    readline.read_history_file(histfile)except IOError:    passatexit.register(readline.write_history_file,histfile)del os, histfile, readline, rlcompleter#复制到python2.7主目录下root@kali:~/python/snmp# cp /root/python/snmp/tab.py /usr/lib/python2.7/dist-packages/root@kali:~/python/snmp# pythonPython 2.7.3 (default, Mar 14 2014, 11:57:14) [GCC 4.7.2] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> exit()root@kali:~/python/snmp# 
原创粉丝点击