custom layout (via scripting)
Press Ctrl-Up Arrow (Cursor up) while the mouse pointer is in the viewport. 

This wouldn't remove the main toolbar but is reversible by Ctrl-Down Arrow (Cursor Down). 

You could get rid of the OS/Window-Manager decorations using Menu: Toggle Fullscreen Alt-F11.

What you (probably) want is this:



Select 3D View Full and drag the main menu away.

From python you can select a manually prepared screen layout (save in the .blend) by:

bpy.context.window.screen = bpy.data.screens['screen_name']