chore: 添加虚拟环境到仓库
- 添加 backend_service/venv 虚拟环境 - 包含所有Python依赖包 - 注意:虚拟环境约393MB,包含12655个文件
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from sympy.printing.mathml import mathml
|
||||
from sympy.utilities.mathml import c2p
|
||||
import tempfile
|
||||
import subprocess
|
||||
|
||||
|
||||
def print_gtk(x, start_viewer=True):
|
||||
"""Print to Gtkmathview, a gtk widget capable of rendering MathML.
|
||||
|
||||
Needs libgtkmathview-bin"""
|
||||
with tempfile.NamedTemporaryFile('w') as file:
|
||||
file.write(c2p(mathml(x), simple=True))
|
||||
file.flush()
|
||||
|
||||
if start_viewer:
|
||||
subprocess.check_call(('mathmlviewer', file.name))
|
||||
Reference in New Issue
Block a user