adityarathod / pyandoc

Python wrapper for Pandoc—the universal document converter.
https://pypi.python.org/pypi/pyandoc/
MIT License
213 stars 32 forks source link

Use shutil.which or find_executable to find path to PANDOC #11

Closed MartinMartimeo closed 8 years ago

MartinMartimeo commented 10 years ago

Just calling pandoc does not work on all systems and a more preferred way is in finding the executable by python methods. This will try to find the pandoc executable it via the shutil lib or the distutil lib.

bmcorser commented 10 years ago

Oh, this is actually cooler than my PR, I was even doing

import subprocess
pandoc.core.PANDOC_PATH = subprocess.check_output(['which', 'pandoc']).strip()

TIL shutil.which

wkentaro commented 9 years ago

+1

kennethreitz commented 8 years ago

:sparkles: :cake: :sparkles:

bmcorser commented 8 years ago

A blast from the past!