简体   繁体   中英

eshell starts python IDLE instead of running script when editing remotely

With Emacs 24.3.1, I get this when editing through Tramp/ssh in eshell:

/<remotepath> $ bash
/<remotepath> $ python test.py
hello world!
/<remotepath> $ exit
exit
/<remotepath> $ python test.py
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

The file test.py is:

 print "hello world!"

Bash is version 4.1.2. Does anyone have any explanation for this behavior?

I don't know eshell , but my guess is you forget to pass the positional parameters when creating your alias:

#                   don't forget the quotes  
#                ▼                            ▼
~ $ alias python '/path/to/alternate/python $*'
#                                           ▲▲
#                don't forget positional parameters

See http://www.emacswiki.org/emacs/EshellAlias

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM