help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs Remote Python Interpreters


From: Matt McClure
Subject: Re: Emacs Remote Python Interpreters
Date: Tue, 5 Jun 2012 09:18:58 -0400

On Tue, Jun 5, 2012 at 3:45 AM, Michael Albinus <michael.albinus@gmx.de> wrote:
> I don't use Python, therefore I don't know anything about Python
> debugging. However, we have been able to use gdb and perldb remotely
> from inside Emacs, via Tramp. No filesystem mounting necessary.
>
> If you could tell me a little bit about how to use the Python debugger
> in Emacs, I could try to help you with the setup in the remote
> case. Does there exist a similar command like "M-x gdb"?

I think TRAMP is probably my best option right now. One problem with
using Python via TRAMP is python.el's dependency on emacs.py. When I
do M-x run-python from a TRAMP buffer, I get:

    >>> Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named emacs
    >>>

because python.el assumes it can add a local filesystem path to
PYTHONPATH and load emacs.py from there, whereas the python process
actually runs on the remote host when I start it from a TRAMP buffer.

Emacs has `M-x pdb` for Python. As an aside, why is "pdb" the default
value of gud-pdb-command-name rather than "python -m pdb"? The former
gives "no such file or directory" whereas pdb.py is present everywhere
I've looked, so the latter seems more reliable.

-- 
Matt McClure
http://www.matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure



reply via email to

[Prev in Thread] Current Thread [Next in Thread]