Created
July 15, 2017 21:45
-
-
Save anonymous/604aa4fa4ef7f39cd50cefaf8eaccea3 to your computer and use it in GitHub Desktop.
Python bindings for Crystal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@[Link("python3")] | |
lib Python3 | |
fun exit = Py_Exit(status : Int32) : Void | |
fun snprintf = PyOS_snprintf(str : UInt8*, size : LibC::SizeT, format : UInt8*, ...) : Int32 | |
end | |
msg = "hi python\n" | |
Python3.snprintf(msg, msg.size, "") | |
Python3.exit(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment