Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
save a session in idle
#1
hi
suppose I am learning Python in idle. I want to save this session because I want to work on it for later(suppose I want to back to it tomorrow or some hours later).
is there any way to save this session in idle?
thanks
Reply
#2
Have you looked at the menus?
akbarza likes this post
Reply
#3
What do you mean by "save this session"?

You can save a program/script file and use the file at a later time. You can save variable values to a file and restore them (json, pickle). I know of no way to save the current state of an interactive python interpreter.
Reply
#4
(Nov-05-2023, 11:38 AM)Larz60+ Wrote: Have you looked at the menus?

hi and thanks
I looked and explored the menu bar at idle, but I did not find anything.
Reply
#5
(Nov-05-2023, 03:24 PM)deanhystad Wrote: What do you mean by "save this session"?

You can save a program/script file and use the file at a later time. You can save variable values to a file and restore them (json, pickle). I know of no way to save the current state of an interactive python interpreter.

hi
you said:
Quote:save the current state of an interactive python interpreter.
I want this. suppose I am learning Python with idle. in idle I write some functions and variables and import commands and....
I want these for the next time that I continue to learn ( after lunch Smile ). With the turn of the computer, I will lose them. What can I do to have them for the next session of my learning? ( Note: I have turned off the computer)
thanks
Reply
#6
ptpython and IPython save all history that typed in a interactive session.
IPython can just use arrow keys(up down) to get earlier code or print all with In [1]: %history -g.
ptpython is most advance Checking Code History and Reinserting Earlier Code.
[Image: UUn5AX.png]
[Image: IeHTrT.png]
akbarza likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to save to multiple locations during save cubangt 1 509 Oct-23-2023, 10:16 PM
Last Post: deanhystad
  IDLE not importing pygame (ok outside of IDLE) miner_tom 1 3,282 Sep-14-2018, 07:54 PM
Last Post: Larz60+
  Powershell Session translation to Python; Session code seems to not work Maverick494 1 3,551 Jun-26-2018, 05:16 PM
Last Post: Maverick494
  Python IDLE 3.6.2 on WIn7 vs Pyhton 3 IDLE raspberry djdan_23 5 5,653 Sep-07-2017, 12:51 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020