How does IPython's magic %paste work?

前端 未结 6 2185
南笙
南笙 2020-12-07 15:31

I want to copy already indented Python code / whole functions and classes into IPython. Everytime I try the indentation is screwed up and I get following error message:

6条回答
  •  感动是毒
    2020-12-07 15:59

    For ubuntu users who are on Python 3.

    The python-tk is for Python 2.

    To make %paste work on Python 3, install the python3-tk package:

    sudo apt-get install python3-tk
    

提交回复
热议问题