Show More
@@ -9,14 +9,18 b' import os' | |||
|
9 | 9 | import stat |
|
10 | 10 | import sys |
|
11 | 11 | |
|
12 | text = sys.argv[1] | |
|
13 | fname = sys.argv[2] | |
|
12 | if sys.version_info[0] >= 3: | |
|
13 | text = os.fsencode(sys.argv[1]) | |
|
14 | fname = os.fsencode(sys.argv[2]) | |
|
15 | else: | |
|
16 | text = sys.argv[1] | |
|
17 | fname = sys.argv[2] | |
|
14 | 18 | |
|
15 | 19 | f = open(fname, "ab") |
|
16 | 20 | try: |
|
17 | 21 | before = os.fstat(f.fileno())[stat.ST_MTIME] |
|
18 | 22 | f.write(text) |
|
19 | f.write("\n") | |
|
23 | f.write(b"\n") | |
|
20 | 24 | finally: |
|
21 | 25 | f.close() |
|
22 | 26 | inc = 1 |
General Comments 0
You need to be logged in to leave comments.
Login now