Jean-Marc Lasgouttes wrote: >>>>>> "Jose'" == Jose' Matos <[EMAIL PROTECTED]> writes: > > Jose'> On Monday 26 April 2004 13:12, Jean-Marc Lasgouttes wrote: >>> legacy_lyxpreview2ppm.py > > Jose'> What does "python -V" says? > > riemann: python -V > Python 2.3.2
Jose, note that mkstemp here is my own wrapper function. I wrote it to allow me to use tempfile.mkstemp in Python 2.3 and tempfile.mktemp in earlier versions. I may well have got the tempfile.mkstemp API wrong as I'm using Python 2.2. tmp, tmp_name = mkstemp() success = 0 for line in open(latex_file, 'r').readlines(): match = use_preview_re.match(line) if match == None: tmp.write(line) continue -- Angus