以前はそれが IPython の問題だと思っていましたが、今日もう一度テストしました。
emacs -Q
コマンドウィンドウで実行- .py ファイルを開く
M-x
python-shell-switch-to-shell
、 、RET
、およびを実行しRET
ます。次に、Python シェルの準備が整いました- 次に、次のコードを入力します。
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib.pyplot as plt >>> plt.ion() >>> plt.plot([1,2,3]) [<matplotlib.lines.Line2D object at 0x03068610>] >>>
実際、この後、図は表示されず、シェルはフリーズします。たとえば、入力すると次のようになります。
>>> print("hello")
何も起こらなかった...他のプロットツールはテストしていませんが、matplotlib. バグかどうかはわかりません。こことGoogleでしばらく検索しましたが、運がありません。私のシステムは: Emacs 24.3 32 bit for Windows, under Windows 7. 他の人がここと同じ問題を再現できる場合は、これをバグとして報告します。
IPython を Python シェルとして次のように使用しました。
C:/Python27/python.exe -i C:/Python27/Scripts/ipython-script.py --pylab
次に、 を入力するfigure(); plot([1,2,3])
と、予想どおり、図がポップアップしてフリーズします。それから私はしました:C-c C-d
これは実行されcomint-send-eof
、図は実際に更新されます! しかし、IPython シェル セッションも次のメッセージで終了します。
In [6]:
Do you really want to exit ([y]/n)?
Traceback (most recent call last):
File "C:/Python27/Scripts/ipython-script.py", line 9, in <module>
load_entry_point('ipython==0.13.1', 'console_scripts', 'ipython')()
SystemExit
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
ここに役立つ手がかりはありますか?!