Did I find the right examples for you? yes no

All Samples(8543)  |  Call(8543)  |  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/o/bookmark_merger-0.2.2.1/example_bookmark_merger.py   bookmark_merger(Download)
finalstr=bpp.serialize_bookmarkDict(result)
finalfile.write(finalstr)
finalfile.close()
 
print 'total nunber of hyperlinks found = ', numhref

src/b/o/bookmark_merger-0.2.2.1/example.py   bookmark_merger(Download)
finalstr=bpp.serialize_bookmarkDict(result)
finalfile.write(finalstr)
finalfile.close()
 
print 'total nunber of hyperlinks found = ', numhref

src/d/j/django-mongoforms-HEAD/examples/blogprj/settings.py   django-mongoforms(Download)
            secret = file(SECRET_FILE, 'w')
            secret.write(SECRET_KEY)
            secret.close()
        except IOError:
            Exception('Please create a %s file with random characters to generate your secret key!' % SECRET_FILE)

src/d/j/django-mongotools-HEAD/examples/blogprj/settings.py   django-mongotools(Download)
            secret = file(SECRET_FILE, 'w')
            secret.write(SECRET_KEY)
            secret.close()
        except IOError:
            Exception('Please create a %s file with random characters to generate your secret key!' % SECRET_FILE)

src/t/r/traits-HEAD/examples/tutorials/tutor.py   traits(Download)
    if fh is not None:
        try:
            fh.close()
        except:
            pass

src/j/u/jug-HEAD/examples/text/jugfile.py   jug(Download)
    cache = file(cache, 'w')
    cache.write(text.encode('utf-8'))
    cache.close()
    return text
 

src/g/o/GoogleApiPython3x-HEAD/samples/service_account/tasks.py   GoogleApiPython3x(Download)
  f = file('key.p12', 'rb')
  key = f.read()
  f.close()
 
  # Create an httplib2.Http object to handle our HTTP requests and authorize it

src/b/e/behave.example-HEAD/lib/python2/pysite.py   behave.example(Download)
                    fp = file(filename, "rU")
                    data = fp.read()
                    fp.close()
                    break
                except IOError:

src/m/o/moma-django-HEAD/moma_example/data/views.py   moma-django(Download)
    f = file(orig_fname, 'w')
    f.write(file_decoded_data)
    f.close()
    _change_image_size(orig_fname, new_fname, basewidth=basewidth)
 

src/o/b/obex-map-client-HEAD/lightblue-0.4/examples/obex_ftp_client.py   obex-map-client(Download)
            return
        response = self.client.put({'name': os.path.basename(filename)}, f)
        f.close()
        print 'Server response:', response.reason
 
        f = file(filename, 'wb')
        response = self.client.get({'name': filename}, f)
        f.close()
        print 'Server response:', response.reason
 

Previous  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13  Next