py-python-command-args broke buffer execution (C-c C-c) and duplicate C-c ! invocation

Bug #1095323 reported by Yaroslav Halchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Invalid
Medium
Andreas Roehler

Bug Description

Not sure if that is a reincarnation of #1076893 since it is probably to be related to more recent changes

Was testing current tip with splitting and spotted that I can't execute anything in *IPython* shell (e.g. via C-c C-c):

here is a complete ouput in *IPython* buffer:

Welcome to pylab, a matplotlib-based Python environment [backend: TkAgg].
For more information, type 'help(pylab)'.

In [1]:
In [2]:
In [3]:
In [4]: /usr/lib/python2.7/dist-packages/nose/util.py:14: DeprecationWarning: The compiler package is deprecated and removed in Python 3.x.
  from compiler.consts import CO_GENERATOR
option -i not recognized
Usage: ipython [options] [test] [...]

Options:
  -h, --help Show this message
  -v, --verbose Verbose output
  -q, --quiet Minimal output
  -f, --failfast Stop on first failure
  -c, --catch Catch control-C and display results
  -b, --buffer Buffer stdout and stderr during test runs

Examples:
  ipython - run default set of tests
  ipython MyTestSuite - run suite 'MyTestSuite'
  ipython MyTestCase.testSomething - run MyTestCase.testSomething
  ipython MyTestCase - run all 'test*' test methods
                                               in MyTestCase

An exception has occurred, use %tb to see the full traceback.

SystemExit: 2

To exit: use 'exit', 'quit', or Ctrl-D.
In [5]:

More interestingly: if I press C-c ! again -- similar errors reported in the *IPython* buffer but what is worse -- code buffer looses all Py* menus ... seems to switch to some "Shell-Compile" minor mode

Revision history for this message
Yaroslav Halchenko (yarikoptic) wrote :

ah -- now I remembered why my fingers insistend on C-c ! again -- with old python-mode, it would switch to the corresponding shell buffer (e.g. *IPython*). So, ideally, it should not crash and actually do nothing, but just switch to the shell (if shell-switch-buffers-on-execute)

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.1.1
importance: Undecided → Medium
Revision history for this message
Andreas Roehler (a-roehler) wrote :

Hmm, py-execute-... commands are meant to be used in source-buffer, not in shell
From shell RET sends the code.

Consider that invalid.

Changed in python-mode:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.