On Sat, Jun 2, 2012 at 12:10 AM, Sriram Karra <karra....@gmail.com> wrote:
> On Fri, Jun 1, 2012 at 6:44 PM, Vishal <vsapr...@gmail.com> wrote: > > > > > > > a) "test.py" a very simple 1KB python file with a main function > > > b) "_c_test.c" a 35KB file that is generated by 2c-py > > > > > > (b) gets generated by the following cmd line: > > > > > > > 2c-py -c test.py > > > > > > As you can see the 'c' file generated references python's internals. > > > What I am looking for is something that would either create a > functional > > > equivalent in C or the ASM for the target microcontroller. > > > > OK; I understand. I wonder what the real point of 2c.py is. You start with > a python source file, and end up creating a dll/so that can be imported as > a python module in another python program? Obfuscation, I suppose. But a > misleading name for a project, if there ever was one... Hm. Anyway, > apologies for wasting your time. > > -Karra > _______________________________________________ > > Hi, I think the main point of doing a Python-to-C conversion followed by creation of a dll which is re-imported into Python is performance. Obfuscation is a by-product of this process. But if code-protection is more paramount...it can be the considered the other way round too :)). Anyways, if you have not looked, (and I hope you have) at Cython ( www.cython.org), I would urge you to take a look. Cython shines at doing all of this and more in the most convenient way. Time well spent is time enjoyed, and I enjoyed learning about 2c-py. Thanks :)) Best regards, Vishal Sapre --- Please DONT print this email, unless you really need to. Save Energy & Paper. Save the Earth. _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers