Questions tagged [ipython]

IPython is a feature-rich interactive shell for Python, and provides a kernel for frontends such as IPython Notebook and Jupyter Notebook.

IPython provides a rich architecture for interactive computing with . It includes:


Version updates:

The IPython 3.x release series is the last where IPython is released as one big package. Starting with IPython 4.0, the parts which work for any language are called , while the parts specific to executing Python code remain as IPython.

IPython 5.0 is the last major release to support Python 2.x.


Links:

7180 questions
5
votes
3 answers

Bash cell magic in IPython script

This is my first post on SO, so please let me know if the problem is not well defined. I have a script process.ipy in which I am trying to implement a cell magic as follows, #!/usr/bin/env ipython %%bash ls When I run this on the command line…
pacificprince
  • 53
  • 2
  • 5
5
votes
1 answer

ipython using 2.6 version instead of 2.7

I am trying to set up iPython to use 2.6 version instead of 2.7. Is there a way to do it? More information. I am trying to set up a iPython notebook to develop Spark application, however, the python version across the whole cluster is 2.6 where…
B.Mr.W.
  • 18,910
  • 35
  • 114
  • 178
5
votes
1 answer

I get an ImportError: cannot import name bytes with pygments

I wanted to get syntax highlighting for code plugin (https://ankiweb.net/shared/info/491274358) in Anki (https://ankiweb.net/) to be able to highlight ipython synthax. I installed pygments-ipython-console from here:…
chriad
  • 1,392
  • 15
  • 22
5
votes
1 answer

In IPython console (Spyder), can I access a variable from main() after running my program?

I am running my code using an IPython Console. I have a main() function that is executed as follows: if __name__ == "__main__": main() Then main() calls a bunch of other functions and I don't use any classes. My question is, can I print or…
user158037
  • 51
  • 2
5
votes
2 answers

Customize welcome page of ipython notebook

Can I customize the landing page of an iPython notebook server (version 2.3)? I mean that, at the starting page (something like: http://localhost:8888/tree), I'd like to display Welcome to the i[Py] Notebook of John Doe or modify the existing…
gmas80
  • 1,218
  • 1
  • 14
  • 44
5
votes
2 answers

In IPython, how do you save and append to a file rather than overwriting it?

In IPython, you can save parts of the current session by doing %save my_useful_session 10-20 23 to save lines 10-20 and line 23 to the file my_useful_session.py. If my_useful_session.py already exists, IPython promps you to overwrite the fail…
Ryan Endacott
  • 8,772
  • 4
  • 27
  • 39
5
votes
6 answers

Dump function variables to workspace in python/ipython

When developing and debugging with python/ipython repl, at some point I'd like to dump all the local variables in a function to the workspace to see what's going on. Suppose I have a function def func(): a = "blablabla" b = 1234 c =…
Ying Xiong
  • 4,578
  • 8
  • 33
  • 69
5
votes
4 answers

start ipython notebook with python file

I am not very familiar with python/ipython but somebody was asking me whether it is possible to start an ipython notebook with a specific python file. It then could be used for debugging. another software then would create a .py-file in the temp…
Antje Janosch
  • 1,154
  • 5
  • 19
  • 37
5
votes
1 answer

Why is IPython QtConsole not launching?

I've installed ipython with 'pip install ipython[all]' as described in the installation page and also have installed the qtconsole dependencies with homebrew (qt, pyqt, and sip). However, when I try to launch the qtconsole from terminal with…
thereislight
  • 285
  • 3
  • 12
5
votes
1 answer

pprint and ipdb in IPython notebook

I am trying to learn how to use the ipdb debugger. I inserted a breakpoint and by entering continue I advance from one breakpoint to another. If I want to print the value of the variable a while I am half way in the execution between the two…
ROBOTPWNS
  • 4,299
  • 6
  • 23
  • 36
5
votes
2 answers

How to set default values for IPython widgets?

I am using IPython widgets to create an interactive plot that will help students understand the determinants of accuracy of various ODE solvers available in scipy.integrate.ode. However, I can't seem to find much in the way of documentation on the…
davidrpugh
  • 4,363
  • 5
  • 32
  • 46
5
votes
4 answers

anaconda ipython notebook not starting in server setup

I am trying to install Anaconda on Terminal.com. I followed the instructions laid out in the site: https://gist.github.com/iamatypeofwalrus/5183133 The installation was successful. I am able to login to python by typing ipython at the terminal. But…
Rouse
  • 191
  • 1
  • 2
  • 5
5
votes
2 answers

After calling ipython profile create ipython_notebook_config.py was not created

I have installed brand new ipython in a virtual enviorment, after that I tried to create configuration files via: ipython profile create, however ipython_notebook_config.py was not created, while ipython_config.py and ipython_nbconvert_config.py…
jb.
  • 23,300
  • 18
  • 98
  • 136
5
votes
3 answers

How do I reset the IPython input prompt numbering? (console, not notebook or qt)

The following is my current IPython command prompt (regular terminal IPython, not the notebook, or Qt): In [45]: I'm done with my workflow, and am moving on to a new task. I'd like a way to reset the IPython input prompt number as follows: In…
Joel Bondurant
  • 841
  • 1
  • 10
  • 17
5
votes
3 answers

Execute the expression and print its value in Emacs python mode

I'm using Emacs python-mode and ipython as my IDE to write the python code. Python-mode provides a nice function "py-execute-line" to run one line code, and I've bound it to key "F7". So for the following code: cell = "Human" # Move the cursor to…
user3915365
  • 103
  • 5