Logging input and output in Spyder's console

前端 未结 2 1570
鱼传尺愫
鱼传尺愫 2020-12-21 18:14

I learnt data manipulation and analysis through Stata and I used the log command to record all the commands written and the output generated. Doing so I could reproduce my f

相关标签:
2条回答
  • 2020-12-21 19:01

    The way to do what you want is by using the %logstart command, as described here:

    Log IPython output?

    0 讨论(0)
  • 2020-12-21 19:17

    Stop using the python interpreter and start storing your commands in a text file before running them. This way you will be able to share, reuse, and revise your python code.

    By executing the following command:

    python code.txt
    

    Python will read all of the lines in your file sequentially.

    This is the main way python programs are executed, as a convention, python code files end with .py , so if you see a file with a .py extension, you can try executing it yourself using this method!

    0 讨论(0)
提交回复
热议问题