~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to dotgraph.py

  • Committer: Aaron Bentley
  • Date: 2008-01-23 23:09:27 UTC
  • Revision ID: aaron@aaronbentley.com-20080123230927-7wtn8mvyyuhs5gq3
Remove unneeded imports from dotgraph

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
17
 
18
18
from subprocess import Popen, PIPE
19
 
from urllib import urlencode
20
 
from xml.sax.saxutils import escape
21
19
import os.path
22
20
import errno
23
21
import tempfile
24
22
import shutil
25
 
import time
26
23
 
27
24
RSVG_OUTPUT_TYPES = ('png', 'jpg')
28
 
DOT_OUTPUT_TYPES = ('svg', 'svgz', 'gif', 'jpg', 'ps', 'fig', 'mif', 'png', 
 
25
DOT_OUTPUT_TYPES = ('svg', 'svgz', 'gif', 'jpg', 'ps', 'fig', 'mif', 'png',
29
26
                    'cmapx')
30
27
 
31
28
class NoDot(Exception):
198
195
        shutil.rmtree(tempdir)
199
196
    return status
200
197
 
201
 
def invoke_dot(input, out_file=None, file_type='svg', antialias=None, 
 
198
def invoke_dot(input, out_file=None, file_type='svg', antialias=None,
202
199
               fontname="Helvetica", fontsize=11):
203
 
    cmdline = ['dot', '-T%s' % file_type, '-Nfontname=%s' % fontname, 
 
200
    cmdline = ['dot', '-T%s' % file_type, '-Nfontname=%s' % fontname,
204
201
               '-Efontname=%s' % fontname, '-Nfontsize=%d' % fontsize,
205
202
               '-Efontsize=%d' % fontsize]
206
203
    if out_file is not None: