Skip to content

Instantly share code, notes, and snippets.

View iziang's full-sized avatar

Ziang Guo iziang

View GitHub Profile
<html>
<head>
<title>This is title</title>
<script type="text/javascript" src="jquery.js"></script>
<style type="text/css">
body
{
font-size: 12pt;
font-family: Calibri;
padding : 10px;
@iziang
iziang / py_tail.py
Created October 17, 2014 02:10
python模拟tail -f监控文件的变动
# 方法1
with open('/tmp/track-this') as f:
while True:
line = f.readline()
if line:
print line
# 方法2
import time
def follow(thefile):