python: Scan for non-NULLs in print events

Closes #916
Closes #915