tramp-devel
[Top][All Lists]
Advanced

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

Re: [BUG] Full file path (/ssh:remote...) when executing a saved Python


From: Michael Albinus
Subject: Re: [BUG] Full file path (/ssh:remote...) when executing a saved Python script
Date: Fri, 13 Sep 2013 09:02:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Kit-Yan Choi <address@hidden> writes:

> When I wanted to execute a *SAVED* python script after logged into a
> remote machine through Tramp, I got the following message:
>
> -----------------------------------------------------------------------
> ----
> IOError Traceback (most recent call last)
> /home/SECRET_PATH/<ipython-input-4-f052da0ab8eb> in <module>()
> ----> 1 execfile(r'/ssh:remote:/PATH_OF_FILE') # PYTHON-MODE

I assume your script is called like "python /ssh:remote:/PATH_OF_FILE"
(I don't use python myself, so I don't know the name of the python binary).

The problem for Tramp is, that your script is just an *argument* of a
remote process. Tramp does not touch arguments of any process being
called, because it cannot know whether something, which *looks* like a
remote file name, shall be replaced by the local file name part, or not.

Therefore, it is recommended to use relative file names as arguments for
processes in a remote environment. Alternatively, the *caller* of the
process shall massage remote file names to be local ones.

How do you call your saved python script? Is it just a function of a
python lisp package, or do you arrange it yourself?

Best regards, Michael.



reply via email to

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