Invoke kpsewhich command with an argument `filename`.
(filename)
| 164 | |
| 165 | |
| 166 | def kpsewhich(filename): |
| 167 | """Invoke kpsewhich command with an argument `filename`.""" |
| 168 | try: |
| 169 | find_cmd("kpsewhich") |
| 170 | proc = subprocess.Popen( |
| 171 | ["kpsewhich", filename], |
| 172 | stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 173 | (stdout, stderr) = proc.communicate() |
| 174 | return stdout.strip().decode('utf8', 'replace') |
| 175 | except FindCmdError: |
| 176 | pass |
| 177 | |
| 178 | |
| 179 | def genelatex(body, wrap): |