Django — Automatically importing modules for python shell

Ever wonder how many hours of time you’ve wasted importing the same things over and over at the start of a python shell?

Imagine the number of times you forgot to import datetime or decimal, or your model even.

I’ve finally had enough and looked up ways around this problem.

Luckily, this iPython solution is amazingly easy. Cut and paste code into iPython’s config files (which are python as well) and you’re done!

It will take 2 minutes max.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s