Update stylesheet to work with the new standard "code" directive.
[pylit.git] / rstdocs / tutorial / hello_with_doctest.py.txt
blob0a253cc72cc487e86722201f4fd5676a675f3cc2
1 The classical programming example in Python
2 will print a familiar greeting:
4   >>> greeting()
5   Hello world
7 ::
9   def greeting():
10       print "Hello world."
12 run doctests if called from the command line::
14   if __name__ == "__main__":
15       import doctest
16       doctest.testmod()