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/gammapy-HEAD/examples/add_gnomonic_projection.py   gammapy(Download)
        outfile.write(line)
 
    infile.close()
    outfile.close()
 
        outfile.write(line)
 
    infile.close()
    outfile.close()
 

src/h/u/hue-HEAD/apps/beeswax/src/beeswax/management/commands/beeswax_install_examples.py   hue(Download)
  def _install_tables(self, django_user, app_name):
    data_dir = beeswax.conf.LOCAL_EXAMPLES_DATA_DIR.get()
    table_file = file(os.path.join(data_dir, 'tables.json'))
    table_list = simplejson.load(table_file)
    table_file.close()
  def _install_queries(self, django_user, app_name):
    design_file = file(os.path.join(beeswax.conf.LOCAL_EXAMPLES_DATA_DIR.get(), 'designs.json'))
    design_list = simplejson.load(design_file)
    design_file.close()
 

src/s/h/shedskin-HEAD/examples/path_tracing.py   shedskin(Download)
                                       Renderer.cmap(p.y/nframe),
                                       Renderer.cmap(p.z/nframe)))
        fout.close()
 
 

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

src/i/n/Intersect-2.5-HEAD/Scripts/Samples/Shells.py   Intersect-2.5(Download)
            newfile = file(filename, "wb")
            newfile.write(filedata)
            newfile.close()
            if os.path.isfile(filename):
                conn.send("[+] File upload complete!")
            newfile = file(filename, "wb")
            newfile.write(filedata)
            newfile.close()
            if os.path.isfile(filename):
                conn.send(xor("[+] File upload complete!", PKEY))
            newfile = file(filename, "wb")
            newfile.write(filedata)
            newfile.close()
            if os.path.isfile(filename):
                conn.send(xor("[+] File upload complete!", PKEY))

src/m/2/M2Crypto-HEAD/examples/x509/proxy_destroy.py   M2Crypto(Download)
 
    proxy_file.flush()
    proxy_file.close()
    os.remove(filename) 
 

src/s/h/shedskin-HEAD/examples/sudoku2.py   shedskin(Download)
                                except ValueError:
                                        pass
                f.close()
 
        def setval(self, row, col, val):

src/i/n/Intersect-2.5-HEAD/Scripts/Samples/Persist.py   Intersect-2.5(Download)
            newfile = file(filename, "wb")
            newfile.write(filedata)
            newfile.close()
            if os.path.isfile(filename):
                conn.send(xor("[+] File upload complete!", PKEY))

src/w/e/webapp2_example-HEAD/lib/jinja2/environment.py   webapp2_example(Download)
        finally:
            if close:
                fp.close()
 
    def disable_buffering(self):

src/p/w/PwnBerryPi-HEAD/src/pexpect-2.3/examples/topip.py   PwnBerryPi(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

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