From: Guido Van Hoecke <guivho@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Weird pyton/eshell quirk
Date: Sat, 07 Feb 2015 18:57:08 +0100 [thread overview]
Message-ID: <m2a90pk3kb.fsf@gmail.com> (raw)
Hi,
Just stumbled on some weird behavior of eshell when running a python
script.
Script 'silly' just shows MySQLdb version info. It has a shebang line
to be run with python. It runs fine, whether called as './silly' or as
'python ./silly'. When copied to an 'addPlaces' file, it no longer
runs unless called as 'python ./addPlaces'. It puzzles me why eshell
runs './silly' and barks on './addPlaces'. They are exact copies!
Here's the eshell transcript:
$ which python
/usr/bin/python
$ ls -la ./silly
-rwxr-xr-x 1 guivho wheel 65 2015-02-07 18:25 ./silly
$ cat ./silly
#!/usr/bin/python
import MySQLdb as mdb
print mdb.version_info
$ ./silly
(1, 2, 4, 'beta', 4)
$ python ./silly
(1, 2, 4, 'beta', 4)
$ cp silly addPlaces
$ ./addPlaces
Traceback (most recent call last):
File "./addPlaces", line 3, in <module>
import MySQLdb as mdb
ImportError: No module named MySQLdb
$ python addPlaces
(1, 2, 4, 'beta', 4)
This weird behavior occurs with other names, such as 'place',
'places', 'plaats' etc, but not with e.g. 'car', 'cars' or
'incredible'.
There must be a reason why this happens, but I don't get it.
Any suggestion, anyone?
TIA,
Guido
next reply other threads:[~2015-02-07 17:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-07 17:57 Guido Van Hoecke [this message]
2015-02-07 22:17 ` Weird pyton/eshell quirk R Mercado
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2a90pk3kb.fsf@gmail.com \
--to=guivho@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.