I'm just getting started with trying to script with Blender (currently in 2.8), but, in the very first steps I'm really confused why the command directly copied from the info header doesn't work. It is the code that Blender ran, and it's not working in the interactive console.
EDIT: It seems that the interactive console is giving the wrong context while we switch our mouse location from the properties panel to the interactive console, i.e. the context changes when we change our mouse location to various viewports of the blender file. So, How do we set the context for the specific parts of the viewport? In this case, to the properties panel. If possible please provide a list of all the possible values that can be input, or possibly a link to it.