Thomas> On OS X, this call is not available, but /usr/lib/libc.dylib has
Thomas> a uuid_generate function which is apparently compatible to the
Thomas> linux example I posted above.
Confirmed:
% python
Python 2.5a2 (trunk:46644M, Jun 4 2006, 10:58:16)
[GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes.util import find_library
>>> print find_library("c")
/usr/lib/libc.dylib
>>> from ctypes import *
>>> libc = CDLL("libc.dylib")
>>> uuid = create_string_buffer(16)
>>> libc.uuid_generate(uuid, 1)
-1073747536
>>> print repr(uuid[:])
'[EMAIL PROTECTED]'
Skip
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com