Access python data path with ... (Ellipsis)
It is a quirk of Blender's current UI, but actually you can deduce its location a bit, helped by Blender's API documentation. 

Direct Access

The property you're looking for is SpaceView3D.show_grease_pencil, that one is clear. Now, what class contains a Space (SpaceView3D's ancestor)? Scroll down to References section in that class' docs. One of references there leads to Area.spaces. This is easy, because one of its docs' Reference leads to Screen.areas, and Screen is the type of what's visible before the ellipsis. So the attribute's full path is:

bpy.data.screens['Default'].areas[X].spaces[Y].show_grease_pencil


... where X depends on the screen's subdivision, and Y is 0 if the 3D View is visible in that area. You can find that out from Console:



Using Context

It's easier to read 3D View space's settings through bpy.context, e.g.:


Use bpy.context.space_data, if the 3D View area is active (i.e. accessed through an operator executed from the 3D View itself).
Use bpy.context.area.spaces[1], if accessed through a Console whose display type is directly switched from a 3D View.
Use bpy.context.screen.areas[X].spaces[0] if accessed through a Console in another area, index X must be searched beforehand.


The same show_grease_pencil attribute is accessible through these different paths.