fix race condition by Michael J Gruber
[PyX/mjg.git] / contrib / dvitype.py
blobb11f575266a6fafbe3069607f1262f69c8c82cd3
1 #!/usr/bin/env python
2 # -*- coding: ISO-8859-1 -*-
5 # Copyright (C) 2005 André Wobst <wobsta@users.sourceforge.net>
7 # epstopng is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # epstopng is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with epstopng; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 from optparse import OptionParser
22 from pyx import dvifile, version
24 parser = OptionParser(usage="usage: %prog dvi-file",
25 version="%prog " + version.version)
26 (options, args) = parser.parse_args()
27 if len(args) != 1:
28 parser.error("can process a single dvi-file only")
30 df = dvifile.dvifile(args[0], dvifile.readfontmap(["psfonts.map"]), 1)
31 while df.readpage():
32 pass