【问题标题】:How do I check from within python whether LaTeX and TeX Live are installed on a computer? [duplicate]如何从 python 中检查计算机上是否安装了 LaTeX 和 TeX Live? [复制]
【发布时间】:2017-04-15 03:49:49
【问题描述】:

我正在编写一个 python 程序,它生成被编译成 PDF 文档的 TeX 代码。为此,我需要确保用户在他们的计算机上安装了一些 LaTeX 发行版。如何在 Python 2.7 中以独立于平台的方式执行此操作?

【问题讨论】:

    标签: python python-2.7 latex tex


    【解决方案1】:
    from distutils.spawn import find_executable
    if find_executable('latex'): print("latex installed")
    

    这应该做你想做的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多