Hi, After passing some time comparing how python-mode.el and python.el create the Python interpreter, I figured out that if I (setq process-connection-type nil) in python-mode-hook, then everything work fine.
Marc On Sat, Apr 3, 2010 at 5:28 AM, Andreas Roehler <andreas.roeh...@online.de>wrote: > Marc Massar wrote: > > Hi, > > > > I have some problems using py-shell or running python in a shell in > > emacs (under solaris). I wonder if someone would have an idea of what is > > happening. Some things work, some don't. I'll try to give as many > > details as I can. > > > > The problem: > > > > The issue is that py-shell does not return doing some command. E.g. I > > will get: > > Python 2.6 (r26:66714, Dec 23 2009, 15:54:18) > > [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > >>>> print 'asdf' > > > > > > and the point will stay at the line below the >>>. If I C-c C-c, I get > >>>> print 'asdf' > > C-c C-c > > KeyboardInterrupt > >>>> > > > > and I can try again. Typing quit() does not do anything, but sending an > > EOF (C-c C-d) kills the python process. > > > > I get the same behavior when running python from the command line from a > > shell within emacs (M-x shell). Using python -i, or python -u does n to > > help. > > > > > > But my setup is not completely bad, many things work: > > - Out of emacs, python works fine. > > - Inside a M-x shell: python -c "print 'asd' " works. > > - If I do not have a py-shell, then py-execute-buffer and > > py-execute-region work. If I have a py-shell open, then in the shell I > get > >>>> ## working on region in file /tmp/python-26710Kvg.py... > > and no output. > > - py-execute-string does not seem to work: no matter what string I give > > it (even junk), I don't get any output; inthe minibuffer I get a > > message: (Shell command succeeded with no output) > > - run-python (the python shell from python.el) works fine. > > > > > Hi, > > would assume something coming across between python.el and python-mode.el > > Make sure, python-mode.el is loaded. > > > > All these these have been done with emacs 23.1.1 and xemacs 21.4, both > > run with -q, and loading python-mode.el manually (to be sure that it is > > not my .emacs settup the is messing things up). > > > > Any help in solving this issue would be appreciated. > > > > Marc > > > > M-x py-shell here calls > > IPython ... -- An enhanced Interactive Python. > > which is a great tool IMHO but needs being installed. > > Maybe installing it delivers a work-around for your problem too? > > https://launchpad.net/ipython > > > Andreas > > -- > https://code.launchpad.net/~a-roehler/python-mode<https://code.launchpad.net/%7Ea-roehler/python-mode> > https://code.launchpad.net/s-x-emacs-werkstatt/ >
_______________________________________________ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode