Scientific Mode - Console Input


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.




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)))

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


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


Please sign in to leave a comment.