0

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?

  • 1
    Maybe the `python` command is aliased ? – Sylvain Leroux Aug 25 '14 at 15:48
  • It is! I aliased it to an alternate python version than the one installed on the system. Is there an easy and correct way to alias to alternate versions of python? The alternative is to type the absolute path every time. Thanks! – exclamaforte Aug 25 '14 at 16:12

1 Answers1

0

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

Sylvain Leroux
  • 50,096
  • 7
  • 103
  • 125