This is a test of the new "code" directive:

.. Translate this document with a pygments enhanced frontend, e.g.

    ../rst2html-highlight.py --stylesheet=../data/pygments-default.css
    ../rst2latex-highlight.py --stylesheet=../data/pygments-docutilsroles.sty
    
   or via the test case in
   
    ../pygments_code_block_directive.py --traceback
    

The example from Docutils TODO list:

.. code:: python

  print 'This is Python code.'
  for i in range(10):
      print i

Numbered lines:

.. code:: python
  :number-lines:

  # This is Python code,
  # that prints the integers from 0 to 9
  for i in range(10):
      print i

Another example:

.. code:: python
  :class: silly
  :name: my_function
  :number-lines: 7

  def my_function():
      """Test the lexer.
      """

      # and now for something completely different
      print 8/2

Inline code :code:`$\alpha = \int_0^\infty f(x) dx$`.

.. role:: python(code)
   :language: python
   :class: testclass

Python code :python:`print("The end.")`
