[issue7852] [PATCH] Drop Computer from Apple Computer in plistlib

2010-02-05 Thread Wang Chun
Wang Chun yaohua2...@gmail.com added the comment: plutil is a command shipped with every Mac. See the example in my original post. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7852

[issue7852] [PATCH] Drop Computer from Apple Computer in plistlib

2010-02-04 Thread Wang Chun
New submission from Wang Chun yaohua2...@gmail.com: Apple's official utilities had been dropped the word Computer. We should follow them. imac:~$ cat test.py __import__('plistlib').writePlist({}, 'test.plist') imac:~$ python test.py imac:~$ cat test.py __import__('plistlib').writePlist

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-25 Thread Wang Chun
New submission from Wang Chun yaohua2...@gmail.com: PEP-0372 and Issue 5381 both say json.dumps respect OrderedDict's iteration order, but the example in them do not work on my latest trunk build. $ uname -a Linux 12.38 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64

[issue5885] uuid.uuid1() is too slow

2009-04-30 Thread Wang Chun
New submission from Wang Chun yaohua2...@gmail.com: uuid.uuid1() currently uses two different ways to generate a uuid. If the system call uuid_generate_time is available, uuid1() uses the system call via the ctypes interface, otherwise, it uses pure Python code to generate a uuid. The problem

[issue5885] uuid.uuid1() is too slow

2009-04-30 Thread Wang Chun
Wang Chun yaohua2...@gmail.com added the comment: This is my test on another faster machine. $ cat test.py import sys, time, uuid N = int(sys.argv[1]) t = time.time() for x in xrange(N): uuid.uuid1() print('%.3f microseconds' % ((time.time() - t) * 100.0 / N)) $ cat test.c #include

[issue4650] getopt need re-factor...

2008-12-12 Thread Wang Chun
New submission from Wang Chun yaohua2...@gmail.com: I created #4629 a couple of days ago. And besides that issue, for Python 3.x, I guess we can remove getopt.error since Python 3.x does not have to backward compatible with Python 2.x. And another issue is, GetoptError does not render right

[issue4651] getopt need re-factor...

2008-12-12 Thread Wang Chun
New submission from Wang Chun yaohua2...@gmail.com: I created #4629 a couple of days ago. And besides that issue, for Python 3.x, I guess we can remove getopt.error since Python 3.x does not have to backward compatible with Python 2.x. And another issue is, GetoptError does not render right

[issue4629] getopt should not accept no_argument that ends with '='

2008-12-10 Thread Wang Chun
New submission from Wang Chun [EMAIL PROTECTED]: Consider the following program tmp.py: import sys, getopt print(getopt.getopt(sys.argv[1:], '', ['help'])) The program accept --help without a value: python helloworld.py --help But if someone invoke the program like: python helloworld.py

[issue4629] getopt should not accept no_argument that ends with '='

2008-12-10 Thread Wang Chun
Changes by Wang Chun [EMAIL PROTECTED]: -- keywords: +patch Added file: http://bugs.python.org/file12325/getopt.py.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4629

[issue2173] Python fails silently on bad locale

2008-11-12 Thread Wang Chun
Wang Chun [EMAIL PROTECTED] added the comment: This issue remains unsolved in the latest python 3.0rc2+ subversion repository as of 2008-11-13. -- nosy: +wangchun ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2173

[issue1982] Feature: extend strftime to accept milliseconds

2008-10-29 Thread Wang Chun
Wang Chun [EMAIL PROTECTED] added the comment: Ruby recently added support of millisecond and nanosecond to strftime. This is their changeset: http://redmine.ruby-lang.org/repositories/revision/ruby-19?rev=18731 To use the extended strftime, one can do: Time.now.strftime('%Y-%m-%dT%H:%M:%S

[issue4227] unicode_literals and print_function do not work together.

2008-10-29 Thread Wang Chun
New submission from Wang Chun [EMAIL PROTECTED]: If from __future__ import unicode_literals, print_function, unicode_literals works, but not print_function; If from __future__ import print_function, unicode_literals, print_function works, but not unicode_literals. -- components