Prepare code directive for inclusion in the core.
[docutils/kirr.git] / sandbox / code-block-directive / docs / myfunction.py.pseudoxml
blob04bd2cb05faf4cda0de22849f85be4c93334d48c
1 <document source="/home/milde/Code/Python/docutils-svn/sandbox/code-block-directive/docs/myfunction.py.txt">
2     <paragraph>
3         This is a test of the new "code" directive:
4     <comment xml:space="preserve">
5         Translate this document to HTML with a pygments enhanced frontend, e.g.
6         
7         ../rst2html-highlight.py --stylesheet=../data/pygments-default.css
8         
9         ../rst2latex-highlight.py --stylesheet=../data/pygments-docutilsroles.sty
10         
11         ../rst2pseudoxml-highlight.py
12     <paragraph>
13         The example from Docutils TODO list:
14     <literal_block classes="code pythonsi" xml:space="preserve">
15         print 'This is Python code.'
16            for i in range(10):
17                print i
18     <paragraph>
19         Another example:
20     <literal_block classes="code python silly" ids="my-function" names="my-function" xml:space="preserve">
21         <inline classes="ln">
22              7 
23         <inline classes="k">
24             def
25          
26         <inline classes="nf">
27             my_function
28         <inline classes="p">
29             ():
30         
31         <inline classes="ln">
32              8 
33             
34         <inline classes="sd">
35             """Test the lexer.
36         <inline classes="ln">
37              9 
38         <inline classes="sd">
39             
40         <inline classes="ln">
41             10 
42         <inline classes="sd">
43                 just a test"""
44         
45         <inline classes="ln">
46             11 
47         
48         <inline classes="ln">
49             12 
50             
51         <inline classes="c">
52             # and now for something completely different
53         
54         <inline classes="ln">
55             13 
56             
57         <inline classes="k">
58             print
59          
60         <inline classes="mi">
61             8
62         <inline classes="o">
63             /
64         <inline classes="mi">
65             2
66     <paragraph>
67         The end.