<p>这个简单的wxpytohn脚本给出了以下错误,怎么了?错误消息不会给出脚本中发生错误的行:</p>
<pre><code>Traceback (most recent call last):
File "c:\Python27\lib\site-packages\spyderlib\plugins\externalconsole.py", line 721, in run_script_in_current_shell
"and try again.") % osp.basename(filename), QMessageBox.Ok)
File "c:\Python27\lib\ntpath.py", line 198, in basename
return split(p)[1]
File "c:\Python27\lib\ntpath.py", line 173, in split
while i and p[i-1] not in '/\\':
TypeError: 'in <string>' requires string as left operand, not QString
</code></pre>
<p>脚本如下:</p>
^{pr2}$