Bug 68645: ported gui.py to core

Change-Id: Ib9371bbb21e688f0679664b3723aad3514263a28
Merge "Bug 68645: ported gui.py to core"