From owner-freebsd-questions@FreeBSD.ORG Tue Sep 13 19:51:11 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09A54106566C for ; Tue, 13 Sep 2011 19:51:11 +0000 (UTC) (envelope-from aimass@yabarana.com) Received: from mail-gx0-f177.google.com (mail-gx0-f177.google.com [209.85.161.177]) by mx1.freebsd.org (Postfix) with ESMTP id C62B98FC13 for ; Tue, 13 Sep 2011 19:51:10 +0000 (UTC) Received: by gxk23 with SMTP id 23so1302604gxk.36 for ; Tue, 13 Sep 2011 12:51:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.20.159 with SMTP id f31mr9659606ibb.26.1315943470064; Tue, 13 Sep 2011 12:51:10 -0700 (PDT) Sender: aimass@yabarana.com Received: by 10.231.33.10 with HTTP; Tue, 13 Sep 2011 12:51:10 -0700 (PDT) In-Reply-To: <20110913193442.GA11369@thought.org> References: <20110913193442.GA11369@thought.org> Date: Tue, 13 Sep 2011 15:51:10 -0400 X-Google-Sender-Auth: yiUAVb3yIh2D-EeNzlgdGDp-hZY Message-ID: From: Alejandro Imass To: Gary Kline Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Mailing List Subject: Re: *caution* severely OT!! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2011 19:51:11 -0000 On Tue, Sep 13, 2011 at 3:34 PM, Gary Kline 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" >