可以使用 o = __import__('os') 将os模块复制给变量o,__import__接收一个字符串。所以要是‘os’
群里一个问题:
def notfound():
return web.notfound("Sorry, the page you were looking for was not found.")
app.notfound = notfound
web.py 中的 app.notfound = notfound 这个怎么解释 不太懂
解释:
在py里,function是一个数据类型
所以跟list, int, float之类的东东,一样,可以赋值和传递