import os import pickle class Malli: """Testiluokka""" foo = "testidataa" bar = "lisää testidataa" foobar = 1 def __init__(self, f="f", b="b", fb="fb"): self.foo = f self.bar = b self.foobar = fb def __str__(self): return self.foo + self.bar + str(self.foobar) def index(req): file = open(os.path.join(os.path.dirname(req.filename), "files/testi.txt") , "r") testaus = pickle.load(file) testaus2 = pickle.load(file) testaus3 = pickle.load(file) req.write(str(testaus)) req.write(str(testaus2)) req.write(str(testaus3))