• 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/n/i/nipy-HEAD/examples/labs/write_paradigm_file.py   nipy(Download)
# Opening files for CSV writing differs between Python 2 and 3
if sys.version_info[0] >= 3: # Python 3
    fid = open(csvfile, "w", newline = '')
else: # Python 2
    fid = open(csvfile, "wb")

src/n/i/nipy-0.3.0/examples/labs/write_paradigm_file.py   nipy(Download)
# Opening files for CSV writing differs between Python 2 and 3
if sys.version_info[0] >= 3: # Python 3
    fid = open(csvfile, "w", newline = '')
else: # Python 2
    fid = open(csvfile, "wb")

src/p/y/pyzza-HEAD/examples/graph/_mkcolors.py   pyzza(Download)
with open('colorshemes.py', 'wt', encoding='utf-8') as output:
    output.write('@package("graph")\n')
    output.write('class Colors:\n')
    output.write('    def __init__(self):\n')
    output.write('        pass\n')
    output.write('    x11 = {\n')
    with open('/usr/share/X11/rgb.txt') as input:

src/p/y/pyzza-0.2.15/examples/graph/_mkcolors.py   pyzza(Download)
with open('colorshemes.py', 'wt', encoding='utf-8') as output:
    output.write('@package("graph")\n')
    output.write('class Colors:\n')
    output.write('    def __init__(self):\n')
    output.write('        pass\n')
    output.write('    x11 = {\n')
    with open('/usr/share/X11/rgb.txt') as input:

src/n/i/NiPy-OLD-HEAD/examples/neurospin/neurospy/Results.py   NiPy-OLD(Download)
 
    # Make HTML page 
    output = open(output_html_path, mode = "w")
    output.write("<html><head><title> Result Sheet for %s \
    </title></head><body><center>\n" % zmap_file_path)

src/p/y/pymavlink-1.0.10/examples/wptogpx.py   pymavlink(Download)
    wp = mavwp.MAVWPLoader()
    wp.load(infilename)
    outf = open(outfilename, mode='w')
 
    def process_wp(w, i):

src/p/y/pymavlink-1.0.10/examples/mavtogpx.py   pymavlink(Download)
def mav_to_gpx(infilename, outfilename):
    '''convert a mavlink log file to a GPX file'''
 
    mlog = mavutil.mavlink_connection(infilename)
    outf = open(outfilename, mode='w')

src/l/e/LEPL-5.1.3/src/lepl/_example/spindrome.py   LEPL(Download)
# Now let's run that against the contents of the dictionary:
if __name__ == '__main__':
    with open('/usr/share/dict/words', encoding='latin_1') as words:
        for word in words:
            word = word.strip()

src/p/a/pacal-HEAD/trunk/pacal/examples/dependent/linreg.py   pacal(Download)
 
M = Model(X + E + [A, B], Y)
M.toGraphwiz(f=open('bn.dot', mode="w+"))
print M
#!

src/p/a/pacal-HEAD/trunk/pacal/examples/dependent/kalman.py   pacal(Download)
M = Model(U + [Y0] + E, Y + O)
print M
M.toGraphwiz(f=open('bn.dot', mode="w+"))
#!
#! Simulation with signal filtering

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