]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Made the example slightly more complete
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 16 May 1995 13:43:09 +0000 (13:43 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 16 May 1995 13:43:09 +0000 (13:43 +0000)
Tools/modulator/EXAMPLE.py

index 40436993db294865b3ebd84a359d67e51ab34da4..d4b254ae8cd23514478523dc0fdfa0a80a0e4342 100644 (file)
@@ -3,6 +3,9 @@
 #
 # You may also have to strip some imports out of modulator to make
 # it work.
+
+import genmodule
+
 #
 # Generate code for a simple object with a method called sample
 
@@ -44,3 +47,7 @@ m.name = 'sample'
 m.abbrev = 'sample'
 m.methodlist = ['newsimple', 'newnumberish', 'newott']
 m.objects = [o, o2, o3]
+
+fp = open('EXAMPLEmodule.c', 'w')
+genmodule.write(fp, m)
+fp.close()