Scrolling fields (was: RE: Desperate plea to FP Tech...)
Bill Campbell
bill at celestial.com
Fri Jan 20 13:37:24 PST 2006
On Fri, Jan 20, 2006, Fairlight wrote:
>Confusious (Bill Campbell) say:
>>
>> Now I'm doing it using the curses modules of python with a postgresql back
>> end database.
>
>Not perl's Curses module?! *gasps in horror* :) So did you defect from
>perl officially, or are you just using both as fits the need better? You
>were better than I in perl last I checked.
I'm doing pretty much everything in python now (and have to retrain my
fingers when working with perl as I am today, hacking an ISP's automated
user maintenance perl scripts to make XML-RPC calls to an xmlrpcserver I
wrote on the machine that does extended user maintenance, updating two
openldap servers, and some mysql for jive_messenger).
I find the object oriented functionallity of python much easier to deal
with than that of perl (e.g. it's trivial to define classes in the code
then use them immediately without going through perl's package syntax which
I find cumbersome at times).
Perl has lots of ``magic'' things that, while somebody like Damian Conway
can use for wonderous things, are certainly not intuitive. Python's syntax
is basically simple, and avoids some of the long-standing traps inherent in
perl (and C). For example, python doesn't permit replacement in
conditionals avoiding the confusion and syntax errors in expressions where
one might want to test for equality, not do an assignment.
This is legal:
if (i == 1) ...
This isn't:
if (i = 1)
A Python Purist(tm) would probably gag looking at my code since I
use curly braces in comments to aid in navigating with vi(m):
for user in users: #{
# do something here
#}
Of course I've been doing similar things when working with shell scripts to
make it easier for me to organize if...fi, case...esac, and similar
constructs.
>It -is- amazing how python is spreading--especially Stackless. I know at
>least 2 games written in it: EVE Online, and I believe Civilization 4.
>And somehow they still interface with DirectX as well! When I heard python
>before, I -never- would have thought of games before playing these.
The entire Mailman mailing list manager is written in python as is Zope and
Plone (which is what got me looking at in the first place).
>Almost makes me want to at least peek at it, but I have so much invested in
>perl already, and I have yet to run into something I couldn't do in it.
>And I'm -still- learning it, and will likely be forever. But I prefer
>sticking to one main development language.
That sounds much like me in the not to distant past. I imagine that if one
did a google search, "bill at celesial.com+python", one could find me making
some fairly deprecating comments (not as bad as Eric Raymond's ``steaming
pile of dinosaur dung'' comment in his article telling why he is now using
python :-).
It took me a while to create a python library to do the same things I've
done in perl, but I think that the end result is worth it.
Remember the perl motto ``there's more than one way to do it'' (which
applies to database solutions as well).
Bill
--
INTERNET: bill at Celestial.COM Bill Campbell; Celestial Systems, Inc.
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
``But how is this legal plunder to be identified? Quite simply. See if the
law takes from some persons what belongs to them, and gives it to other
persons to whom it does not belong. See if the law benefits one citizen at
the expense of another by doing what the citizen himself cannot do without
committing a crime.'' -- Frederic Bastiat, The Law
More information about the Filepro-list
mailing list