Invoke kpsewhich command with an argument `filename`.
(filename)
| 201 | |
| 202 | |
| 203 | def kpsewhich(filename): |
| 204 | """Invoke kpsewhich command with an argument `filename`.""" |
| 205 | try: |
| 206 | find_cmd("kpsewhich") |
| 207 | proc = subprocess.Popen( |
| 208 | ["kpsewhich", filename], |
| 209 | stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 210 | (stdout, stderr) = proc.communicate() |
| 211 | return stdout.strip().decode('utf8', 'replace') |
| 212 | except FindCmdError: |
| 213 | pass |
| 214 | |
| 215 | |
| 216 | def genelatex(body, wrap): |