• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(87541)  |  Call(87541)  |  Derive(0)  |  Import(0)
open(name[, mode[, buffering]]) -> file object

Open a file using the file() type, returns a file object.  This is the
preferred way to open a file.  See file.__doc__ for further information.

src/p/y/pypy-HEAD/pypy/module/test_lib_pypy/sample_aop_code.py   pypy(Download)
def write_module(name):
    f = open(_make_filename(name), 'w')
    f.write(code)
    f.close()
 

src/p/y/py2app-0.7.3/examples/wxPython/2.5/doodle/superdoodle.py   py2app(Download)
    def SaveFile(self):
        if self.filename:
            data = self.doodle.GetLinesData()
            f = open(self.filename, 'w')
            cPickle.dump(data, f)
    def ReadFile(self):
        if self.filename:
            try:
                f = open(self.filename, 'r')
                data = cPickle.load(f)

src/p/y/py2app-0.7.3/examples/wxPython/2.4/doodle/superdoodle.py   py2app(Download)
    def SaveFile(self):
        if self.filename:
            data = self.doodle.GetLinesData()
            f = open(self.filename, 'w')
            cPickle.dump(data, f)
    def ReadFile(self):
        if self.filename:
            try:
                f = open(self.filename, 'r')
                data = cPickle.load(f)

src/s/t/statsmodels-0.4.3/statsmodels/examples/ex_shrink_pickle.py   statsmodels(Download)
import pickle
fname = 'try_shrink%d_ols.pickle' % shrinkit
fh = open(fname, 'w')
pickle.dump(results._results, fh)  #pickling wrapper doesn't work
fh.close()
fh = open(fname, 'r')
import pickle
fname = 'try_shrink%d_poisson.pickle' % shrinkit
fh = open(fname, 'w')
pickle.dump(results._results, fh)  #pickling wrapper doesn't work
fh.close()
fh = open(fname, 'r')

src/g/o/google_appengine-HEAD/lib/webob/docs/comment-example-code/example.py   google_appengine(Download)
            return []
        else:
            f = open(filename, 'rb')
            data = load(f)
            f.close()
            return data
 
    def save_data(self, url, data):
        filename = self.url_filename(url)
        f = open(filename, 'wb')

src/p/y/PySide-1.1.2/sources/pyside-examples/examples/tutorials/addressbook/part7.py   PySide(Download)
 
        try:
            out_file = open(str(fileName), 'wb')
        except IOError:
            QtGui.QMessageBox.information(self, "Unable to open file",
 
        try:
            in_file = open(str(fileName), 'rb')
        except IOError:
            QtGui.QMessageBox.information(self, "Unable to open file",

src/p/y/PySide-1.1.2/sources/pyside-examples/examples/tutorials/addressbook/part6.py   PySide(Download)
 
        try:
            out_file = open(str(fileName), 'wb')
        except IOError:
            QtGui.QMessageBox.information(self, "Unable to open file",
 
        try:
            in_file = open(str(fileName), 'rb')
        except IOError:
            QtGui.QMessageBox.information(self, "Unable to open file",

src/p/y/PySide-1.1.2/sources/pyside-examples/examples/itemviews/addressbook/addresswidget.py   PySide(Download)
    def readFromFile(self, filename):
        """ Read contacts in from a file. """
        try:
            f = open(filename, "rb")
            addresses = pickle.load(f)
    def writeToFile(self, filename):
        """ Save all contacts in the model to a file. """
        try:
            f = open(filename, "wb")
            pickle.dump(self.tableModel.addresses, f)

src/u/n/unladen-swallow-HEAD/Mac/Demo/example0/checktext.py   unladen-swallow(Download)
def main():
    pathname = EasyDialogs.AskFileForOpen(message='File to check end-of-lines in:')
    if not pathname:
        sys.exit(0)
    fp = open(pathname, 'rb')

src/i/n/IncPy-HEAD/Mac/Demo/example0/checktext.py   IncPy(Download)
def main():
    pathname = EasyDialogs.AskFileForOpen(message='File to check end-of-lines in:')
    if not pathname:
        sys.exit(0)
    fp = open(pathname, 'rb')

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