Mailing List Archive

Thanks for Python...
Dearn Python Developers,

I must say how thankful I am for Python. It has saved me at work once so
far. I am working on a program to poll data from a server, but I don't have
the actual server. I was fortunate enough to get sample data files from the
server and fairly decent specification. So, I embarked on my mission to
write a mach-server that emulated the real server. I was successful at
writing one in Perl until today when I found out that the data I was sending
to it was not the right data. I was having a difficult time parsing the data
in Perl (not too familiar with the regular expressions & perl syntax seems
to be a bit buggy to me).

Well, this weekend I happened to decide to learn Python because I know C++,
Java, Visual Basic and a few other minor languages (or so called languages
like HTML & SQL). I needed to know a good scripting language for UNIX
Administration and simple utilities that I like to maintain my computers.
Python looked like an excellent candidate because of it's object oriented
features and it also appeard to be quite simple, which has turned out to be
the case.

This afternoon, at work (in about a 20 minute time period) I rewrote the
mach server that I had originally written in Perl and it works much nicer
and more reliably than the Perl version which I was using before. The server
works quite nicely and was surprisingly written in a few less lines than the
Perl server was written in. I hope that my boss is impressed.

Sincerely,

John Brainard



--------== Posted Anonymously via Newsfeeds.Com ==-------
Featuring the worlds only Anonymous Usenet Server
-----------== http://www.newsfeeds.com ==----------
Thanks for Python... [ In reply to ]
In article <376ead64@anonymous.newsfeeds.com>,

John Brainard posting anonymously as nobody@newsfeeds.com says...

>write a mach-server that emulated the real server. I was successful at

>mach server that I had originally written in Perl and it works much

and >I hope that my boss is impressed.

To impress your boss more, use 'mock' (imitation) instead of 'mach'
(speed number) when you write your report.

TJR (With a real email address, I would have sent this privately.)
Thanks for Python... [ In reply to ]
Terry Reedy <tjreedy@udel.edu> wrote in message
news:7knb7p$kas$2@news.udel.edu...
> In article <376ead64@anonymous.newsfeeds.com>,
>
> John Brainard posting anonymously as nobody@newsfeeds.com says...
>
> >write a mach-server that emulated the real server. I was successful at
>
> >mach server that I had originally written in Perl and it works much
>
> and >I hope that my boss is impressed.
>
> To impress your boss more, use 'mock' (imitation) instead of 'mach'
> (speed number) when you write your report.
>
> TJR (With a real email address, I would have sent this privately.)

I apologise for posting anonymously to this group. I had no idea that
newsfeeds would hide my e-mail address when I posted. I have nothing to hide
from this news group, or any other that I read from and will change my sig
file to include that and my icq number.

As for the misspelling, I am truly embarassed by it. I am normally quite
about checking it.



--------== Posted Anonymously via Newsfeeds.Com ==-------
Featuring the worlds only Anonymous Usenet Server
-----------== http://www.newsfeeds.com ==----------
Thanks for Python... [ In reply to ]
Welcome to the Python community, John. Yes, Python is a truly
wonderful language for cranking out quick prototypes or test jigs.
I prototyped a complete web-based general ledger system in Python,
figuring I'd downcode it to C for speed later, but so far I haven't needed
to. Python is also just plain fun... Now if I could just get time to port
it to the PalmPilot, I'd never be away from it.

-Jeff Rush



On Mon, 21 Jun 1999 21:30:44, Anonymous <nobody@newsfeeds.com> wrote:

> Dear Python Developers,
>
> I must say how thankful I am for Python. It has saved me at work once so
> far.

<snip>

> This afternoon, at work (in about a 20 minute time period) I rewrote the
> mach server that I had originally written in Perl and it works much nicer
> and more reliably than the Perl version which I was using before. The server
> works quite nicely and was surprisingly written in a few less lines than the
> Perl server was written in. I hope that my boss is impressed.
>
> Sincerely,
> John Brainard
Thanks for Python... [ In reply to ]
Jeff Rush (jrush@summit-research.com) wrote:
: Python is also just plain fun... Now if I could just get time to port
: it to the PalmPilot, I'd never be away from it.

Do a web search for "uclinux". It's a Linux kernel being worked on
at Ryerson University somewhere in Canada. I don't know how stable
or developed it is, but it might run Python.

