all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Weird pyton/eshell quirk
@ 2015-02-07 17:57 Guido Van Hoecke
  2015-02-07 22:17 ` R Mercado
  0 siblings, 1 reply; 2+ messages in thread
From: Guido Van Hoecke @ 2015-02-07 17:57 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-07 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-07 17:57 Weird pyton/eshell quirk Guido Van Hoecke
2015-02-07 22:17 ` R Mercado

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.