equal
deleted
inserted
replaced
318 self.htmltag, |
318 self.htmltag, |
319 self.head.getvalue(), |
319 self.head.getvalue(), |
320 self.body.getvalue()) |
320 self.body.getvalue()) |
321 |
321 |
322 |
322 |
|
323 def can_do_pdf_conversion(__answer=[None]): |
|
324 """pdf conversion depends on |
|
325 * pyxmltrf (python package) |
|
326 * fop 0.9x |
|
327 """ |
|
328 if __answer[0] is not None: |
|
329 return __answer[0] |
|
330 try: |
|
331 import pyxmltrf |
|
332 except ImportError: |
|
333 __answer[0] = False |
|
334 return False |
|
335 from subprocess import Popen, STDOUT |
|
336 import os |
|
337 try: |
|
338 Popen(['/usr/bin/fop', '-q'], |
|
339 stdout=open(os.devnull, 'w'), |
|
340 stderr=STDOUT) |
|
341 except OSError, e: |
|
342 print e |
|
343 __answer[0] = False |
|
344 return False |
|
345 __answer[0] = True |
|
346 return True |