Pyramid pshell in IntelliJ python console

Copy this snippet in 'Project Settings'->'Console'->'Python Console'->'Starting script'.
If you then run 'Tools'->'Run Python Console' you will have all your pyramid variable set-up
like you would when running `pshell`.
(Most of this snippet is copy&paste from `pyramid.scripts.pshell.py`)