【发布时间】:2014-10-04 02:00:57
【问题描述】:
如何打印 Python 脚本的内容?
例如,如果我有这个(毫无意义的例子)脚本:
my_var = 1 + 1
another_thing = "this is my string"
我可以添加哪一行来获取全部内容?
my_var = 1 + 1
another_thing = "this is my string"
# Magically print out all of the code in this file
print .....
【问题讨论】:
标签: python reflection