Python 101: Introspection
blog.pythonlibrary.org
blog.pythonlibrary.org
Fast forward a few years and I can hardly stand to use Visual Studio, it's just so slow and clunky! Who needs Intellisense? Just open up the python interpreter and if you're not sure about something you can dir() it :-) But I find myself reading a lot more of the source code and documentation for third party libraries that I'm using. I'm a far different programmer now than I used to be, and I thank Python for helping me progress so quickly.
* Readline-like autocomplete with suggestions displayed as you type.
* In-line syntax highlighting.
* Displays expected parameter list for any Python function.
* "Rewind" function to pop the last line of code from memory and re-evaluate. etc
print '\n'.join(dir(my_object))
1. Put this in your user shell RC:
export PYTHONSTARTUP="~/pycode/pythonrc.py"
2. Put this in pythonrc.py import readline, rlcompleter
readline.parse_and_bind("tab: complete")I ask this because the type() function is awesome.