useful tools

This commit is contained in:
Kenneth Reitz
2011-03-20 21:39:33 -04:00
parent 4c5c33aa53
commit 4bb7151acf
+6 -19
View File
@@ -1,31 +1,18 @@
Useful Tools Useful Tools
================= ============
IPython IPython
------------------------------- -------
Say you have a utility function that returns the URL the user should be ::
redirected to. Imagine it would always redirect to the URL's ``next``
parameter or the HTTP referrer or the index page::
$ curl -O http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py
As you can see, it accesses the request object. If you try to run this
from a plain Python shell, this is the exception you will see: ::
$ easy_install pip
Hopefully you'll never have to use **easy_install** again.
$ pip install ipython
BPython BPython
------- -------
By just creating a request context, you still don't have run the code that ::
is normally run before a request. This probably results in your database
being unavailable, the current user not being stored on the
:data:`~flask.g` object etc.
$ pip install bpython