Is there a way to execute a method automatically from a python file after each command input while in python interactive?
For example: If I have a method that prints information about file, but I do not want to call that method constantly, how can I make it output after each command in python interactive?
pdbmodule. As far as I know there's nothing like what you asked. You can very easily wrap your code with testing logic in a module and then test your code interactively, so you don't have to call the function each time.