Вы заметили что с интерактивной консолью из прошлого поста что-то не так? Что происходит если нажать стрелки вверх/вниз? Полный бардак!
Давайте поправим это дело!
Для сохранения и загрузки истории будем использовать специальный модуль readline.
Что добавлено?
🔸 Сохранение истории команд с возможностью выбора предыдущих (клавиши ⬆️⬇️ )
🔸 Сохранение истории в файл перед выходом из интерактива для будущих сессий
🔸 Автокомплит по нажатию клавиши TAB
🔸 Cписок вариантов автокомплита по двойному нажатию TAB
Код забираем здесь ↗️
#tricks#source
🌍 The world’s largest atoll by land area is Kwajalein in the Marshall Islands. Its ring-shaped coral formation encloses a lagoon larger than most inland lakes and supports unique marine life. ✨
#coralreef⚡#lagoon⚡#biodiversity⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
Be soft. Do not let the world make you hard. Do not let pain make you hate. Do not let the bitterness steal your sweetness. Take pride that even though the rest of the world may disagree, you still believe it to be a beautiful place..🤍
Video/Photo Créateur @konstantin.rivera 🤍
MUAH @richy_yuliana🕊
Style @olgasheremeta🦢
#chakras#mantra#mantramonday#gipsy#balance#levitation#purelove#heavenonearth#hooponopono#petitefemme#mira#moodoftheday#video#lagoon