mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
13 lines
306 B
Nim
Executable File
13 lines
306 B
Nim
Executable File
# 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()
|
|
|