version0.7.10
This commit is contained in:
parent
4d4b3b1c04
commit
36818817bd
14 changed files with 1011 additions and 0 deletions
12
examples/pythonex.nim
Normal file
12
examples/pythonex.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Example to embed Python into your application
|
||||
|
||||
import python
|
||||
|
||||
# IMPORTANT: Python on Windows does not like CR characters, so
|
||||
# we use only \L here.
|
||||
|
||||
Py_Initialize()
|
||||
discard PyRun_SimpleString("from time import time,ctime\L" &
|
||||
"print 'Today is',ctime(time())\L")
|
||||
Py_Finalize()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue