Name

createReader()

Examples
def setup():
    global reader
    #Create the global buffered reader object
    reader = createReader("positions.txt")
    
def draw():
    try:
        line = reader.readLine()
    except:
        line = None
    
    if (line == None):
        #Stop reading, because of an error or the file is empty
        noLoop()
    else:
        #Split eace line on a tab. 
        positions = line.split("\t")
        x = int(positions[0])
        y = int(positions[1])
        point(x,y)

THIS EXAMPLE IS BROKEN

Description
Syntax
createReader(filename)
Parameters
filename
Related createWriter()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License