Python中文
首页
教程
问答
标签
搜索
登录
注册
关于python评测的问题
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我正在尝试用python分析我的应用程序。我正在使用cProfile库。我需要分析应用程序的onFrame函数,但这是由外部应用程序调用的。我尝试了很多方法,但目前我的onFrame方法有以下几种:</p> <pre><code>runProfiler(self) </code></pre> <p>在我的课外,我有以下内容:</p> ^{pr2}$ <p>如果这看起来很奇怪,那是因为我已经尽了一切努力来消除错误“name doProfile not defined”。即使现在,runProfiler方法会被调用,并且“runProfiler called”也会被打印出来,但是我得到了刚才描述的错误。我做错什么了?在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>在这种情况下,您应该将必要的上下文传递给<a href="http://docs.python.org/library/profile.html#cProfile.runctx" rel="nofollow">^{<cd1>}</a>:</p> <pre><code>cProfile.runctx("doProfile()", globals(), locals(), "profile.log") </code></pre>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何在python中从数据帧列中删除分类值?
6 回答
如何在python中从数据帧列表中删除引号
10 回答
如何在python中从数据帧创建列表
4 回答
如何在Python中从数据帧创建嵌套的JSON
9 回答
如何在Python中从数据帧显示wordcloud
7 回答
如何在Python中从数据帧的时间戳中删除字符
1 回答
如何在Python中从数据帧绘制简单绘图?
10 回答
如何在python中从数据帧行提取具有特定长度的范围?
6 回答
如何在python中从数据帧设置dict中的值
6 回答
如何在Python中从数据库中获得一个结果
1 回答
如何在python中从数据框中绘制分类条形图
1 回答
如何在Python中从数据框中选择特定细节?
1 回答
如何在python中从数据集中删除unicode
1 回答
如何在python中从数据集中删除某些数值?
4 回答
如何在python中从数据集中选择行
3 回答
如何在Python中从数组中删除元素
9 回答
如何在python中从数组中删除单个倒逗号?
2 回答
如何在python中从数组中删除对象?
8 回答
如何在python中从数组中删除引号
6 回答
如何在python中从数组中删除所有最小值
2 回答