Copying from the info header in Blender 2.8 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.
That's just how it is. It is not perfect. Some operations reported in the Info panel require a specific context to run and will not work in scripts or from the Python  Console, then there are a few that get reported incorrectly there as well. It is often helpful to see the info panel, but there are limits to its usefulness. See the documentation if you need to find a specific function or ask another more specific question describing what you want to do here if you cannot find the answer elsewhere online first.