Skip to content

C++ Static Class that opens a python file, runs it, and returns the output

Notifications You must be signed in to change notification settings

UtilityNotes/python_handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Handler

C++ Static Class that opens a python file, runs it, and returns the output

Features

  • Can run any python file with a main() method
  • Can have any number of char* arguments for the main() method
  • The C++ recieves a PyObject* return value

Features being added soon

  • Send arguments to a main() method that needs arguments
  • Get access to the underlying C++'s API
  • Create a better way to access the C++'s API, probably a method in PythonHandler

Usage

  • You need to have python installed.
  • The Makefile isn't really universal, just made for one guy's computer

Linux

If using Python 3, run $ python3-config --cflags in the terminal and use that output in the Makefile's CXXFLAGS. Then run $ python3-config --ldflags in the terminal and use that output in the Makefile's LDFLAGS.

About

C++ Static Class that opens a python file, runs it, and returns the output

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published