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.
Asked
Active
Viewed 106 times
0

martinmistere
- 229
- 2
- 14
-
Does `ctrl`[+`shift`]+`s` fit your definition of a command? – Vojtěch Chvojka Apr 05 '23 at 12:34
-
you can enable autosave in settings. – Albin Paul Apr 05 '23 at 12:38
1 Answers
0

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