I'd like to see somebody take the old HP100LX palmtop design, pop out
the ROM, and put in a Python interpreter (and PIM stuff written in
Python) in its place. That would be cool.
--
- - - - - - - - - - - - - - - - - - - - - - - -
Resistance is futile. Capacitance is efficacious.
Will Ware email: wware @ world.std.com
Thanks for Python... [ In reply to ]
Jeff Rush wrote:
>
> Welcome to the Python community, John. Yes, Python is a truly
> wonderful language for cranking out quick prototypes or test jigs.
> I prototyped a complete web-based general ledger system in Python,
> figuring I'd downcode it to C for speed later, but so far I haven't needed
> to. Python is also just plain fun... Now if I could just get time to port
> it to the PalmPilot, I'd never be away from it.
>
> -Jeff Rush

Get a Windows CE Palm-sized PC if you want to take Python with you whereever you
go. Python runs stunningly well on my Casio E-100, and has nifty GUI
libraries. It's not polished by any sense of the word but it works, and the
source is a barely changed version of the standard windows Python. This makes
for easy improvement.

see:
http://starship.python.net/crew/mhammond/ce/

It sure is nifty to be coding during my commute :-)

Enjoy!
Mordy

--
o Mordy Ovits
o Cryptographic Engineer
o LockStar Inc.
---------------------------------------------------------------------------
#!/usr/local/bin/python
from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1)))
Thanks for Python... [ In reply to ]
Mordy Ovits writes:

> It sure is nifty to be coding during my commute :-)

More than a bit offtopic, but you can program in Forth if you use
free Quartus here http://www.interlog.com/~nbridges/quartus.html
After I downloaded a debug ROM image from 3com I was able to run it
on http://xcopilot.cuspy.com/ under Linux very nicely.

*Is* there a Python for the PalmPilot out there? 'cause I would be
buying one if there was. I've got a Garmin 25 OEM GPS board I'd like
to put to some use...

-- Eugene

P.S. Our headers seem to be screwed. python-list@python.org doesn't
appear in Reply-to.
Thanks for Python... [ In reply to ]
On 23 Jun 1999 13:06:49 PDT, Mordy Ovits wrote:
>Jeff Rush wrote:

>> Welcome to the Python community, John. Yes, Python is a truly
>> wonderful language for cranking out quick prototypes or test jigs.
>> I prototyped a complete web-based general ledger system in Python,
>> figuring I'd downcode it to C for speed later, but so far I haven't needed
>> to. Python is also just plain fun... Now if I could just get time to port
>> it to the PalmPilot, I'd never be away from it.

>Get a Windows CE Palm-sized PC if you want to take Python with you whereever you
>go. Python runs stunningly well on my Casio E-100, and has nifty GUI
>libraries. It's not polished by any sense of the word but it works, and the
>source is a barely changed version of the standard windows Python. This makes
>for easy improvement.

Sure, but we've got Pilots, so that's not an open option. Fortunately,
the Pilot has Quartus Forth available for it -- it's not Python, but
honestly, Forth fits the limitations of the device better.

I used Quartus on my Crypto exam to solve a modular equation after I
forgot how to solve modular equations (I had it use brute force).

I'd still like to have Python, but dang, Quartus is good at what it does.
Python and Forth -- for two different reasons, pretty much my favorite
languages.

>o Mordy Ovits
>o Cryptographic Engineer
>o LockStar Inc.

>#!/usr/local/bin/python
>from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
>'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
>while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
>lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1)))

You know, the first time I saw this it was in ESR's .sig, and I tried to
remember how long the Perl version had been. A few minutes of searching
revealed that it was three lines long -- but also revealed that it was
using bc rather than Perl to do most of the work! I spent about half an
hour searching for the real Perl version, only to find that it was five
lines long.

The Python for this .sig is shorter than the Perl! Cool, eh?

--
-William "Billy" Tanksley
Utinam logica falsa tuam philosophiam totam suffodiant!
:-: May faulty logic undermine your entire philosophy!
Thanks for Python... [ In reply to ]
Jeff Rush wrote:

> ... Now if I could just get time to port
> it to the PalmPilot, I'd never be away from it.

Sounds like a job for Itsy, if Compaq ever decides to release it as a
consumer product.

