No subject

Fri Jul 1 16:25:02 CEST 2005

#! rnews 1689
Newsgroups: comp.lang.python
From: Harry George < at>
Subject: Re: Python for everything?
Content-Type: text/plain; charset=us-ascii
Message-ID: <xqx8y0qehvz.fsf at>
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4
Lines: 29
Sender: hgg9140 at
Organization: The Boeing Company
References: <1120164834.057669.297840 at> <Pine.LNX.4.62.0507011320460.24395 at>
Mime-Version: 1.0
Date: Fri, 1 Jul 2005 14:10:56 GMT
Xref: comp.lang.python:384366

Tom Anderson <twic at> writes:

> On Thu, 30 Jun 2005 xeys_00 at wrote:
> > can Python "do it all"?
> The other is in bit-twiddling - anything that involves
> mucking about with data at the level of bits and bytes. Maybe this is
> just blind prejudice, but i'm never as comfortable hacking on that
> sort of stuff (writing a Huffman coder, say) in python as in java.

Maybe we should distinguish:

1. Can you do it at all?  Yes, via the struct package and via the bit
   operators.  And, the bit operators support the same idioms we all
   know and love from C.

2. Can it be done "fast enough"?  Maybe.  I wrote a Morse code
   generator based on algorithms from a C program, which generated pcm
   files.  The initial cut was way too slow.  Then I did some caching
   and got it fast enough to use.  Still not C speeds, but fast enough
   for the task.  But if you are doing encryptions (where even C is
   giving way to hardware), then Python is not the answer.

-- at
6-6M21 BCA CompArch Design Engineering
Phone: (425) 294-4718

More information about the Python-list mailing list