0

I'm using python 3.11.0. Right now in order to save the python idle shell I'm doing it manually File->Save As I'm looking for a command to automate the saving of the python idle shell.

martinmistere
  • 229
  • 2
  • 14

1 Answers1

0

You can enable auto save in settings or use Ctrl + s to save file.

enter image description here

Albin Paul
  • 3,330
  • 2
  • 14
  • 30
  • I'd like to select also where I want to save this log. That's why I'm more interested in command that should be added at the end of a script. – martinmistere Apr 05 '23 at 14:33
  • @martinmistere save what log? save the output of program in a file? – Albin Paul Apr 05 '23 at 17:18
  • yes correct. I want to save it into a folder which may change each time – martinmistere Apr 06 '23 at 06:22
  • @martinmistere if you are looking to save the log of your program into different files. You can do something like this. I dont see the need to automate saving via a script. https://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python – Albin Paul Apr 06 '23 at 17:42