我们假设我有以下功能:
def hello():
print "hello"
我如何使用像transcript
这样的程序将其转换为有效的javascript?
您可以根据文档here使用以下命令运行它:
transcrypt -b hello.py
但是,这给了我一个非常奇怪的输出:
export var hello=function(){print("hello")};hello();
我希望它能给出类似的东西:
console.log('hello')
但这反过来打开了打印对话框?