It is possible that your module has its own sys
module which makes troubles with Jupyter upon import.
Try this:
from twill.commands import go, showforms, formclear, fv, submit, show
import sys
sys.stdout = stdout
print ('hi')
Otherwise I'd just recommend never using those online notebooks which are, to my opinion, essentially limiting because of unexpected behaviors not easy to solve due to a lack of documentation relative to main Python.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…