Skip to content

emacs hangs if python block is not executed #28

@kdheepak

Description

@kdheepak

If I run just an ipython session (example I've used below), I get the following warning and emacs hangs

Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native’ was t and "python" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list.  Native completions have been disabled locally. 
#+BEGIN_SRC ipython :session mysession :exports both
  def foo(x):
      return x + 9

 [foo(x) + 7 for x in range(7)]
#+END_SRC

However, if I run a python session before that, I get the same warning but emacs doesn't hang and I get results.

#+begin_src python :results output :session
print "There are %d hours in a week." % (7*24)
2**10
#+end_src

#+RESULTS:
: Python 2.7.9 |Anaconda 2.1.0 (x86_64)| (default, Dec 15 2014, 10:37:34) 
: [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
: Type "help", "copyright", "credits" or "license" for more information.
: Anaconda is brought to you by Continuum Analytics.
: Please check out: http://continuum.io/thanks and https://binstar.org
: There are 168 hours in a week.
: python.el: native completion setup loaded
: 1024


#+BEGIN_SRC ipython :session mysession :exports both
  def foo(x):
      return x + 9

 [foo(x) + 7 for x in range(7)]
#+END_SRC

#+RESULTS:
: [16, 17, 18, 19, 20, 21, 22]

Any idea what is going on here?

Edit - I also get the following message when it hangs : "Shell native completion is disabled, using fallback". I'm using Jupyter v4.0

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions