从 python 中的其他 class 调用静态方法

Call a static method from other class in python

我有一个名为 Pqr.py 的 python 文件,其中包含一个包含静态方法的 class。

import subprocess

class Pqr:

    @staticmethod
    def callTheService(a,b,c):
       subprocess.call(a,b,c)

现在我试图从另一个 class 文件中的另一个 python 访问这个静态方法。两个 .py 文件都位于同一目录中。第二个文件中的代码是,

import Pqr

class Rst:
    Pqr.callTheService("a", "b", "c")

当我尝试 运行 时,我收到错误 AttributeError: module 'Pqr' has no attribute 'callTheService'

你能帮我解决这个错误吗?

我解决了阅读评论的问题。我在模块中导入了 class。这是示例工作代码。

from Pqr import Pqr

class Rst:
    Pqr.callTheService("a", "b", "c")