Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. /*
  2. test by kyoung chip , jang
  3.  
  4. sudo apt-get install python-dev
  5. sudo apt-get install python3-dev
  6.  
  7. gcc -o p1 p1.c -I/usr/include/python2.7 -lpython2.7
  8.  
  9. */
  10. #include <Python.h>
  11.  
  12. int main( void )
  13. {
  14. Py_Initialize();
  15. PyRun_SimpleString("import sys; sys.path.append('.')");
  16. PyRun_SimpleString("import callme;");
  17. PyRun_SimpleString("print( callme.test(\"test\") ) ");
  18. Py_Finalize();
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement