• 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/pylon-HEAD/examples/national_grid/tikz.py   pylon(Download)
        ireland_path = "data/Ireland.kmz"
 
    boundaries_fd = open(boundaries_path, "w+b")
    boundaries_fd.write("% UK\n")
    boundaries_fd.write("\\tikzstyle{uk} = [-];\n")
def write_branch_tex():
    branches_path = os.path.join(OUT_PATH, "branches.tex")
 
    branches_fd = open(branches_path, "w+b")
    branches_fd.write("% Lines\n")
def write_generator_tex():
    generators_path = os.path.join(OUT_PATH, "generators.tex")
 
    generators_fd = open(generators_path, "w+b")
    generators_fd.write("% Generators\n")
    root = tree.getroot()
 
    cities_fd = open(cities_path, "w+b")
    cities_fd.write("% Cities\n")
 

src/d/e/deco-cow-HEAD/trunk/examples/db-reports/easy_reports.py   deco-cow(Download)
    def saveDUMP(self):
        fh = open(self.fname, "wt", 32768)
        for frag in self.text:
            fh.write(frag)
        fh.close()

src/b/i/biopython-1.61/Doc/examples/www_blast.py   biopython(Download)
 
# first get the sequence we want to parse from a FASTA file
file_for_blast = open('m_cold.fasta', 'r')
f_iterator = Fasta.Iterator(file_for_blast)
 
 
# save the results for later, in case we want to look at it
save_file = open('m_cold_blast.out', 'w')
blast_results = result_handle.read()
save_file.write(blast_results)

src/j/p/jProcessing-0.1/src/jNlp/edict_examples.py   jProcessing(Download)
def check_pickles(edict_examples_path):
    f = open(edict_examples_path)
    __checkpickles__ = ['edict_examples.p','ambiguous_words.p']
    for pickl in __checkpickles__:
        if not os.path.exists(pickl):
            ambiguous_words, edict_examples = parse_examples(f)
            pickle.dump(ambiguous_words, open("ambiguous_words.p",'wb'))
            pickle.dump(edict_examples, open("edict_examples.p",'wb'))
        else:
            ambiguous_words = pickle.load(open('ambiguous_words.p'))
        else:
            ambiguous_words = pickle.load(open('ambiguous_words.p'))
            edict_examples = pickle.load(open('edict_examples.p'))
        return ambiguous_words, edict_examples
 

src/n/i/NiPy-OLD-HEAD/examples/neurospin/need_data/get_data_light.py   NiPy-OLD(Download)
            os.makedirs(data_dir)
            assert os.path.exists(data_dir)
        local_file = open(MaskImage, 'w')
        local_file.write(fp.read())
        local_file.flush()
            os.makedirs(data_dir)
            assert os.path.exists(data_dir)
        local_file = open(InputImage, 'w')
        local_file.write(fp.read())
        local_file.flush()
            os.makedirs(data_dir)
            assert os.path.exists(data_dir)
        local_file = open(GroupData, 'w')
        local_file.write(fp.read())
        local_file.flush()

src/s/k/skeleton_stu-0.6.3/skeleton/examples/basic-package/distribute_setup.py   skeleton_stu(Download)
            # if the download is interrupted.
            data = src.read()
            dst = open(saveto, "wb")
            dst.write(data)
        finally:
    log.warn('Patching...')
    _rename_path(path)
    f = open(path, 'w')
    try:
        f.write(content)
 
    log.warn('Creating %s', pkg_info)
    f = open(pkg_info, 'w')
    try:
        f.write(SETUPTOOLS_PKG_INFO)
    pth_file = os.path.join(placeholder, 'setuptools.pth')
    log.warn('Creating %s', pth_file)
    f = open(pth_file, 'w')
    try:
        f.write(os.path.join(os.curdir, setuptools_file))
    os.mkdir(os.path.join(path, 'EGG-INFO'))
    pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
    f = open(pkg_info, 'w')
    try:
        f.write(SETUPTOOLS_PKG_INFO)

src/s/k/skeleton-0.6/skeleton/examples/basic-package/distribute_setup.py   skeleton(Download)
            # if the download is interrupted.
            data = src.read()
            dst = open(saveto, "wb")
            dst.write(data)
        finally:
    log.warn('Patching...')
    _rename_path(path)
    f = open(path, 'w')
    try:
        f.write(content)
 
    log.warn('Creating %s', pkg_info)
    f = open(pkg_info, 'w')
    try:
        f.write(SETUPTOOLS_PKG_INFO)
    pth_file = os.path.join(placeholder, 'setuptools.pth')
    log.warn('Creating %s', pth_file)
    f = open(pth_file, 'w')
    try:
        f.write(os.path.join(os.curdir, setuptools_file))
    os.mkdir(os.path.join(path, 'EGG-INFO'))
    pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
    f = open(pkg_info, 'w')
    try:
        f.write(SETUPTOOLS_PKG_INFO)

src/p/y/Pylon-0.4.4/examples/national_grid/tikz.py   Pylon(Download)
        ireland_path = "data/Ireland.kmz"
 
    boundaries_fd = open(boundaries_path, "w+b")
    boundaries_fd.write("% UK\n")
    boundaries_fd.write("\\tikzstyle{uk} = [-];\n")
def write_branch_tex():
    branches_path = os.path.join(OUT_PATH, "branches.tex")
 
    branches_fd = open(branches_path, "w+b")
    branches_fd.write("% Lines\n")
def write_generator_tex():
    generators_path = os.path.join(OUT_PATH, "generators.tex")
 
    generators_fd = open(generators_path, "w+b")
    generators_fd.write("% Generators\n")
    root = tree.getroot()
 
    cities_fd = open(cities_path, "w+b")
    cities_fd.write("% Cities\n")
 

src/g/a/gaesdk-python-HEAD/lib/webob_1_1_1/docs/comment-example-code/example.py   gaesdk-python(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/g/a/gaesdk-python-HEAD/lib/webob_0_9/docs/comment-example-code/example.py   gaesdk-python(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')

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