第六章 使用嵌入式 Python (三)
从 ObjectScript 调用嵌入式 Python 代码
使用 Python 库
嵌入式 Python
让可以轻松访问数以千计的有用库。通常称为“包”,它们需要从 Python
包索引 (PyPI)
安装到 <installdir>/mgr/python
目录中,然后才能使用。
例如,ReportLab Toolkit
是一个用于生成 PDF
和图形的开源库。以下命令使用软件包安装程序 irispip
在 Windows
系统上安装 ReportLab
:
C:\InterSystems\IRIS\bin>irispip install --target C:\InterSystems\IRIS\mgr\python reportlab
在基于 UNIX
的系统上,使用: