Forums

Long lines don't wrap properly in console

Hi, I'm new to PythonAnywhere but not to Python. Whenever I type lines of longer than 80 characters into a shell (iPython or regular, doesn't matter), the cursor moves back to the start of the same line and appears to begin overwriting it. I say "appears" because all the text is still there--hitting Enter confirms that--but the text at the beginning of the line is replaced by new text as I continue typing. The expected behavior would of course be for the text to continue onto the next line rather than on the same line.

I saw this https://www.pythonanywhere.com/wiki/SingleLineConsoleProblem in the Help docs and tried both solutions, but they didn't work. Tried with IE and Chrome, same problem. Any ideas?

Hi there, we can confirm we've seen this behaviour on some OS's and browsers, and we'll see if we can fix it.

There is a workaround: Bash consoles are unaffected -- they seem to be sized and reflow lines correctly. And if you start python from inside a Bash console, it then behaves well.

Tried this and it works--this will be fine for my purposes; just one extra step. Thanks!!

enter image description here

enter link description here