【问题标题】:Textmate Execute line/selection for Python brokenTextmate Execute line/selection for Python 损坏
【发布时间】:2011-03-12 12:48:39
【问题描述】:

我已经在 python 中使用 textmate 几个星期了,除了命令“以 Python 执行行/选择”之外,一切似乎都运行良好。它根本不起作用。甚至尝试测试

print "Hello World"

我明白了

Traceback (most recent call last):
  File "/tmp/temp_textmate.QrxfR3", line 19, in <module>
  stdout.write(exc)
  TypeError: argument 1 must be string or read-only character buffer, not list

我尝试重新安装 textmate 但仍然遇到同样的错误。有什么想法吗??????

我的 textmate 版本是 1.5.10 (1623)

谢谢,

阿尔伯托

【问题讨论】:

  • 请正确格式化您的代码。请复制并粘贴实际代码。

标签: python textmate


【解决方案1】:

这里发生了两件事。首先是“执行行/选择为 Python”命令被破坏。您看到的异常是在尝试检索调用堆栈时“执行行/选择为 Python”的实现中的错误的结果。为什么会发生这种情况有点装腔作势,我目前正在调查。第二个问题是“Execute line/selection as Python”的实现调用eval,它期望执行一个表达式,而不是一个语句,这会导致引发异常。

此答案假定您使用的是 Python 2.x。

【讨论】:

    猜你喜欢
    • 2011-07-05
    • 1970-01-01
    • 2013-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-24
    相关资源
    最近更新 更多