All Samples(8510) | Call(8510) | Derive(0) | Import(0)
close() -> None or (perhaps) an integer. Close the file. Sets data attribute .closed to True. A closed file cannot be used for further I/O operations. close() may be called more than once without error. Some kinds of file objects (for example, opened by popen()) may return an exit status upon closing.
src/b/l/blueplanet-HEAD/blueplanet/example_clients/It_coneplant_profiler.py blueplanet(Download)
i+= 1
f, sys.stdout= sys.stdout, f
f.close()
src/b/l/blueplanet-HEAD/blueplanet/example_clients/coneplant_profiler.py blueplanet(Download)
i+= 1
f, sys.stdout= sys.stdout, f
f.close()
src/f/l/flypdf-HEAD/src/examples/tut4.py flypdf(Download)
def ChapterBody ( self, fname ):
#Read text file
f = file ( fname )
lines = f.readlines ()
f.close ()
src/f/l/flypdf-HEAD/src/examples/tut3.py flypdf(Download)
def ChapterBody ( self, fname ):
#Read text file
f = file ( fname )
lines = f.readlines ()
f.close ()
src/p/y/pyserial-HEAD/pyserial/examples/wxTerminal.py pyserial(Download)
if type(text) == unicode:
text = text.encode("latin1") #hm, is that a good asumption?
f.write(text)
f.close()
def OnClear(self, event):
"""Clear contents of output window."""
src/p/y/pyparsing-1.5.5/docs/examples/configParse.py pyparsing(Download)
print " "*(err.column-1) + "^"
print err
iniFile.close()
print
return tokens
src/n/a/nagare.examples-0.2.0/nagare/examples/gallery/gallerydata.py nagare.examples(Download)
f = file(os.path.join(os.path.dirname(__file__), 'dragon.jpg'))
img = f.read()
f.close()
gallery.photos.append(PhotoData(title=u'Dragon', img=img, thumbnail=img))
src/l/i/lightblue-HEAD/trunk/examples/obex_ftp_client.py lightblue(Download)
print "Cannot open file %s" % filename
return
response = self.client.put({'name': os.path.basename(filename)}, f)
f.close()
print 'Server response:', response.reason
def get(self, filename):
if os.path.isfile(filename):
if raw_input("Overwrite local file %s?" % filename).lower() != "y":
return
print 'Retrieving %s...' % filename
f = file(filename, 'wb')
response = self.client.get({'name': filename}, f)
f.close()
src/b/o/bookmark-merger-HEAD/trunk/example.py bookmark-merger(Download)
finalfile=file('merged bookmarks.html', 'w')
finalstr=bpp.serialize_bookmarkDict(result)
finalfile.write(finalstr)
finalfile.close()
print 'total nunber of hyperlinks found = ', numhref
print 'number of hyperlinks in final file=', len(bpp.hyperlinks_bookmarkDict(result))
src/p/y/pyparsing-1.5.5/examples/configParse.py pyparsing(Download)
print " "*(err.column-1) + "^"
print err
iniFile.close()
print
return tokens
Previous 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 Next