ActiveState / code

ActiveState Code Recipes
https://code.activestate.com
MIT License
1.92k stars 681 forks source link

tail -f in Python : not showing appended content #39

Open kaustubholpadkar opened 5 years ago

kaustubholpadkar commented 5 years ago

'tail -f in Python' does not seem to work properly. When I run this on some file it prints the content but as I update the content or append content to file and save it, console does not get updated unlike tail -f link: https://github.com/ActiveState/code/tree/master/recipes/Python/157035_tail_f_in_Python

fser commented 5 years ago

I thing I get almost the same bug: it works when you append content in it:

echo foo >> file

but doesn't detect file shrinks, see:

echo new > file