Exemplo n.º 1
0
print
"""
print "==testing question 2=="
print "making article... ",
print
a = Article()
a.author = "James"
a.headline = "Testing"
a.content = "AaBaCcDdEe FfGgHhIiJj KkLlMmNnOo..."
a.show()

print "saving to test.txt..."
a.save("test.txt")

print "trying to load from a nonexistent file..."
a.load("fake.txt")

print "trying to load from test.txt..."
a.load("test.txt")

print "trying to load from new.txt..."
a.load("new.txt")
a.show()

print "creating a picture and displaying it..."
p = Picture()
p.creator = "Internet stock photos"
p.title = "Strange stock stock photo"
p.location = "stock.jpg"
p.show()