create a global function in python

后端 未结 1 966
情书的邮戳
情书的邮戳 2020-12-20 19:57

In python how can I create a function that can be global an used in all classes that are called? Here is an example:

import configparser
import os
import sy         


        
相关标签:
1条回答
  • 2020-12-20 20:32

    Put notify() in a utility module and have all the other modules import it.

    0 讨论(0)
提交回复
热议问题