首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > perl python >

Python怎么reload引入自定义模块

2012-08-27 
Python如何reload引入自定义模块自定义一个模块,在命令引入了,模块代码有更改,如何在命令行再次引入,实现r

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).

热点排行