Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ubuntu terminal directory



On 03/28/2010 02:45 PM, Derek Martin wrote:
> On Thu, Mar 25, 2010 at 08:15:51PM -0400, Kent Borg wrote:
>  =20
>> Derek Martin wrote:
>>    =20
>>> And my terminal window title bar says:
>>>
>>>   demartin at myhost Python
>>>      =20
>> I admire your choice of example directory.
>>
>> -kb, the Kent who has become a serious Python fan of late.
>>    =20
> =20
> Well, thanks.  I'm a big Python fan too.  Sadly most of the code I get
> to write must be in Perl... I much prefer Python.
>
>  =20
I've also become a Python fan. My company's code is written almost
entirely in C++ (over 1,000,000 lines of code) and it does its job, but
we have ways for customers to write their own extensions. One is in C++,
another is in Summit BasicScript(tm), and Python in a limited fashion.
Right now Python can only read attributes from our structures and return
pricing values and settlement cashlows. In our product, the C++
extension creates a shared object, so the program must exit and be
restarted since the shared object libraries are read at startup. With
Python as well as our version of BasicScript you can make a code change
and test directly. I'm thinking of writing the update code (in C++) so
that we can update attributes. We had some code on the BLU server to
generate html passwords from Mailman. The initial Perl version ran very,
very slow, so I rewrote it in C++, much faster, but I still had to call
a mailman function to dump a pickle database, and then parse the
results. Much faster than Perl, but since I was dabbling in Python and
mailman is written in Python I would be able to call the appropriate
mailman functions to get the information I needed. Furthermore the html
password file is maintained on a different server. With Python I was
able not only to read the mailman data directly without spawning a
process and creating a pipe, I was able to write the password files on
the other server at the same time (I could have done this in the C++
code though). The Python version runs in about 10 seconds, the C++
version in about 30 seconds without copying to the other server, and the
Perl took an hour. But, while Python executables are pretty quick, the
win here was because of the tight binding to mailman rather than having
to spawn a process perlist to dump and parse the database. I also find
that Python files are more readable than Perl, bash or Cshell scripts.

--=20
Jerry Feldman <gaf-mNDKBlG2WHs at public.gmane.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846








BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org