no output of pyhton in emacs shell buffer

L

leo

hi there

in an emacs shell buffer i get no output of python, even no ">>>"-prompt.

however, behind the scene python still works, i can type a command blindly,
and _after quitting python_ the associated output is written to the shell
buffer.

some shell config seems to be wrong. my shell buffer sttings are:
(setq shell-file-name "bash")
(setq explicit-shell-file-name shell-file-name)
(setenv "SHELL" shell-file-name)
(setq explicit-sh-args '("-login" "-i"))
(setq shell-command-switch "-c")

i work with ntemacs, the and the cygwin python 2.3.2

any idea?

thanks, leo
 
B

Benjamin Riefenstahl

Hi Leo,


leo said:
in an emacs shell buffer i get no output of python, even no
">>>"-prompt.

however, behind the scene python still works, i can type a command
blindly, and _after quitting python_ the associated output is
written to the shell buffer.
[...]
i work with ntemacs, the and the cygwin python 2.3.2

Native Windows doesn't have pseudo-ttys. The python interpreter sees
that it is running in a pipe, and thinks that this is non-interactive
environment, instead of an interactive terminal. You could try to
force the python interpreter into interactive mode in some other way
(command option, configuration item).

Also, Cygwin Emacs would probably fix that problem, because Cygwin can
simulate pseudo-ttys between Cygwin applications.


benny
 
J

Jp Calderone

Oops. copied wrong:


strike that.

It was actually:


and got this error:

'Jim Beam' is passed as an argument for "first". 'Poker' as an argument
for "end". Then, parameter is passed as an argument for "first", and
'noodles' as an argument for "end". No arguments are passed for the
*argument (I forget what it was called in your example).

In general, the first argument matches up with the first parameter, the
second with the second, and so forth.

Does this make sense now?

Jp

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/5v4jedcO2BJA+4YRAv3qAJwJ3k0TnIePfrTTI4afUgjnSp5CVwCg1Reh
d5/7vOJ2e4ZVBfOKNJDrJMk=
=3UAc
-----END PGP SIGNATURE-----
 
E

EP

'Jim Beam' is passed as an argument for "first". 'Poker' as an argument
for "end". Then, parameter is passed as an argument for "first", and
'noodles' as an argument for "end". No arguments are passed for the
*argument (I forget what it was called in your example).

In general, the first argument matches up with the first parameter, the
second with the second, and so forth.


This seems to be what is happening but does not seem compatible with the
rules (or maybe my expectations):

1) keyword arguments must appear after non-keyword arguments in the call.
2) in the function header, *arguments must come after normal arguments and
defaults

If I am concluding correctly, this means that keywords cannot be used in a
function call for a function header like this

def function(value1=x, value2=y, *arguments)
Is that right? the two rules mean that keywords will out of "position",
source to target; but why would keywords have to be accessed by position,
aren't they akin to a dictionary?

Not a terrible limitation, was just not expected.

Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top