Title: The New REPL Does Not Load My Command History · Issue #120766 · python/cpython · GitHub
Open Graph Title: The New REPL Does Not Load My Command History · Issue #120766 · python/cpython
X Title: The New REPL Does Not Load My Command History · Issue #120766 · python/cpython
Description: Bug report Bug description: In my ~/.pystartup I have the following code: import atexit import os import readline import rlcompleter historyPath = os.path.expanduser("~/.pyhistory") def save_history(historyPath=historyPath): import readl...
Open Graph Description: Bug report Bug description: In my ~/.pystartup I have the following code: import atexit import os import readline import rlcompleter historyPath = os.path.expanduser("~/.pyhistory") def save_histor...
X Description: Bug report Bug description: In my ~/.pystartup I have the following code: import atexit import os import readline import rlcompleter historyPath = os.path.expanduser("~/.pyhistory") def s...
Opengraph URL: https://github.com/python/cpython/issues/120766
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The New REPL Does Not Load My Command History","articleBody":"# Bug report\n\n### Bug description:\n\nIn my ~/.pystartup I have the following code:\n\n```python\nimport atexit\nimport os\nimport readline\nimport rlcompleter\n\nhistoryPath = os.path.expanduser(\"~/.pyhistory\")\n\ndef save_history(historyPath=historyPath):\n import readline\n readline.write_history_file(historyPath)\n\nif os.path.exists(historyPath):\n readline.read_history_file(historyPath)\n\natexit.register(save_history)\ndel os, atexit, readline, rlcompleter, save_history, historyPath\n```\n\nThis is something I've been using for years. With this startup file, I can enter the REPL and immediately up-arrow to scroll through the commands I used the last time I used the REPL.\n\nWith the new REPL there are two related things going wrong:\n\n* my command history is not loaded (when I immediately up-arrow, it does nothing)\n* my command history is not saved in my .pyhistory file (the file is touched but not otherwise modified)\n\nCC @ambv, @pablogsal\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux","author":{"url":"https://github.com/ericsnowcurrently","@type":"Person","name":"ericsnowcurrently"},"datePublished":"2024-06-19T22:36:30Z","url":"https://github.com/python/cpython/issues/120766"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0b2a7956-ecc1-2baf-35f5-06dcbe3738a0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D80C:157C65:34495B8:45BAE26:6B02036F |
| html-safe-nonce | a9e55559f2ba46d96c2a118b2d44b80231a62595aab93c7e540ef76ccd2e42d1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODBDOjE1N0M2NTozNDQ5NUI4OjQ1QkFFMjY6NkIwMjAzNkYiLCJ2aXNpdG9yX2lkIjoiNjk3MzA5OTEyNDQ5MzI1NTUzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5da6df13a5d1c3b856569608ada8c10175d40876c4d0aa9315fbeff1538ffecf |
| hovercard-subject-tag | issue:2363209636 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/120766/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6bb92b8009c7fa7ad8457accbc247c2c825c7bb76da19212dc8df41a83664fd0/python/cpython/issues/120766 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6bb92b8009c7fa7ad8457accbc247c2c825c7bb76da19212dc8df41a83664fd0/python/cpython/issues/120766 |
| og:image:alt | Bug report Bug description: In my ~/.pystartup I have the following code: import atexit import os import readline import rlcompleter historyPath = os.path.expanduser("~/.pyhistory") def save_histor... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ericsnowcurrently |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width