In IPython, typing a variable name at the command line will automatically print the contents of the variable.
In [75]: x = 1
In [76]: x
Out[76]: 1
However, when passing code from a file into IPython via the SublimeREPL plugin in Sublime Text, I have to run print(x)
if I want to see anything (I'm using Windows in case it matters). To be explicit, my code is in a separate file, and I'm passing the line of code into IPython for execution via SublimeREPL's Ctrl+,l shortcut. Is there a way I can just pass x
instead of print(x)
and see the contents of x
?