Re: How to streamingly read text file and display whenever updated text

2013-10-06 Thread galeomaga
https://docs.google.com/file/d/0B2D69u2pweEvelh1T25ra19oZEU/edit?usp=sharing no matter call tail directly in python or using the script of tail all failed it seems it can not read next line -- https://mail.python.org/mailman/listinfo/python-list

Re: How to streamingly read text file and display whenever updated text

2013-10-06 Thread galeomaga
I can start thread and no exception error print, and I do not know how to use tail in python script I need to cope with MySQL in python later as all file path stored in it, it is to monitor all text files -- https://mail.python.org/mailman/listinfo/python-list

Re: How to streamingly read text file and display whenever updated text

2013-10-05 Thread galeomaga
Joost Molenaar於 2013年10月5日星期六UTC+8下午7時02分05秒寫道: > A bit of googling found me this: > > http://www.linux-support.com/cms/implementation-of-tail-in-python/ > > > > import time > > import sys > > > > def tail_f(file): > > interval = 1.0 > > while True: > > where = file.tell() > >

Re: How to streamingly read text file and display whenever updated text

2013-10-05 Thread galeomaga
gale...@gmail.com於 2013年10月5日星期六UTC+8下午3時38分51秒寫道: > #!/usr/bin/python > > import time > > f = open('/home/martin/Downloads/a.txt') > > while 1: > > for line in f: > > print line; > > time.sleep(1); if __name__ == '__main__': logfile = open("/home/martin/Downlo

How to streamingly read text file and display whenever updated text

2013-10-05 Thread galeomaga
#!/usr/bin/python import time f = open('/home/martin/Downloads/a.txt') while 1: for line in f: print line; time.sleep(1); -- https://mail.python.org/mailman/listinfo/python-list