File: make_example_template.py

package info (click to toggle)
mmtk 2.7.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,788 kB
  • ctags: 6,600
  • sloc: python: 18,050; ansic: 12,400; makefile: 129; csh: 3
file content (13 lines) | stat: -rw-r--r-- 233 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
import sys

template = """
##############################################

.. literalinclude:: ../../../%s
   :language: python
   :linenos:

"""

script_name = sys.argv[1]
file(script_name+'.rst', 'w').write(template % script_name)