title: How to run c code within python
body: <p>How can I run c/c++ code within python in the form:</p>
  
  <pre><code>def run_c_code(code):
      #Do something to run the code
  code = """
         Arbitrary code
         """
  run_c_code(code)
  </code></pre>
  
  <p>It would be great if someone could provide an easy solution which does not involve installing packages. I know that C is not a scripting language but it would be great if it could do a 'mini'-compile that is able to run the code into the console. The code should run as it would compiled normally but this needs to be able to work on the fly as the rest of the code runs it and if possible, run as fast as normal and be able to create and edit variables so that python can use it. If necessary, the code can be pre-compiled into the <code>code = """something"""</code>.</p>
  
  <p>Sorry for all the requirements but if you can make the c code run in python then that would be great. Thanks in advance for all the answers..</p>