私はここに多くの混乱があると思います。 emacs、python、pydbがどのようにインストールされているかに関して、あなたがどのように設定されているかという点で、あいまいさがたくさんあります。
pydbには、Emacs LispパッケージGUD(グランド統合デバッガ)にフックするGNU Emacsコードが付属しています。あなたがemacsシェルでpydbを実行することができないこととは関係がないので、その時点でそれを残しておきましょう。
ez_installやeggがないので、ソースからpydbをインストールすることを前提としています。 「configure」スクリプトと「make」インストールを実行すると、どこに何が起きているのか、何が起こっているのかを示す情報があります。これを追跡することが重要です。一例として
は、ここでのWindows XPのVMWareのイメージ内のmingwの端末から実行しているときに私が得た情報の一部です:
$ ./autogen.sh
configure.ac:120: installing `./install-sh'
configure.ac:120: installing `./missing'
emacs/Makefile.am:22: installing `./elisp-comp'
...
Running ./configure --enable-maintainer-mode ...
checking for emacs... no
checking for xemacs... no
checking where .elc files should go... ${datadir}/emacs/site-lisp
checking for emacs... no
checking for emacs... no
checking where .elc files should go... (cached) ${datadir}/emacs/site-lisp
checking for a Python interpreter with version >= 2.4.0... python
checking for python... /c/Python27//python
checking for python version... 2.7
checking for python platform... win32
checking for python script directory... ${prefix}\Lib\site-packages
checking for python extension module directory... ${exec_prefix}\Lib\site-packages
...
Now type `make' to compile
$
そして、ときに私はそこに、出力の一部を「make install」を実行します...
$ make install
Making install in test
...
test -z "c:\Python27\lib\site-packages/pydb" || /bin/mkdir -p "c:\Python27\lib\site-packages/pydb"
...
test -z "c:\Python27\lib\site-packages/pydb" || /bin/mkdir -p "c:\Python27\lib\site-packages/pydb"
...
if ! test -d "/usr/local/bin"; then \
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"; \
fi
以上から
、私の場合には、あなたがCにパッケージがインストールされていることを参照してください:あり/ Python27/libに/のsite-packages。バージョン2.6を使用しているのでおそらくそこにPython26があります。
また、上記の出力はpydbスクリプトはは/ usr/local/binににインストールされていることを私に示しています。
素晴らしい。今度は、sys.pathに与えられるPYTHONPATH環境変数にc:/ Python27/lib/site-packagesが設定されていることを確認する必要があります。 sysにあるものを見る。
問題が発生していたため、おそらくpydbがsys.pathのどこにインストールされているのかわかりませんでした。だからここに私が使用したエクスポート・コマンドであることを追加します。
$ export PYTHONPATH='c:/Python27/lib/site-packages/pydb;.'
私は上記に示した「make install」をとしては/ usr/local/binにに位置していますpydbを、実行時に今私が得る:
$ /usr/local/bin/pydb test/gcd.py 3 5
(c:\cygwin\home\rocky\src\external-vcs\pydb\test\gcd.py:10): <module>
10 """
上記のcygwinのことを心配する必要はありません。それは、私が探したいPythonスクリプトがあるところです。
これはMinGWシェル内で行われました。 Emacsシェルで動くためには、Emacsのコンパイル方法に依存します。
最後に、これらのすべてを書いた後、pydbとGUDにフックするEmacsコードが廃止されました。より新しい、より良いデバッガは、http://code.google.com/p/pydbgr/から入手可能なpydbgrであり、新しい、より良いEmacsコードは、github.com/rocky/emacs-dbgrにあります。どちらも、他のPythonやEmacsパッケージをインストールする必要があります。 Python側では、ではなく virtualenvを実行している場合、これを単純化するための卵があります。 Emacs側では、パッケージングはもっと踏み込んでいます。