http://www.research.digital.com/wrl/itsy/

Runs under Linux with GNU tools on the StrongARM SA-1100 with 16MB of
DRAM (expandable), onboard USB, etc.

They're already fooling around Java and Squeak versions.

In fact, it appears generally rather Pythonic in design. :)
Thanks for Python... [ In reply to ]
In article <14193.16609.554364.194800@lrz.de>, Eugene Leitl wrote:
[snip]
>
>*Is* there a Python for the PalmPilot out there? 'cause I would be
>buying one if there was. I've got a Garmin 25 OEM GPS board I'd like
>to put to some use...
>
>-- Eugene
>

I suspect there won't be one running native ... the memory model of the Palm
is sufficiently restrictive that it may be fundamentally incompatible with
the Python memory model. On the other hand, I'd love to be proven wrong.

That said, you can write all the host-side components to your Palm app
in Python:
http://www.concentric.net/~n9mtb/cq/pyrite/pyrite.html

+Mitchell


--
Mitchell Morris

Microsoft via the genius of Bill Gates invented the mouse-windows user
interface, reliable operating systems, affordable computing, and the Internet;
if you don't think all that is true, ask someone who has never used a computer
and whose only exposure to the industry is through mass media.
-- Philip Greenspun
Thanks for Python... [ In reply to ]
On Wed, 23 Jun 1999 20:24:59 GMT, wtanksle@dolphin.openprojects.net wrote:
> >#!/usr/local/bin/python
> >from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
> >'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
> >while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
> >lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1)))
>
> You know, the first time I saw this it was in ESR's .sig, and I tried to
> remember how long the Perl version had been. A few minutes of searching
> revealed that it was three lines long -- but also revealed that it was
> using bc rather than Perl to do most of the work! I spent about half an
> hour searching for the real Perl version, only to find that it was five
> lines long.
>
> The Python for this .sig is shorter than the Perl! Cool, eh?

It doesn't run for me... What's it supposed to do? When I run it, I get:

Traceback (innermost last):
File "/tmp/foo", line 2, in ?
from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda
x:x[:1]!=
ValueError: unpack list of wrong size

--
John Klassa / Alcatel USA / Raleigh, NC, USA
Thanks for Python... [ In reply to ]
William Tanksley wrote:
> Sure, but we've got Pilots, so that's not an open option. Fortunately,
> the Pilot has Quartus Forth available for it -- it's not Python, but
> honestly, Forth fits the limitations of the device better.

I had a Pilot for a year before I realized that it wasn;t what I needed. It's a
glorified organizer, when what I wanted was a pocket computer. So I shelled out
for the E-100 and I've never looked back. The difference is light years, not
miles.

> I used Quartus on my Crypto exam to solve a modular equation after I
> forgot how to solve modular equations (I had it use brute force).

Wow! I wish I had had my E100 when I was in college. I just realized how
awesome that would have been. :-)

> I'd still like to have Python, but dang, Quartus is good at what it does.
> Python and Forth -- for two different reasons, pretty much my favorite
> languages.

Best tool for the job wins. Agreed.

> >o Mordy Ovits
> >o Cryptographic Engineer
> >o LockStar Inc.
>
> >#!/usr/local/bin/python
> >from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
> >'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
> >while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
> >lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1)))
>
> You know, the first time I saw this it was in ESR's .sig, and I tried to
> remember how long the Perl version had been. A few minutes of searching
> revealed that it was three lines long -- but also revealed that it was
> using bc rather than Perl to do most of the work! I spent about half an
> hour searching for the real Perl version, only to find that it was five
> lines long.
>
> The Python for this .sig is shorter than the Perl! Cool, eh?

The SECOND time I saw that sig was in ESR's mail. The first was mine. I doubt
ESR copied mine, but who knows? :-)
Actually there IS a 3 line PERL version, but it does use dc for the heavy
lifting. I consider that cheating.

Python *is* my favorite language,
Mordy


--
o Mordy Ovits
o Cryptographic Engineer
o LockStar Inc.
---------------------------------------------------------------------------
#!/usr/local/bin/python
from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1)))
Thanks for Python... [ In reply to ]
John Klassa writes:
>It doesn't run for me... What's it supposed to do? When I run it, I get:

