第五章 使用嵌入式 Python (二)
在 Python 脚本文件 (.py) 中
还可以使用 irispython 命令执行 Python 脚本。
考虑 Windows 系统上的文件 C:\python\test.py,其中包含以下代码:
# print the members of the Fibonacci series that are less than 10
print('Fibonacci series:')
a, b = 0, 1
while a < 10:
print(a, end=' ')
a, b = b, a + b
# import the iris module and show the classes in this namespace
import iris
print('\nInterSystems IRIS classes in this namespace:')
status = iris.cls('%SYSTEM.OBJ').ShowClasses()
print(status)
可以从命令行运行 test.

开始 - 请拉到页面底部查看该系列文章第一部分
Globals,这些存储数据的魔剑,已经存在了一段时间,但是没有多少人能够有效地使用它们,也没有多少人知道这个超级武器。