5.2. Tangling code

So far, we have just produced a document. What about programming? Here's a sample document with tangling. On-the-fly interscript for test 6 follows.
Start interscript section from tutorial.pak
   196: @py = tangler('interscript/tests/output/mymodule.py')
   197: @head(1,'My Module')
   198: This is my very own module.
   199: @select(py)
   200: import sys
   201: class myclass:
   202:   def __init__(self, name):
   203:     self.name = name
   204: @head(2,'hello method')
   205: Just says hello.
   206: @select(py)
   207:   def hello(self):
   208:     print 'hello','self.name
   209: @doc()
   210: And now back to doco.
End interscript section from tutorial.pak
Test output at ../tests/output/test_6.html. Logfile at ../tests/output/test_6.log.


5.2.1. Tangler Constructors
5.2.2. Original Source References
5.2.3. Code sections