Scientific Mode - Console Input

Answered

Hi all,

 

using scientific mode, one uses the console quite a lot. At the end of the day, is there an easy option to get all the inputs from the console and e.g. append them to the main code from which the console originated? Or to copy the inputs on their own?

+ how do we resize a matplotlib chart? It generates 640x480 by default for me.

 

Thanks

3 comments

The following will print the list of variables and their values from console. You can copy the results and paste into your main code.

for v in dir():
if v not in ['__builtins__','sys']:
print(v + '=' + str(eval(v)))
0

Perhaps console history can help (make sure to use 2018.1 EAP, there's a relevant bug fixed there PY-23114):


1

Thanks so much, Pavel. This was exactly what I was after.

0

Please sign in to leave a comment.