Ticket #12: test.py

File test.py, 340 bytes (added by edemaine@…, 9 years ago)

A simple Syck vs. PyYAML driver

Line 
1import datetime, sys, syck, yaml
2t0 = datetime.datetime.now ()
3cards = syck.load_documents (open (sys.argv[1]))
4t1 = datetime.datetime.now ()
5print t1 - t0, 'to read the YAML via Syck'
6t0 = datetime.datetime.now ()
7cards = list (yaml.load_all (open (sys.argv[1])))
8t1 = datetime.datetime.now ()
9print t1 - t0, 'to read the YAML via PyYAML'