Re: New version, Re: Python 'Subprocess' object, "subproc.py"
Jeffrey C. Ollie (jeffo@ins.infonet.net)
Sun, 15 Jan 95 12:06:31 GMT
ken.manheimer@NIST.GOV (Ken Manheimer) wrote:
>I've done something real with the Subprocess object, and come up with
>some fixes and refinements, as well as some another question for any
>unix hackers out there. I've also included an example use of the
>subprocess object, in a 'Ph' object, which implements a convenient
>interface to the CCSO 'ph' address-database-lookup program. The new
>version of the module is attached at the bottom.
>
>(It may be interesting to know how much faster it is using a 'ph'
>subprocess, versus 'os.popen'ing a new process for each ph lookup.
>Testing with 177 names i happen to have handy, the popen version just
>finished, after a run time of 374.9 seconds. The Subprocess() version
>took 74.1 seconds (including process launch time, of course), for
>almost exactly a factor-of-5 speedup. No great surprise - in fact,
>there's a lot of room for speedup in the subprocess communications -
>but at least it makes it significantly more feasible to deal with
>larger data sets. Tests with just 10 names yielded a slightly lower
>factor of 4 - still not too bad...)
I hope that people don't use this ph interface in real code. I've got a
version in native Python that opens TCP connections directly to the
server. The only real limitation right now is that it won't do the
encrypted password authentication - it send passwords in the clear
(bad idea, yes, but implementing the ph hash function will be a pain).
Send me some mail if you're interested.
--
Jeffrey C. Ollie
Iowa Network Services Support Daemon