我刚从他们的 SVN 下载了 python-json-rpc(http://json-rpc.org/wiki/python-json-rpc),直接与 Python 解释器交互做了测试。像这样:
Just downloaded the python-json-rpc
(http://json-rpc.org/wiki/python-json-rpc) from their svn and tested
by talking to the Python interpreter directly. Like this:pythons = ServiceProxy("http://localhost:8332") s.getblockcount()pythons = ServiceProxy("http://localhost:8332") s.getblockcount()
关于怎样让同一个二进制程序在没有图形界面的情况下运行,我找到了一些线索:
Just a few clues I've found about running the same binary without a GUI:
- GTK 支持在没有显示环境时运行程序:http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check。不过,这里没有说明 wxWidgets 是否也能做到。
- GTK supports running a program without display:
http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check. This
doesn't tell if it's possible in wxWidgets though.
- wx 2.9 的 wxAppConsole 也许能派上用场。仅仅把 wxApp 替换成 wxAppConsole 并不能工作,我不确定应该怎样使用它。相关文档不太完善。
- wxAppConsole of wx 2.9 might be useful somehow. Just replacing
wxApp with wxAppConsole doesn't work, I'm not sure how it should be
used. It's not very well documented.
- 另一个选择也许是使用 IMPLEMENT_APP_NO_MAIN(),自己编写 main 方法。
- Another option might be to use IMPLEMENT_APP_NO_MAIN() and make our
own main method.
引用 Martti Malmi 的文字Martti Malmi来源 ↗我找到了一些关于让同一二进制文件无图形界面运行的线索:
Just a few clues I've found about running the same binary without a GUI:
- GTK 支持在没有显示的情况下运行程序: http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check. 不过这并没有说明在 wxWidgets 中是否可行。
- GTK supports running a program without display: http://library.gnome.org/devel/gtk/2.12/gtk-General.html#gtk-init-check. This doesn't tell if it's possible in wxWidgets though.
我看到它在 wxApp::Initialize 中调用了 gtk-init-check。
I see it calls gtk-init-check in wxApp::Initialize.
我可以在子类中重写 Initialize,抑制错误消息后调用原来的函数,并忽略返回值。看来可以运行。
I can subclass Initialize, call the original one while suppressing the error message and ignore the return value. It seems to be working.
对于命令行开关的名称和说明,有什么建议吗?有没有惯用的标准?我目前用的是: -daemon(或 -d) (启用 RPC,并在后台运行) -server (启用 RPC)
Any suggestions what to name the command line switches and how to describe them? Is there any traditional standard? I'm currently using: -daemon (or -d) (Enables RPC and runs in the background) -server (Enables RPC)
当前版本尚未建立逐条校对状态记录。来源核验、历史审校与当前译文校对是不同事项。
译文内容版本:4da67f95ef1c。用于比对文本,不代表校对等级或更新时间。
请填写对应原文、现译文、建议译法和理由。复制后通过你联系本站作者的渠道提交;此处不会自动发送。
Re: Non-GUI option