from __futre__ import print_function
This commit is contained in:
parent
a9002374b1
commit
ec252440d9
14 changed files with 49 additions and 34 deletions
|
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
from __future__ import print_function
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
|
|
@ -60,11 +61,11 @@ def backup(filename):
|
|||
if info:
|
||||
data[i] = info
|
||||
if len(data) % 10 == 0:
|
||||
print 'save', filename, len(data)
|
||||
print('save', filename, len(data))
|
||||
with open(filename, 'w') as f:
|
||||
json.dump(data, f)
|
||||
else:
|
||||
print 'ignore', i
|
||||
print('ignore', i)
|
||||
with open(filename, 'w') as f:
|
||||
json.dump(data, f)
|
||||
return data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue