~ubuntu-branches/ubuntu/precise/moin/precise-updates

« back to all changes in this revision

Viewing changes to MoinMoin/filter/application_msword.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-11-13 16:45:52 UTC
  • mfrom: (0.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20081113164552-49t6zf2t2o5bqigh
Tags: 1.8.0-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop recommendation of python-xml, the packages isn't anymore in
    sys.path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
    Depends on: antiword command from antiword package
6
6
 
7
 
    @copyright: 2006 MoinMoin:ThomasWaldmann
 
7
    @copyright: 2006-2008 MoinMoin:ThomasWaldmann
8
8
    @license: GNU GPL, see COPYING for details.
9
9
"""
10
10
 
 
11
import os
 
12
 
11
13
from MoinMoin.filter import execfilter
12
14
 
13
15
def execute(indexobj, filename):
14
 
    return execfilter("HOME=/tmp antiword '%s'", filename) # no HOME makes antiword complain
 
16
    cmd = "antiword %s"
 
17
    if os.name == 'posix':
 
18
        cmd = "HOME=/tmp " + cmd  # no HOME makes antiword complain (on Linux)
 
19
    return execfilter(cmd, filename)
15
20