title: Cython and Exec()?
body: <p>If I made a python file named <strong>hello.py</strong> that has a script made like this.</p>
  <pre><code>msg = input(&quot;insert your message here: &quot;)
  script = '''
  def say_something():
      print(&quot;{msg}&quot;)
  '''
  
  exec(script)
  say_something()
  </code></pre>
  <p>And then I tried to use Cython</p>
  <pre><code>from distutils.core import setup
  from Cython.Build import cythonize
  
  setup(
      ext_modules=cythonize(&quot;Hello.py&quot;)
  )
  </code></pre>
  <p>It will show an error like this: <code>undeclared name not builtin: say_something</code></p>
  <p>I do understand why this happens but I'm not really an expert with python and C just yet. This is just an example, but it's similar to what I'm trying to do with one of my projects. Is there any way I could resolve this? I want to find a way to convert the script string into C as well.</p>
  <p>I was trying to build an editable python script.</p>