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/g/a/gae-twitter-oauth-example-HEAD/werkzeug/debug/tbtools.py   gae-twitter-oauth-example(Download)
                source = f.read()
            finally:
                f.close()
 
        # already unicode?  return right away

src/g/a/gae-twitter-oauth-example-HEAD/werkzeug/debug/render.py   gae-twitter-oauth-example(Download)
        return f.read()
    finally:
        f.close()
 
 

src/p/e/personis-0.933/personis/examples/aelog/apiclient/http.py   personis(Download)
    f = file(filename, 'r')
    self.data = f.read()
    f.close()
    self.headers = headers
 

src/v/i/VisTrails-HEAD/scripts/gen_vtk_examples/convert_to_vt.py   VisTrails(Download)
        print >>out_file, '    out_filename = None'
        print >>out_file, 'vtk.to_vt(out_filename)'
        out_file.close()
 
 

src/e/n/enterprise-toolkit-HEAD/api_sample/third_party/apiclient/http.py   enterprise-toolkit(Download)
      f = file(filename, 'r')
      self.data = f.read()
      f.close()
    else:
      self.data = None

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

src/l/f/LFPy-1.0/examples/create_rotation_file.py   LFPy(Download)
        F.write('z=%g\n' % 0)
 
        F.close()
 
        print 'file %s created!' % rotationFilePath

src/p/y/pyface-HEAD/examples/tasks/advanced/python_editor.py   pyface(Download)
        f = file(path, 'w')
        f.write(self.control.code.toPlainText())
        f.close()
 
        self.dirty = False

src/m/o/modern-python-example-HEAD/lib/python2.7/site-packages/logilab/common/daemon.py   modern-python-example(Download)
        f = file(pidfile, 'w')
        f.write(str(os.getpid()))
        f.close()
        os.chmod(pidfile, 0644)
    # change process uid

src/p/y/PyZ3950-HEAD/example/twisted/textsearch.py   PyZ3950(Download)
                if self.check_match (line):
                    res_set.append (ResultElt (fn, lineno, line))
            f.close ()
 
        # need to include self in res_set so that Present can call back

Previous  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10  Next