Source

savReaderWriter / savReaderWriter / doc_tests / test_SavReader_cmp.txt

Full commit
##############################################################################
## Read a file and use operators (__cmp__)
##############################################################################

>>> import sys
>>> sys.stdout.write('<skipline> '); from savReaderWriter import * # doctest: +ELLIPSIS
<skipline> ...

## ... get number of cases by using __len__
>>> savFileName = "../savReaderWriter/test_data/Employee data.sav"
>>> try:    # doctest: +ELLIPSIS
...     reader = SavReader(savFileName)        
...     print reader == reader, reader > reader, reader < reader
...     print reader == 474, reader > 474, reader < 474
... finally:
...     reader.close()
...
True False False
True False False