Date: Tue, 13 Sep 2011 15:51:10 -0400 From: Alejandro Imass <ait@p2ee.org> To: Gary Kline <kline@thought.org> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: *caution* severely OT!! Message-ID: <CAHieY7Tkec9qDUkWe4ZNtq5bnXHPmnf%2BF0hb6-RGEidcGB82cA@mail.gmail.com> In-Reply-To: <20110913193442.GA11369@thought.org> References: <20110913193442.GA11369@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 13, 2011 at 3:34 PM, Gary Kline <kline@thought.org> wrote: > guys, > > can anyone start me on the way of porting a python program to C? > tia, > Porting as in re-write and it will depend on the complexity and perhaps objective/motivation of such rewrite. In any case, you will have to re-write the program in C from scratch using the original program only as reference. If your objective is performance, perhaps it's better analyze the bottle necks of the current program and port only those section to C by means of a shared-object lib. I do this with Perl and XS. I dunno how it's done in Python but I understand it's just as easy. Python and Perl and many of the so-called "scripting languages"are actually byte compiled and have very good performance so it may make more economic sense to go for hybrid solution instead of a full re-write to C. If your objective is having a single executable with a few dependencies, then you could settle for something like Perl PAR but for Python. If your objective is distributing closed-source binaries then you have to re-write to a fully compiled language such as C. Can you shed some light on why you want to do this? --=20 Alejandro > gary > > > -- > =A0Gary Kline =A0kline@thought.org =A0http://www.thought.org =A0Public Se= rvice Unix > =A0 =A0 =A0 =A0 =A0 Journey Toward the Dawn, E-Book: http://www.thought.o= rg > =A0 =A0 =A0 =A0 =A0The 8.51a release of Jottings: http://jottings.thought= .org > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHieY7Tkec9qDUkWe4ZNtq5bnXHPmnf%2BF0hb6-RGEidcGB82cA>