linode-api-python-part-2
Some of us are CLI junkies, and would prefer their hands never have to leave the keyboard to perform tasks. With that in mind I did a quick work up of an interactive shell for the API. One of the goals I had for the bindings was to introduce as few dependencies outside the core python libraries as possible, so the interactive console logically inherits from code.InteractiveConsole, which is for the most part a modified version of HistoryConsole from this example. The example claims that the console (presumably when used with .interact()) would have tab complete and history enabled. Much to my dismay and wasted time debugging, this is not the case. The reality is the console is sufficiently sandboxed (my guess) as to not inherit what you may setup of readline by the time you need it (as far as I could tell). The solution I came up with was to force my will upon the new interactive shell before the user enters it.