Re: can compile function have a bug?

2006-10-09 Thread ygao
Peter Otten wrote: ygao wrote: compile('U中','c:/test','single') code object ? at 00F06B60, file c:/test, line 1 d=compile('U中','c:/test','single') d code object ? at 00F06BA0, file c:/test, line 1 exec(d) u'\xd6\xd0' U中 u'\u4e2d' why is the result different? a bug

can compile function have a bug?

2006-10-07 Thread ygao
compile('U中','c:/test','single') code object ? at 00F06B60, file c:/test, line 1 d=compile('U中','c:/test','single') d code object ? at 00F06BA0, file c:/test, line 1 exec(d) u'\xd6\xd0' U中 u'\u4e2d' why is the result different? a bug or another reason? --

how can get the module global symbol table from a function or method which it is called?

2006-06-17 Thread ygao
when a function or method is called,how can get the module global symbol table from which it is called,not the module where it is defined(this is easy). thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: how can get the module global symbol table from a function or method which it is called?

2006-06-17 Thread ygao
I mean the way not passing parameter to the fonction or the method. ygao wrote: when a function or method is called,how can get the module global symbol table from which it is called,not the module where it is defined(this is easy). thanks! -- http://mail.python.org/mailman/listinfo/python

Re: unicode wrap unicode object?

2006-04-08 Thread ygao
sorry,my poor english. I got a solution from others. I must use utf-8 for chinese. import sys reload(sys) sys.setdefaultencoding(utf-8) s='\xe9\xab\x98' #this uff-8 string ss=U'\xe9\xab\x98' ss1=ss.encode('unicode_escape').decode('string_escape') s1=s.decode('unicode_escape') s1==ss

Re: unicode wrap unicode object?

2006-04-08 Thread ygao
sorry,my poor english. I got a solution from others. I must use utf-8 for chinese. import sys reload(sys) sys.setdefaultencoding(utf-8) s='\xe9\xab\x98' #this uff-8 string ss=U'\xe9\xab\x98' ss1=ss.encode('unicode_escape').decode('string_escape') s1=s.decode('unicode_escape') s1==ss True

Re: unicode wrap unicode object?

2006-04-08 Thread ygao
thanks for your advice. -- http://mail.python.org/mailman/listinfo/python-list

how convert \\xd6\\xd0\\xb9\\xfa into \xd6\xd0\xb9\xfa

2006-04-07 Thread ygao
in python dd = \\xd6\\xd0\\xb9\\xfa d = \xd6\xd0\xb9\xfa but how to convert one to other ? thanks. -- http://mail.python.org/mailman/listinfo/python-list

unicode wrap unicode object?

2006-04-07 Thread ygao
import sys sys.setdefaultencoding(utf-8) s='\xe9\xab\x98' #this uff-8 string ss=U'\xe9\xab\x98' s '\xe9\xab\x98' ss u'\xe9\xab\x98' how do I get ss from s? Can there be a way do this? thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: apache config file parser

2006-03-21 Thread ygao
Can ZConfig write apache conf file? -- http://mail.python.org/mailman/listinfo/python-list

why g.count('')==2 ?

2006-03-11 Thread ygao
my question is as title! thanks! -- http://mail.python.org/mailman/listinfo/python-list