Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用Python 2.7评测Pyside2 PyQt代码?_Python_Python 2.7_Profile_Pyside2_Cprofile - Fatal编程技术网

如何使用Python 2.7评测Pyside2 PyQt代码?

如何使用Python 2.7评测Pyside2 PyQt代码?,python,python-2.7,profile,pyside2,cprofile,Python,Python 2.7,Profile,Pyside2,Cprofile,我正在嵌入式环境中运行PyQt/Pyside2。有没有办法描述它 def onCreateInterface(): widget = MyQtWidget() return widget 我希望使用cProfile,但我没有看到将其用于此代码的方法,例如: with cProfile.run... def onCreateInterface(): widget = MyQtWidget() return widget

我正在嵌入式环境中运行PyQt/Pyside2。有没有办法描述它

def onCreateInterface():
    widget = MyQtWidget()
    return widget
我希望使用cProfile,但我没有看到将其用于此代码的方法,例如:

with cProfile.run...
    def onCreateInterface():
        widget = MyQtWidget()
        return widget