Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def foo(): print("hello world")
- #include "Python.h" // Includes everything to use the Python-C API
- int foo(void); // Declare foo
- int foo(void) { // Name of our function in our DLL
- Py_Initialize(); // Initialise Python
- PyRun_SimpleString("print('hello world')"); // Run the Python commands
- return 0; // Finish execution
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement