docs for extra params? co = zlib.compressobj(2, 8, -12, 9, 1)

Bengt Richter bokr at accessone.com
Wed May 30 13:53:33 EDT 2001


This line appears in test_zlib.py:

	co = zlib.compressobj(2, 8, -12, 9, 1)

A few others also:

  	  zlib.compressobj(1, 8, 0)
	co = zlib.compressobj(8, 8, -15)

The only call I see documented in

	<YPathMV>Python21/Doc/lib/module-zlib.html

is

	compressobj([level]) 

Of course, there are a lot of strings with 'compress'
to disambiguate visually and method-vs-function'ly,
so I may have missed it ;-)

__________________________________________________________

BTW, a tip for NT newbies who may be trying to capture the stdout
output of a script interpreter on NT in a console ("DOS" ;-) window
(this is true for perl as well as python -- it's a windows shell
problem):

You have to invoke the interpreter explicitly. I.e., 
	myScript.py > output_file

doesn't work. '.py' is recognized (assuming you have the
association set up, of course) and python is executed, but
the shell mechanism that runs the interpreter does not
do it in such a way that its output is captured by '>'

	python myScript.py > output_file

_does_ work, and if you wrap your script in a ".cmd" it will
work. Note what happens: (Y*MV == Your * May Vary ;-)

YPMV>type myCmd.py
#myCmd.py
import sys
print "This is from myCmd.py"
for i in range(len(sys.argv)):
        print i,':', sys.argv[i]

YPMV>myCmd.py one two > myCmd.py.out

YPMV>type myCmd.py.out

YPMV>dir  myCmd.py.out
 Volume in drive <YDriveMV> is <YDriveNameMV>
 Volume Serial Number is <YSNMV>

 Directory of <YDirMV>

 <YDateMV>                      0 myCmd.py.out
               1 File(s)              0 bytes
                             <YFBMV> bytes free

YPMV>type myCmd.cmd
@REM myCmd.cmd wrapper for myCmd.py
@python myCmd.py %*

YPMV>myCmd.cmd one two > myCmd.cmd.out

YPMV>type myCmd.cmd.out
This is from myCmd.py
0 : myCmd.py
1 : one
2 : two

Someone worked out an extreme (naturally?) perl workaround
for this, but I didn't set it up, and forgot where it went.
I am not going to <YDirectionMV>grade from NT4 just for a
fix for that, even if they fix it. (Did they, yet?)
______________________________________________

Re zlib-type things again:
Is there a module giving access to standard FAX-type
compression of monochrome graphics with bitmapped fonts?
Or FAX in general, for that matter? Are the fax algorithms
patented (i.e., is there a .gif-type situation)?

The only "fax" in the entire doc tree is
*** FILE acks.html ***
    <td>Lele Gaifax</td>



More information about the Python-list mailing list