First time here? Check out the FAQ!
1

Shell History Location

I would like to clear my python shell history, where does Wing keep this information? I've looked in the Settings Directory and and Cache Directory.Edit: The "Clear" option does clear the console and the "Restart Shell" option does restart the shell, which also clears the console output. But neither of those clear the input history. I can still "up arrow" through my input history. Restarting the Wing process does clear the input history so this is a sufficient workaround for me.

Version: 5.1.12OS: Win 10

Max Slimmer's avatar
21
Max Slimmer
asked 2018-01-04 13:00:00 -0500
Wingware Support's avatar
4k
Wingware Support
updated 2019-03-13 08:50:38 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

Do you mean clear the previous activity from the view?  In that case, it's Clear in the shell's Options menu.  Or Restart Shell to also start with a new blank slate.

Wingware Support's avatar
4k
Wingware Support
answered 2018-01-04 13:31:00 -0500
edit flag offensive 0 remove flag delete link

Comments

I've edited my original post. Your answer led me to check what happens on a restart and that behavior is "good enough" for me. The use case was clearing sensitive data, like passwords, that were echoed to the terminal but also kept in input history. Thank you.

Max Slimmer's avatar Max Slimmer (2018-01-04 18:21:00 -0500) edit
add a comment see more comments
1

The shell history is stored in your project files.  Wing's project files are .ini style text files so they can be looked at and modified with a text editor.  The python shell history is stored in the value of the 'debug.shell-history' key and the debug probe history is in the value of the 'debug.debug-probe-history' key.

Wingware Support's avatar
4k
Wingware Support
answered 2018-01-05 08:42:00 -0500
edit flag offensive 0 remove flag delete link

Comments

The python-shell.history is written on project close | save. So as long as the same project is successfully reopened and saved it will overwrite the history, which is good enough for my use case (keeping sensitive info out of file system).

Max Slimmer's avatar Max Slimmer (2018-01-05 13:55:00 -0500) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer