私は Emacs python-mode と ipython を IDE として使用して Python コードを記述しています。Python-mode は、1 行のコードを実行するための "py-execute-line" という優れた関数を提供します。これをキー "F7" にバインドしました。
したがって、次のコードの場合:
cell = "Human" # Move the cursor to this line and run it by pressing F7
print cell # Move the cursor to this line and run it by pressing F7
出力を ipython バッファーに出力できます。
In [80]:
In [81]: Human
print コマンドを使用せずに「セル」の値を確認するより直接的な方法があるかどうか疑問に思っています。カーソルを変数に移動し、何らかのキーを押すと、値が ipython 出力バッファーに出力されます。
cell = "Human" # Move the cursor to this line and run it by pressing F7
cell = "Human" # Move the cursor to "cell" and print its value by pressing ?? key or function
関数(py-execute-expression-ipython)を試しましたが、出力が印刷されません...
前もって感謝します!