Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 196636f commit 600fd2dCopy full SHA for 600fd2d
1 file changed
doc/sphinxext/gen_gallery.py
@@ -121,18 +121,18 @@ def gen_gallery(app, doctree):
121
122
gallery_path = os.path.join(app.builder.srcdir, '_templates', 'gallery.html')
123
if os.path.exists(gallery_path):
124
- fh = file(gallery_path, 'r')
+ fh = open(gallery_path, 'r')
125
regenerate = fh.read() != content
126
fh.close()
127
else:
128
regenerate = True
129
if regenerate:
130
- fh = file(gallery_path, 'w')
+ fh = open(gallery_path, 'w')
131
fh.write(content)
132
133
134
for key in app.builder.status_iterator(
135
- thumbnails.iterkeys(), "generating thumbnails... ",
+ iter(thumbnails.keys()), "generating thumbnails... ",
136
length=len(thumbnails)):
137
image.thumbnail(key, thumbnails[key], 0.3)
138
0 commit comments