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/q/t/Qt-Python-Binding-Examples-HEAD/resource_compiler/auto_create_qrc.py   Qt-Python-Binding-Examples(Download)
        f = file(dst_file, "w")
        f.write(buf)
        f.close()
    else:
        sys.stdout.write(buf)

src/m/o/mollyZ3950-2.04-molly1/example/twisted/textsearch.py   mollyZ3950(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

src/m/i/mirror-counter-sample-python-HEAD/lib/apiclient/http.py   mirror-counter-sample-python(Download)
      f = file(filename, 'r')
      self.data = f.read()
      f.close()
    else:
      self.data = None

src/d/j/django-admin-report-HEAD/example/lib/sx/pisa3/pisa.py   django-admin-report(Download)
                tfile.write(data)
            ufile.close()
            tfile.close()
            self.tfileList.append(path)
            if not self.quiet:

src/s/i/simpleapi-HEAD/example_project/server/django_server3/settings.py   simpleapi(Download)
            secret = file(SECRET_FILE, 'w')
            secret.write(SECRET_KEY)
            secret.close()
        except IOError:
            Exception('Please create a %s file with random characters to generate your secret key!' % SECRET_FILE)

src/s/i/simpleapi-HEAD/example_project/server/django_server2/settings.py   simpleapi(Download)
            secret = file(SECRET_FILE, 'w')
            secret.write(SECRET_KEY)
            secret.close()
        except IOError:
            Exception('Please create a %s file with random characters to generate your secret key!' % SECRET_FILE)

src/s/i/simpleapi-HEAD/example_project/server/django_server/settings.py   simpleapi(Download)
            secret = file(SECRET_FILE, 'w')
            secret.write(SECRET_KEY)
            secret.close()
        except IOError:
            Exception('Please create a %s file with random characters to generate your secret key!' % SECRET_FILE)

src/s/c/scrapy-examples-HEAD/linkedin/linkedin/linkedin/reload_proxy.py   scrapy-examples(Download)
            f.write(proxyModel.to_line())
            f.write("\n")
        f.close()
        print "$proxy/> write proxies to %s." % f.name
 

src/r/a/raspberrypi-experiments-HEAD/_Hardware_Connect/Serial_Arduino/Python/pyserial-2.5/examples/wxTerminal.py   raspberrypi-experiments(Download)
                text = text.encode("latin1")    #hm, is that a good asumption?
            f.write(text)
            f.close()
 
    def OnClear(self, event):

src/d/e/DE0-Nano-BitCoin-Miner-HEAD/Mojo_LX9/MiningSoftware/pyserial-2.6/examples/wxTerminal.py   DE0-Nano-BitCoin-Miner(Download)
                text = text.encode("latin1")    #hm, is that a good asumption?
            f.write(text)
            f.close()
 
    def OnClear(self, event):

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