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/m/o/modern-python-example-HEAD/lib/python2.7/site.py   modern-python-example(Download)
                    fp = file(filename, "rU")
                    data = fp.read()
                    fp.close()
                    break
                except IOError:

src/g/o/google-api-python-client-HEAD/samples/service_account/tasks.py   google-api-python-client(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/n/a/nagare.examples-0.3.0/nagare/examples/gallery/gallerydata.py   nagare.examples(Download)
    f = file(os.path.join(os.path.dirname(__file__), 'dragon.jpg'))
    img = f.read()
    f.close()
 
    gallery.photos.append(PhotoData(title=u'Dragon', img=img, thumbnail=img))

src/s/p/spire.io.py-HEAD/examples/version_check.py   spire.io.py(Download)
            fp = file('.last-message', 'w')
            fp.write(str(last_message_timestamp))
            fp.close()
 
            if 'getVersion' in [x['content'] for x in messages]:
        fp = file('.last-message')
        last_message_timestamp = long(fp.read().strip())
        fp.close()
    except IOError:
        pass

src/p/y/python-rtfng-HEAD/examples/examples2.py   python-rtfng(Download)
    print >> fout
    fout.write( image.ToRawCode( 'TEST_IMAGE' ) )
    fout.close()
 
    import image_tmp

src/p/e/pexpect-u-2.5.1/examples/topip.py   pexpect-u(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/p/e/pexpect-u-2.5.1/examples/script.py   pexpect-u(Download)
    print "Script recording started. Type ^] (ASCII 29) to escape from the script shell."
    p.interact(chr(29))
    fout.close()
    return 0
 

src/p/e/pexpect-nm-2.6/examples/topip.py   pexpect-nm(Download)
            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/p/e/pexpect-nm-2.6/examples/script.py   pexpect-nm(Download)
    print "Script recording started. Type ^] (ASCII 29) to escape from the script shell."
    p.interact(chr(29))
    fout.close()
    return 0
 

src/m/o/moma-django-0.1.1/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)
 

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