跳转到内容

User:PhiLiP/python

维基百科,自由的百科全书

2009-02-15

[编辑]

>>> text = '《〈〉》〈' >>> text = '《〈〉》〈〉〈' >>> a = text.split('〉') >>> x = >>> for b in a: c = b.split('《') if len( c ) == 1: x += b.replace('〈','《') + '》' elif not c[len( c )-1].find('》') == -1: x += b.replace('〈','《') + '》' else: x += b + '〉'


>>> x '《〈〉》《》《》'

暂时放一段代码,免得以后要用时找不到。

2009-05-31

[编辑]
OpenGL.error.NullFunctionError: Attempt to call an undefined function __glutInit
WithExit, check for bool(__glutInitWithExit) before calling

装了PyOpenGL,因为是vista x64环境,所以GLUT不能用。解决方法如下:

  1. nvidia下载CG Toolkit并安装之。
  2. 在CG Toolkit的安装文件夹下找到glut32.dll文件,注意有两个文件夹有,一个是bin一个是bin.x64。
  3. 神奇的地方来了,x64的glut32.dll请扔到system32下,win32的glut32.dll请扔到syswow64下。
  4. 搞定。

Thanks to TBBle.

2009-06-02

[编辑]

cx_Oracle 9i版不兼容9.0.1,见Re: OCI.DLL cannot be found ?: msg#00012