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
2 answers

When saving a pandas dataframe to csv how do I retain the columns.name?

Initial Problem When I run the following in ipython import numpy as np import pandas as pd df = pd.DataFrame(np.round(9*np.random.rand(4,4), decimals=1)) df.index.name = 'x' df.columns.name = 'y' df.to_csv('output.csv') df it outputs the…
SimonBiggs
  • 816
  • 1
  • 8
  • 18
5
votes
3 answers

Python 3.x on python(x,y)?

I'm in the process of setting up a Matlab like environment so I downloaded the latest version of python(x,y) with all the modules that come with it and downloaded python 3.4.1. Does python(x,y) not run the latest version of python? I noticed because…
Fanylion
  • 364
  • 2
  • 5
  • 14
5
votes
0 answers

IPython behavior different for .py and .ipy files despite script being "pure" python (custom exception handler hook stops working)

I have written an exception handler that is meant to log all uncaught exceptions in the code before calling the normal python exception hooks. Python and iPython have slightly different ways of doing this. What i have found is that the iPython way…
Joshua M.
  • 109
  • 1
  • 4
5
votes
2 answers

PyCrypto Possible To Check If File Already AES Encrypted?

from Crypto.Cipher import AES def encrypt_file(key, in_filename, out_filename=None, chunksize=64*1024): """ Encrypts a file using AES (CBC mode) with the given key. key: The encryption key - a…
user861555
5
votes
1 answer

How to make ipython do not leave edit mode after press ctrl-enter

In ipython 2.1.0, we have edit mode and command mode. After entering the cell, ctrl-enter would evaluate the cell in place and focus on current cell, but leave the edit mode. So if I need to continue to edit the cell, there is an extra 'Enter' to…
NathaneilCapital
  • 1,389
  • 5
  • 17
  • 23
5
votes
1 answer

Good python toolkit for plotting points on a city map?

I'm trying to plot a bunch of points on a city map and am having trouble finding a package that will work well. It looks like Matplotlib Basemap doesn't include enough detail for lots of points spanning a 30 mile radius e.g. I'm not seeing a way to…
user3654387
  • 2,240
  • 4
  • 19
  • 20
5
votes
0 answers

Save/restore IPython kernel globals

I am currently working on creating an interactive python terminal, using the IPython kernel. I have been successful at setting up a working interpreter (over web using websockets), using the KernelManager class…
eirikrye
  • 281
  • 3
  • 6
5
votes
2 answers

How to install dill in IPython?

Right at the outset, I tried conda install dill, and conda was not able to find it on the internet. Then I downloaded both .tgz and .zip files in my default IPython directory from here: https://pypi.python.org/pypi/dill After which I tried the…
Shashank Sawant
  • 1,111
  • 5
  • 22
  • 40
5
votes
0 answers

IPython notebook shows output in terminal

I'm using an IPython notebook (ipython notebook &), but when I try to print something to get any output by simply giving the variable name ans pressing Shift + Enter, instead of getting the output in notebook (next to the cell), I get it in the…
theharshest
  • 7,767
  • 11
  • 41
  • 51
5
votes
2 answers

How to use grep in IPython?

I have installed PythonXY. How do I use or install grep or a grep like function in IPython? It gives an error that grep is not defined. I want to search for text in text files in a directory.
user3518093
  • 69
  • 1
  • 3
5
votes
0 answers

Set IPython Profile for QtInProcessKernelManager

I'm running the IPython 2.0b1 code so that I can use the native QtInProcessKernelManager for embedding an IPython shell inside a Qt app. Following the example in embedded_qtconsole.py I've got everything up and running, but I cannot figure out for…
aruisdante
  • 8,875
  • 2
  • 30
  • 37
5
votes
0 answers

How to use the content of a ipython notebook Markdown cell in python

In IPython one can get previous outputs and inputs via Out[n] and In[n] variables. Is it possible to use the contents of a Markdown notebook cell and use it in python. I would like to write some text in a Markdown cell This is Markdown I would like…
mrcin
  • 116
  • 1
  • 5
5
votes
0 answers

IPython Notebook - Log messages from Scikit Parallel

I have a script that uses scikit-learn's parallel features (implemented by the joblib library). Typically I run it with higher verbosity, so that I can monitor the progress: grid = GridSearchCV(estimator, params, cv=5, n_jobs=4, verbose=50) When…
hgcrpd
  • 1,820
  • 3
  • 19
  • 32
5
votes
0 answers

Unable to send SIGINT (C-c C-c) to a process running in ansi-term

In Emacs, sometimes I start a shell with ansi-term, and then from this shell I run IPython (another shell) that enters a long loop printing a long, long output. When this happens, I often want to sendSIGINT to stop the script that IPython is…
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
5
votes
1 answer

IPython Step by step debugging of the imported module

I would like to set breakpoint in the imported module and debug step by step from ipython. I call separate function from ipython, not the whole module, so %run is not an option.
doubts
  • 1,763
  • 2
  • 12
  • 19