Python在模块装入时调用初始化函数。
Python calls the initialization function when the module loads.
my_module_init函数是在加载这个模块时被调用的,它用来进行一些初始化方面的工作。
The my_module_init function is called when the module is loaded and the function can be used for initialization purposes.
初始化函数将完成模块所要求的所有初始化操作,但更重要的是,它还把一个指向方法表的指针传回给Python。
It does whatever initialization is required for the module, if any, but most crucially, it also passes a pointer to the method table back to Python.
函数inet _ init也会对各个inet模块进行初始化,例如ARP、ICMP和IP模块,以及TCP和UDP模块。
Function inet_init also initializes the various inet modules, such as the ARP, ICMP, the IP modules, and the TCP and UDP modules.
模块可以像函数定义一样包含执行语句。这些语句通常用于初始化模块。
A module can contain executable statements as well as function definitions.
模块可以像函数定义一样包含执行语句。这些语句通常用于初始化模块。
A module can contain executable statements as well as function definitions.
应用推荐