Add %pythonbegin directive.
For adding code at the beginning of the generated .py file.
This commit is contained in:
parent
eb98c0be99
commit
d0af4f50d3
5 changed files with 71 additions and 3 deletions
|
|
@ -1,11 +1,10 @@
|
|||
/*
|
||||
Testcase to test %pythonprepend and %pythonappend
|
||||
Testcase to test %pythonprepend and %pythonappend %pythoncode %pythonbegin
|
||||
*/
|
||||
|
||||
%module python_append
|
||||
|
||||
%pythoncode %{
|
||||
import os.path
|
||||
mypath = os.path.dirname("/a/b/c/d.txt")
|
||||
funcpath = None
|
||||
staticfuncpath = None
|
||||
|
|
@ -35,6 +34,10 @@ pass
|
|||
pass
|
||||
}
|
||||
|
||||
%pythonbegin %{
|
||||
import os.path
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
|
||||
class Test {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue