我无法从称为art(https://github.com/sepandhaghighi/art)的库中获取某些功能以在脚本中运行,尽管它们在shell中可以正常工作。依次输入的脚本/命令如下所示:
from art import *
randart() <(function fails in script,but succeeds in shell)
tart("test") <(different function,same library,succeeds in both shell and script)
import sys
print(sys.version)
shell和脚本的python版本均为3.7.5。在脚本中运行时,第一个函数不会引发错误,但是不会提供任何输出。其期望的输出是来自集合的随机ascii_art。我觉得我缺少一些非常简单的东西。有任何想法吗? github上的文档报告“某些环境不支持所有1-Line arts”,但是它们是同一台机器上的相同python版本。环境的其他部分是否可能是原因?