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/p/y/py2app-0.8/examples/PyObjC/TinyTinyEdit/TinyTinyEdit.py   py2app(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/k/u/kuma-lib-HEAD/packages/pyparsing/docs/examples/configParse.py   kuma-lib(Download)
        print err
 
    iniFile.close()
    print
    return tokens

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

src/g/a/gae-twitter-oauth-example-HEAD/jinja2/environment.py   gae-twitter-oauth-example(Download)
        finally:
            if close:
                fp.close()
 
    def disable_buffering(self):

src/h/o/hortonworks-sandbox-HEAD/apps/beeswax/src/beeswax/management/commands/beeswax_install_examples.py   hortonworks-sandbox(Download)
    table_file = file(os.path.join(data_dir, 'tables.json'))
    table_list = simplejson.load(table_file)
    table_file.close()
 
    for table_dict in table_list:
    design_file = file(os.path.join(beeswax.conf.LOCAL_EXAMPLES_DATA_DIR.get(), 'designs.json'))
    design_list = simplejson.load(design_file)
    design_file.close()
 
    for design_dict in design_list:

src/r/a/raspberry_pwn-HEAD/src/pexpect-2.3/examples/topip.py   raspberry_pwn(Download)
            dts = time.asctime()
            fout.write ('%s - %d connections from %s\n' % (dts,s['maxip'][1],str(s['maxip'][0])))
            fout.close()
 
    # save state to TOPIP_LAST_RUN_STATS

src/r/a/raspberry_pwn-HEAD/src/pexpect-2.3/examples/script.py   raspberry_pwn(Download)
    print "Script recording started. Type ^] (ASCII 29) to escape from the script shell."
    p.interact(chr(29))
    fout.close()
    return 0
 

src/k/u/kuma-lib-HEAD/packages/pyparsing/examples/configParse.py   kuma-lib(Download)
        print err
 
    iniFile.close()
    print
    return tokens

src/p/y/pyjs-HEAD/examples/showcase/compile.py   pyjs(Download)
            f = file(os.path.join("src", "demos_" + section, fName), "r")
            src = f.read()
            f.close()
 
            demoName = fName[:-3]
    f = file(os.path.join("src", "demoInfo.py"), "w")
    f.write("\n".join(s))
    f.close()
 
    options = " ".join(sys.argv[1:]) + " --enable-signatures --enable-preserve-libs --disable-debug --dynamic-link"

src/i/n/input-lib-HEAD/packages/pyparsing/docs/examples/configParse.py   input-lib(Download)
        print err
 
    iniFile.close()
    print
    return tokens

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