Found the issue while fixing googlesamples/assistant-sdk-python#182
Using the code print('Registering....', end='', flush=True) in python 2.7 causes the following error
Without the import statement, it is a Compilation error
https://ideone.com/FtNFzO
With the import statement, it is a RunTime error for flush being an invalid argument
https://ideone.com/a00yNv