读书人

Python怎么reload引入自定义模块

发布时间: 2012-08-27 21:21:56 作者: rapoo

Python如何reload引入自定义模块
自定义一个模块,在命令引入了,模块代码有更改,如何在命令行再次引入,实现reload的效果呢?

[解决办法]
reload函数啊
[解决办法]
reload(module)
Reload a previously imported module. The argument must be a module object, so it must have been successfully imported before. This is useful if you have edited the module source file using an external editor and want to try out the new version without leaving the Python interpreter. The return value is the module object (the same as the module argument).

读书人网 >perl python

热点推荐