displayHTML can't seem to be used from Python code, only hand typed into a cell???

T_1
New Contributor III

Trying to use displayHTML from w/in a Python module gets a Python exception:

NameError: name 'displayHTML' is not defined

and I've found no way around this. It seems to be something at the UI layer or something, not a Python function that can be referenced/imported or accessed/used from w/in code. Other notebooks provide methods for rendering HTML from w/in Python modules running in the notebook. The Ipython display/HTML methods don't work. Is there a Python function that will render HTML?

Here are a couple external issue I found:

https://stackoverflow.com/questions/71474139/how-to-import-displayhtml-in-databricks

https://github.com/sassoftware/saspy/issues/462

Any insight would be appreciated.

Thanks,

Tom