Update 4339.py

Formatted coding
Bug fixes
Added 'no realtime info' message
Added documentation in code