Re: Unicode File Names

2008-10-17 Thread Martin v. Lo
> Step 4: Either wait for Python 2.7 or apply the patch to your own copy > of zipfile ... Actually, this is released in Python 2.6, see r62724. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Linking debug C++ DLL with python dlls

2007-11-08 Thread Martin v. Lo
> So I decided to download and build the debug version of python2.5.1/ > As it seems I also need to compile all relevant extension modules > (*.pyd) in debug as well - is this correct? That's correct. > I tried to change the code above (just for fun) so in both cases i'll > use python25.lib and i

Re: In C extension .pyd, sizeof INT64 = 4?

2007-06-12 Thread Martin v. Lo
Allen schrieb: > My C extension works wrong, and debug it, found that sizeof (INT64) = > 4, not 8. > I compile on Windows XP platform. > Please tell me how to fix it to support INT64? What *is* INT64? It's not a builtin type of standard C, it isn't defined by Microsoft C, and it isn't predefined b

Re: How to print this character u'\u20ac' to DOS terminal

2007-05-29 Thread Martin v. Lo
人言落日是天涯,望极天涯不见家 schrieb: > Who could explain the follow issue ? print u'\u0394' > Δ print u'\u20ac' > Traceback (most recent call last): > File "", line 1, in > UnicodeEncodeError: 'gbk' codec can't encode character u'\u20ac' in > position 0: > illegal multibyte sequence > > My termi

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-29 Thread Martin v. Lo
> yes, it could print to the terminal(cmd.exe), but when I write these > string to file. I got the follow error: > > File "E:\Tools\filegen\filegen.py", line 212, in write > self.file.write(data) > UnicodeEncodeError: 'ascii' codec can't encode character u'\u0394' in > position 0 > : ordinal

Re: how to print the GREEK CAPITAL LETTER delta under utf-8 encoding

2007-05-28 Thread Martin v. Lo
人言落日是天涯,望极天涯不见家 schrieb: > I lookup the utf-8 form of delta from the link. > http://www.fileformat.info/info/unicode/char/0394/index.htm > > and then I want to print it in the python ( I work under windows) > > #!/usr/bin/python > #coding=utf-8 > > print "\xce\x94" > > but the result is not the

Re: how to refer to partial list, slice is too slow?

2007-05-10 Thread Martin v. Lo
人言落日是天涯,望极天涯不见家 schrieb: > I'm a python newbie. It seems the slice operation will do copy. > for example: a = [1,2,3,4,5,6,7,8,9,0] b = a[7:] b > [8, 9, 0] a.remove(9) a > [1, 2, 3, 4, 5, 6, 7, 8, 0] b > [8, 9, 0] > > if the list have large members, the slice operatio