r/Python • u/fuzz3289 • Feb 28 '13
What's the one code snippet/python trick/etc did you wish you knew when you learned python?
I think this is cool:
import this
259
Upvotes
r/Python • u/fuzz3289 • Feb 28 '13
I think this is cool:
import this
7
u/[deleted] Feb 28 '13
Different use cases. I would use pydev to write a program, but IPython is very good for interactive sessions. Examples of where IPython is useful:
Any time you run a script using %run(), all the variables and methods of that script get dumped into the local namespace.
You can reference output and input by line. For instance you can edit the last five lines of input in an editor.
Tab completion and very simple access to all local variables.
History across sessions.
IPython notebook is also cool probably, but I don't use it.