Fix Python – How to reload modules in django shell?

I am working with Django and use Django shell all the time. The annoying part is that while the Django server reloads on code changes, the shell does not, so every time I make a change to a method I am testing, I need to quit the shell and restart it, re-import all the modules I need, reinitialize all the variables I need etc. While iPython histor….

Fix Python – ipython reads wrong python version

I’ve been having trouble with Python, iPython and the libraries. The following points show the chain of the problematics. I’m running Python 2.7 on Mac Lion.

iPython doesn’t read the libraries of scipy, matplotlib, but it does read numpy.
To fix this, I tried installing Python’s source code version, and it only gave me more problems since now….

Fix Python – Disable IPython Exit Confirmation

It’s really irritating that every time I type exit(), I get prompted with a confirmation to exit; of course I want to exit! Otherwise, I would not have written exit()!!!
Is there a way to override IPython’s default behaviour to make it exit without a prompt?
….

Fix Python – how to “reimport” module to python then code be changed after import

I have a foo.py
def foo():
print “test”

In IPython I use:
In [6]: import foo
In [7]: foo.foo()
test

Then I changed the foo() to:
def foo():
print “test changed”

In IPython, the result for invoking is still test:
In [10]: import foo
In [11]: foo.foo()
test

Then I use:
In [15]: del foo
In [16]: import foo
In [17]: foo.foo()
test

I….

Fix Python – How to pickle or store Jupyter (IPython) notebook session for later

Let’s say I am doing a larger data analysis in Jupyter/Ipython notebook with lots of time consuming computations done. Then, for some reason, I have to shut down the jupyter local server I, but I would like to return to doing the analysis later, without having to go through all the time-consuming computations again.

What I would like love to do i….

Fix Python – How to pickle or store Jupyter (IPython) notebook session for later

Let’s say I am doing a larger data analysis in Jupyter/Ipython notebook with lots of time consuming computations done. Then, for some reason, I have to shut down the jupyter local server I, but I would like to return to doing the analysis later, without having to go through all the time-consuming computations again.

What I would like love to do i….