-2

I'm Working on a program that takes in text from the user and then implements functionalities in the backend, kind of like an interpreter, I have the parser working amazingly in python but some of the backend capabilities I feel would do great on c. I have looked into CPython but I don't seem to understand how to do it if it's even possible at all. I'm just a beginner, if someone could guide that will be very helpful.

1 Answers1

0

CPython is just an implementation of Python in the C programming language. If you want to incorporate C code, you can write extension modules documented here.

Check out this StackOverflow post as well.

Alternatively, write a C program, compile it, and then call it via the subprocess module documented here.

Nold
  • 60
  • 1
  • 7