How do I add tab completion to the Python shell?

后端 未结 9 866
甜味超标
甜味超标 2020-11-30 16:41

When starting a django application using python manage.py shell, I get an InteractiveConsole shell - I can use tab completion, etc.

Python 2.5.1         


        
9条回答
  •  旧时难觅i
    2020-11-30 17:28

    Yes. It's built in to 3.6.

    fernanr@gnuruwi ~ $ python3.6
    Python 3.6.3 (default, Apr 10 2019, 14:37:36)
    [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import os
    >>> os.
    Display all 318 possibilities? (y or n)
    os.CLD_CONTINUED             os.O_RDONLY                  os.ST_NOEXEC                 os.environ                   os.getpid(                   os.readlink(                 os.spawnvpe(
    os.CLD_DUMPED                os.O_RDWR                    os.ST_NOSUID                 os.environb                  os.getppid(                  os.readv(                    os.st
    

提交回复
热议问题