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/i/n/inasafe-HEAD/safe/messaging/example/gui_example.py   inasafe(Download)
        header = header_file.read()
        self.footer = footer_file.read()
        header_file.close()
        footer_file.close()
        self.header = header.replace('PATH', base_dir)

src/n/e/networkx-1.8.1/doc/make_examples_rst.py   networkx(Download)
            fhstatic = file(static_file, 'w')
            fhstatic.write(contents)
            fhstatic.close()
 
            fh = file(outfile, 'w')
 
    #        fh.write('\n\nKeywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)')
            fh.close()
 
        fhsubdirIndex.close()
 
    fhindex.close()

src/n/e/networkx-HEAD/doc/make_examples_rst.py   networkx(Download)
            fhstatic = file(static_file, 'w')
            fhstatic.write(contents)
            fhstatic.close()
 
            fh = file(outfile, 'w')
 
    #        fh.write('\n\nKeywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)')
            fh.close()
 
        fhsubdirIndex.close()
 
    fhindex.close()

src/p/y/pyobjc-framework-Cocoa-2.5.1/Examples/AppKit/TinyTinyEdit/TinyTinyEdit.py   pyobjc-framework-Cocoa(Download)
    def writeToFile_ofType_(self, path, tp):
        f = file(path, "w")
        text = self.textView.string()
        f.write(text.encode("utf8"))
        f.close()
    def readFromUTF8(self, path):
        f = file(path)
        text = unicode(f.read(), "utf8")
        f.close()
        self.textView.setString_(text)

src/s/i/simpleauth-0.1.4/example/lib/httplib2/__init__.py   simpleauth(Download)
            f = file(cacheFullPath, "rb")
            retval = f.read()
            f.close()
        except IOError:
            pass
    def set(self, key, value):
        cacheFullPath = os.path.join(self.cache, self.safe(key))
        f = file(cacheFullPath, "wb")
        f.write(value)
        f.close()

src/m/i/mirror-counter-sample-python-HEAD/lib/httplib2/__init__.py   mirror-counter-sample-python(Download)
            f = file(cacheFullPath, "rb")
            retval = f.read()
            f.close()
        except IOError:
            pass
    def set(self, key, value):
        cacheFullPath = os.path.join(self.cache, self.safe(key))
        f = file(cacheFullPath, "wb")
        f.write(value)
        f.close()

src/s/i/simpleauth-HEAD/example/lib/httplib2/__init__.py   simpleauth(Download)
            f = file(cacheFullPath, "rb")
            retval = f.read()
            f.close()
        except IOError:
            pass
    def set(self, key, value):
        cacheFullPath = os.path.join(self.cache, self.safe(key))
        f = file(cacheFullPath, "wb")
        f.write(value)
        f.close()

src/c/u/curso_python_dga_11-HEAD/sistemas/examples/watchdog/watchdog.py   curso_python_dga_11(Download)
def cat(path):
    """Outputs the content of the file at the given path"""
    f = file(path, 'r')
    d = f.read()
    f.close()
            f.write(message)
            f.flush()
            f.close()
        return True
 

src/m/a/matplotlib-ancient-HEAD/examples/tests/backend_driver.py   matplotlib-ancient(Download)
            tmpfile.write('\nsavefig(r"%s", dpi=150)' % outfile)
 
        tmpfile.close()
        start_time = time.time()
        program = [x % {'name': basename} for x in python]

src/k/i/kitsune-HEAD/vendor/packages/pyparsing/docs/examples/configParse.py   kitsune(Download)
        print err
 
    iniFile.close()
    print
    return tokens

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