0

I'm trying to use Twill with Jupyter/Python. However if I use Print() after I've imported Twill eg.

from twill.commands import go, showforms, formclear, fv, submit, show

print("hi") 

it won't print anything.

Is this normal behaviour?

This happens on google colan and jupyterLab

Thomas
  • 435
  • 6
  • 20

1 Answers1

1

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.

Synthase
  • 5,849
  • 2
  • 12
  • 34