mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Made the example slightly more complete
This commit is contained in:
parent
7a1f6f4f2a
commit
52e02998ef
1 changed files with 7 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue