On Sun, Nov 6, 2011 at 7:11 AM, Travis Parks <jehugalea...@gmail.com> wrote: > Finally, I wanted to ask whether anyone has tried having Django call > out to Python 3 routines. I am okay using Python 2.7 in Django, if I > can have the controllers call business logic implemented in Python 3, > accepting POPOs from the data layer.
What you're going to have is completely separate processes; either invoking Python3 and having it terminate after one action, or keeping it running concurrently and passing data between them. Has anyone ever extended AND embedded Python at the same time? Written a Python module that ... executes Python code? Might be a bit tricky, but possibly isolating the Py2 and Py3 code into different C source files would help conserve programmer sanity (at the possible cost of performance). Would be a tricky thing to juggle, but if you can pull it off, you'd be able to - effectively - have a module in Django that's written in Python 3, and directly callable. Propagating parameters and return values would be a matter of unpacking them into C objects and repacking them on the other side. Propagating exceptions would be.... fun? ChrisA -- http://mail.python.org/mailman/listinfo/python-list