On Sun, 2025-09-21 at 22:44 +0200, Enrico Forestieri wrote: > so that now the stanza reads: > > # Convert this .dtl file back to .dvi format. > dt2dv_call = 'dt2dv -si "%s"' % outfile > dt2dv_stdin = os.popen(dt2dv_call, 'w') > dt2dv_stdin.write(dtl_data) > dt2dv_stdin.close()
This can be changed to: # Convert this .dtl file back to .dvi format. with os.popen(f'dt2dv -si "{outfile}"', 'w') as dt2dv_stdin: dt2dv_stdin.write(dtl_data) This ensures that the file is closed when the write finishes. -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-devel