See http://starship.python.net/crew/amk/writing/crypto-curiosa.html
for an explanation.

--
A.M. Kuchling http://starship.python.net/crew/amk/
Once you accept that the world is a giant computer run by white mice, all
other movies fade into insignificance.
-- Mutsumi Takahashi, on _The Hitch-hiker's Guide to the Galaxy_
Thanks for Python... [ In reply to ]
Andrew M. Kuchling wrote:

> Once you accept that the world is a giant computer run by white mice, all
> other movies fade into insignificance.
> -- Mutsumi Takahashi, on _The Hitch-hiker's Guide to the Galaxy_

Should this be taken as a rebuttal of "Matrix" ?

BB
Thanks for Python... [ In reply to ]
In article <37726458.C8CC9623@zipzap.ch>,
Boris Borcic <zorro@zipzap.ch> wrote:
>Andrew M. Kuchling wrote:
>>
>> Once you accept that the world is a giant computer run by white mice, all
>> other movies fade into insignificance.
>> -- Mutsumi Takahashi, on _The Hitch-hiker's Guide to the Galaxy_
>
>Should this be taken as a rebuttal of "Matrix" ?

_THHGttG_ was written so long before _Matrix_ that if anything it's the
other way 'round.
--
--- Aahz (@netcom.com)

Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het

Javascript: The 90s incarnation of the Commodore 64 Sprite -- SJM
Thanks for Python... [ In reply to ]
Aahz Maruch <aahz@netcom.com> said, concerning Boris Borcic <zorro@zipzap.ch>'s
suggestion that _THHGttG_ (quoted by
Andrew Kuchling) was a rebuttal to the _Matrix_:

> _THHGttG_ was written so long before _Matrix_ that if anything
> it's the other way 'round.

But if the world is a giant computer run by white mice as
Hitchhiker's says, then wouldn't there be time travel? From a
rough memory, the Guide lifted text from a ceral company then
went back in time and sued the company for copyright infringement.

So after The Matrix came out, the mice went back in time and
had (pursuaded, brainwashed, induced, etc.) Douglas Adams to
write the book then got it turned into a movie.

Oh, you think time goes *that* way -- Mostly Harmless (paraphrased)

Andrew Dalke
dalke@acm.org
Thanks for Python... [ In reply to ]
On 24 Jun 1999 07:55:38 PDT, Mordy Ovits wrote:
>William Tanksley wrote:
>> Sure, but we've got Pilots, so that's not an open option. Fortunately,
>> the Pilot has Quartus Forth available for it -- it's not Python, but
>> honestly, Forth fits the limitations of the device better.

>I had a Pilot for a year before I realized that it wasn;t what I needed. It's a
>glorified organizer, when what I wanted was a pocket computer. So I shelled out
>for the E-100 and I've never looked back. The difference is light years, not
>miles.

I have a certain amount of leeriness about posting advocacy on unrelated
NGs, so I'll limit myself to saying that the difference is years, not
miles. The two machines work differently: one is a glorified organizer,
the other is a pocket computer. Both of them can fool you into thinking
they're something else, because they're both powerful.

I need a personal organizer.

>> I used Quartus on my Crypto exam to solve a modular equation after I
>> forgot how to solve modular equations (I had it use brute force).

>Wow! I wish I had had my E100 when I was in college. I just realized how
>awesome that would have been. :-)

Oh yeah.

Actually, I sometimes miss my old OmniGo, which was a pocket computer, in
spite of being slower than the Pilot for some tasks. I really needed the
glorified organizer (and had been fooled into thinking that the OmniGo was
one), but the OmniGo had some abilties that the Pilot doesn't.

>The SECOND time I saw that sig was in ESR's mail. The first was mine. I doubt
>ESR copied mine, but who knows? :-)

You mean you wrote it? If so, there seems to have crept into it a bug --
one of the implicit unpackings don't work.

>Actually there IS a 3 line PERL version, but it does use dc for the heavy
>lifting. I consider that cheating.

That's what I said -- the first one I found was written in Perl, but used
bc.

>Python *is* my favorite language,

I'd generally agree, although I like Forth a lot too.

>Mordy

--
-William "Billy" Tanksley
Utinam logica falsa tuam philosophiam totam suffodiant!
:-: May faulty logic undermine your entire philosophy!