Skip to content

Commit 68e353e

Browse files
authored
Merge pull request 521xueweihan#81 from cclauss/patch-1
from __future__ import print_function for Python 3
2 parents 138a0d0 + f0f2a29 commit 68e353e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

script/make_content/make_content.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
所以,我打算写个脚本,用于生成月刊,这样如果修改了通用内容部分,就只需要重新生成月刊,而不需要
1515
手动修改已发布的所有期的内容。
1616
"""
17+
from __future__ import print_function
1718
import sys
1819
import os
1920

@@ -34,7 +35,7 @@ def check_path(path):
3435
检查路径是否存在
3536
"""
3637
if not os.path.exists(path):
37-
print 'not exist: {path}'.format(path=path)
38+
print('not exist: {path}'.format(path=path))
3839
return False
3940
else:
4041
return True
@@ -64,7 +65,7 @@ def make_content(num):
6465
output_data = temple_data.replace(CONTENT_FLAG, content_data)
6566

6667
write_file(os.path.join(output_path, 'HelloGitHub{num}.md'.format(num=num)), output_data)
67-
print 'Make 《GitHub月刊{num}》 successful!'.format(num=num)
68+
print('Make 《GitHub月刊{num}》 successful!'.format(num=num))
6869

6970

7071
def make_all_content():

0 commit comments

Comments
 (0)