【问题标题】:Grail (web browser) installation on Scientific Linux在 Scientific Linux 上安装 Grail(网络浏览器)
【发布时间】:2013-11-17 02:39:45
【问题描述】:

我不确定现在 Grail 浏览器是否是一个不错的选择,但是我想尝试一下,因为我在 Firefox-Fermi 上运行图形时遇到了一些问题。接下来,是我尝试grail-0.6 (tgz)后得到的

# python grail.py 
Traceback (most recent call last):
File "grail.py", line 43, in ?
from Tkinter import *

充分安装“tkinter”后,我再次运行“grail.py”,我得到了

# python grail.py 
/root/grail-0.6/grailbase/app.py:6: Deprecation Warning: the regex module is   
deprecated; please use the re module
import regex
/usr/lib/python2.4/regsub.py:15: DeprecationWarning: the regsub module is  
deprecated; please use re.sub()
DeprecationWarning)
Traceback (most recent call last):
File "grail.py", line 499, in ?
main()
File "grail.py", line 108, in main
app = Application(prefs=prefs, display=display)
File "grail.py", line 248, in __init__
self.stylesheet = Stylesheet.Stylesheet(self.prefs)
File "/root/grail-0.6/Stylesheet.py", line 21, in __init__
self.load()
File "/root/grail-0.6/Stylesheet.py", line 45, in load
massaged.append((g, c), v % fparms_dict)
TypeError: append() takes exactly one argument (2 given)

但现在,我完全无法理解该消息。你能就这个问题给我建议吗?

【问题讨论】:

  • 你是如何运行grail.py的? python setup.py?

标签: python browser


【解决方案1】:

哇 - 这是过去的爆炸!我的建议是放弃:Grail 已经十几年没有人碰过了。已经死了。

您收到的错误消息源于 Python 1.6(2000 年 9 月 5 日发布)中的更改。以下是发行说明中的​​信息:

  • 列表的 append() 方法不能再调用更多 不止一个论点。这用于附加一个由 所有论点,但没有记录。要附加元组,请使用 例如l.append((a, b, c))。

所以,你可以:

  1. 放弃吧。推荐;-)
  2. 安装一个古老版本的Python;或者,
  3. 将该行更改为

    massaged.append(((g, c), v % fparms_dict))

看看接下来会发生什么;-)

关于下一个问题

Python 0.9.1 已经非常老了,从 1991 年初开始。在 1.0 发布之前,该语言发生了很多很多方面的变化。

根据the old Grail home page,Grail 0.6:

需要 Python 1.5 或更高版本,以及 Tcl/Tk 8.0 或更高版本。

所以,如果你决心追求这一点,请找到 Python 1.5 ;-) 请注意,.append() 语义在 1.6 版中已更改,因此最初伤害你的原始 .append() 代码在 1.5 中应该仍然可以正常工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-02-02
    • 1970-01-01
    • 1970-01-01
    • 2017-09-27
    • 1970-01-01
    • 2011-10-08
    • 2019-06-19
    相关资源
    最近更新 更多