« 2006年07月 | (回到Blog入口) | 2006年10月 »

2006年09月 归档

2006年09月27日

wxPython 入门教程第一课

贴一个简单代码

[code start]
#-* coding:GBK *-

import sys, os
from wxPython.wx import *

class MyApp(wxApp):
def OnInit(self):
frame = wxFrame(None, -1, "Hello from wxPython by yayv")
frame.Show(true)
self.SetTopWindow(frame)
return true

app = MyApp(0)
app.MainLoop()

[code end]

用wxWindow的主窗口显示一个窗口
代码很简单,不需要什么解释

svn(subversion) 的错误 续

服务器重新做了,但那个400 bad request的错误还是存在,再次Google找到2个相关讨论

when I try to check out a subversion repository

> svn co http://scm.sipfoundry.org/rep/project/main project

I get an error like:

svn: REPORT request failed on '/rep/project/!svn/vcc/default'
svn: REPORT of '/rep/project/!svn/vcc/default': 400 Bad Request (http://scm.sipfoundry.org)

You are behind a web proxy that is not passing the WebDAV methods that subversion uses. You can work around the problem by using SSL to hide what you're doing from the proxy:

> svn co https://scm.sipfoundry.org/rep/project/main project

很明显解决办法与我的方法相同,但是对于原因的解释我并不认可。还有另一个资料:

I sniffed the traffic between the client and server and the error
seems to occur after authentication occurs, during the following
exchange. Note the missing closing > in both hunks of XML. The same
behavior is repeatable and occurs with both clients.

The trace:

...

REPORT /LNSS/!svn/vcc/default HTTP/1.1
Host: svn.lifetouch.net
User-Agent: SVN/1.3.2 (r19776) neon/0.25.5
Connection: TE
TE: trailers
Content-Length: 236
Content-Type: text/xml
Accept-Encoding: gzip
Accept-Encoding: gzip
Authorization: Basic xxx=

xmlns:S="svn:">http://svn.lifetouch.net/LNSS/account-management/src2310 rev="2310" start-empty="true"> HTTP/1.1 400 Bad Request
Date: Tue, 05 Sep 2006 21:32:00 GMT
Server: Apache/2.0.55 (Win32) mod_auth_sspi/1.0.3 SVN/1.3.0 DAV/2
Content-Length: 344
Connection: close
Content-Type: text/html; charset=iso-8859-1

这个作者对svn的请求做了抓包,很简单的就跟踪到了结果: 发送的update请求不完整,漏掉了一个">"符号。怀疑是新版svn客户端的bug.

期待svn的更新吧。

关于 2006年09月

此页面包含了在2006年09月发表于刘策(liuce)的所有日记,它们从老到新列出。

前一个存档 2006年07月

后一个存档 2006年10月

更多信息可在 主索引 页和 归档 页看到。

Powered by
Movable Type 3.33