How to prevent MacBook Pro from sleeping with turned off external display?
Move all windows from your external displays to the mbp's display
Remove your display connector/s
Voila, It works!


If it doesnt work, Try Resetting the SMC and PRAM/NVRAM. Google about how to do that..