This plugin allows you to attach pseudo terminals to your applications.
Currently the pseudoterminal server can be attached (and exposed over network) only on the first worker (this limit will be removed in the future).
The plugin exposes a client mode too (avoiding you to mess with netcat, telnet or screen settings)
The plugin is not included in the default build profiles, so you have to build it manually:
python uwsgiconfig.py --plugin plugins/pty [profile]
(remember to specify the build profile if you are not using the default one)
import IPython
from uwsgidecorators import *
# only worker 1 has the pty attached
@postfork(1)
@thread
def tshell():
while True:
IPython.embed()