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
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
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
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
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
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
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
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
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
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
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
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
12 matches
Mail list logo