Esempio n. 1
0
def entry_point(argv):
    if len(argv) > 1:
        filename = argv[1]
    else:
        print "usage:", argv[0], "<image name>"
        return -1
    reader = squeakimage.ImageReader(squeakimage.Stream(DummyFile(filename)))
    reader.initialize()
    image = squeakimage.SqueakImage()
    image.from_reader(reader)
    interp = tinyBenchmarks(image)
    run_benchmarks(interp)
    return 0
Esempio n. 2
0
def open_miniimage():
    return squeakimage.ImageReader(squeakimage.Stream(mini_image.open()))
Esempio n. 3
0
def imagereader_mock(string):
    import StringIO
    f = StringIO.StringIO(string)
    stream = squeakimage.Stream(f)
    return squeakimage.ImageReader(space, stream)
Esempio n. 4
0
def get_miniimage(space):
    return squeakimage.ImageReader(space,
                                   squeakimage.Stream(mini_image.open()))