{"id":13502635,"url":"https://github.com/jbisbee/python-shell-enhancement","last_synced_at":"2026-01-27T10:30:37.536Z","repository":{"id":71929403,"uuid":"11698510","full_name":"jbisbee/python-shell-enhancement","owner":"jbisbee","description":"Just a simple script that will add history and basic tab completion to the default python shell","archived":false,"fork":false,"pushed_at":"2019-06-20T22:06:07.000Z","size":190,"stargazers_count":34,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-01T22:57:17.833Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbisbee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2013-07-27T02:08:33.000Z","updated_at":"2021-05-27T20:37:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"61538513-0745-4117-a692-57bea2c0e617","html_url":"https://github.com/jbisbee/python-shell-enhancement","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbisbee%2Fpython-shell-enhancement","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbisbee%2Fpython-shell-enhancement/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbisbee%2Fpython-shell-enhancement/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbisbee%2Fpython-shell-enhancement/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbisbee","download_url":"https://codeload.github.com/jbisbee/python-shell-enhancement/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222495091,"owners_count":16993285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:02:20.623Z","updated_at":"2026-01-27T10:30:37.496Z","avatar_url":"https://github.com/jbisbee.png","language":"Python","readme":"# python-shell-enhancement #\n\nJust a simple python startup script that will add the following to the standard python shell:\n\n* Persistent shell history between sessions\n* Tab completion\n\nI just found it odd that the default shell didn't out of the box.  Yes, I \ndo know about about alternative python shells that support these features \n(and many more)\n\n* bpython http://bpython-interpreter.org/\n* iPython http://ipython.org/\n\n### Installation ###\n\n**1. Checkout the project**\n\n```console\njbisbee@tacquito:~ $ cd ~/src\njbisbee@tacquito:~/src $ git clone https://github.com/jbisbee/python-shell-enhancement.git\n```\n\n**2. Add PYTHONSTARTUP and possibly PYTHON_HISTORY_FILE to your shell**\n\n```bash\n# .bashrc\n\n# path the the newly checked out project. I used ~/src\nexport PYTHONSTARTUP=\"$HOME/src/python-shell-enhancement/pythonstartup.py\"\n\n# this is the default value, no need to change it if you don't care\nexport PYTHON_HISTORY_FILE=\"$HOME/.pythonhistory\"\n```\n\n**3. Now test it out***\n\nThe default shell now has persistent history and tab completion.  Enjoy!\n\n```console\njbisbee@beni:~$ python\nPython 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)\n[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\nInteractive mode history and tab completion are enabled.\n\u003e\u003e\u003e sys.[--TAB--]\nsys.__class__(              sys.__delattr__(            sys.__dict__\nsys.__displayhook__(        sys.__doc__                 sys.__egginsert\nsys.__excepthook__(         sys.__format__(             sys.__getattribute__(\nsys.__hash__(               sys.__init__(               sys.__name__\nsys.__new__(                sys.__package__             sys.__plen\nsys.__reduce__(             sys.__reduce_ex__(          sys.__repr__(\nsys.__setattr__(            sys.__sizeof__(             sys.__stderr__\nsys.__stdin__               sys.__stdout__              sys.__str__(\nsys.__subclasshook__(       sys._clear_type_cache(      sys._current_frames(\nsys._getframe(              sys.api_version             sys.argv\nsys.builtin_module_names    sys.byteorder               sys.call_tracing(\nsys.callstats(              sys.copyright               sys.displayhook(\nsys.dont_write_bytecode     sys.exc_clear(              sys.exc_info(\nsys.exc_type                sys.excepthook(             sys.exec_prefix\nsys.executable              sys.exit(                   sys.exitfunc(\nsys.flags                   sys.float_info              sys.float_repr_style\nsys.getcheckinterval(       sys.getdefaultencoding(     sys.getdlopenflags(\nsys.getfilesystemencoding(  sys.getprofile(             sys.getrecursionlimit(\nsys.getrefcount(            sys.getsizeof(              sys.gettrace(\nsys.hexversion              sys.long_info               sys.maxint\nsys.maxsize                 sys.maxunicode              sys.meta_path\nsys.modules                 sys.path                    sys.path_hooks\nsys.path_importer_cache     sys.platform                sys.prefix\nsys.ps1                     sys.ps2                     sys.py3kwarning\nsys.setcheckinterval(       sys.setdlopenflags(         sys.setprofile(\nsys.setrecursionlimit(      sys.settrace(               sys.stderr\nsys.stdin                   sys.stdout                  sys.subversion\nsys.version                 sys.version_info            sys.warnoptions\n\u003e\u003e\u003e sys.\n```\n\n### Acknowledgements ###\n\nThanks to Geoff Ford for the orignal code I took from his blog post.\nhttp://geoffford.wordpress.com/2009/01/20/python-repl-enhancement/\n\nThanks for Jabba Laci for taking time to report an issue on github.\n\n### Authors ###\n\n* **Jeff Bisbee** http://jbisbee.blogspot.com/\n* **Geoff Ford** http://geoffford.wordpress.com/\n* **Jabba Laci** https://github.com/jabbalaci - issue on github should have been {0} in string format instead of {1}\n* **Kevin Deldycke** http://kevin.deldycke.com\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbisbee%2Fpython-shell-enhancement","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbisbee%2Fpython-shell-enhancement","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbisbee%2Fpython-shell-enhancement/lists"}