Thursday 29 October 2015

IRB.start equivalent in Python

Well, If anytime you wish to use the IRB.start like feature of Ruby in Python.

They way to do it is.

import code
import readline


vars = globals() ## important to carry over the methods and variable define in program to shell
shell = code.InteractiveConsole(vars)
shell.interact()


What did I learn today?

Welcome to the what did I learn today series. The intention of this blog spot is to compose the stuff that I learnt day-to-day basics and jo...