Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. def foo(): print("hello world")
  2.  
  3. #include "Python.h" // Includes everything to use the Python-C API
  4.  
  5. int foo(void); // Declare foo
  6.  
  7. int foo(void) { // Name of our function in our DLL
  8.  
  9. Py_Initialize(); // Initialise Python
  10.  
  11. PyRun_SimpleString("print('hello world')"); // Run the Python commands
  12.  
  13. return 0; // Finish execution
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement