Good copy from Python Interpreter

When I work with Python Interpreter, it always seems to me that it is a pain to try to copy the code from it, because it inserts all of these →> and ...

Is there a Python interpreter that will allow me to copy the code without dealing with this? Or, alternatively, there is a way to clear the output.

Also, sometimes I wanted to insert code, but the code is indented. Is there any console that can automatically backtrack from it, instead of throwing an error?

Related

  • Why can't I insert Pythons REPL output without manual editing?
+6
python
source share
5 answers

IPython will let you embed Python code with leading indentation without giving you an IndentationError. You can also change your prompts to remove →> and ... if you want.

+1
source share

IPython allows you to display, save, and edit command history, for example, to display the first three commands of your session without the line numbers that you enter %hist -n 1 4 .

+4
source share

WingIDE from Wingware allows you to evaluate any piece of code in a separate interpreter window.

+3
source share

I have a vim macro for "pasting when you read interpreter prompts and output [[== stuff NOT preed by prompts"), and I will be happy to share it if vim is what you are using. Any editor or IDE deserving such a name will of course be easily programmed for such purposes!

+1
source share

Decent text editors such as Notepad ++ can do global searches and replace operations that can replace →> with nothing.

0
source share

All Articles