Created
June 5, 2010 21:12
-
-
Save rconradharris/427007 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
On Mac OS X (10.6.3) produces: | |
$ python test.py | |
35adf230-9f19-4470-bc23-1869998286e3 | |
35adf230-9f19-4470-bc23-1869998286e3 | |
35adf230-9f19-4470-bc23-1869998286e3 | |
Uses uuid_generate_random(3) from libc | |
On Ubuntu (Lucid) produces: | |
# python test.py | |
d83c20a3-d859-4210-b3b5-1e1f09e54521 | |
6818f895-0f9c-4863-8c29-3aad1e22ac69 | |
581b921f-cc71-4a7e-b7d9-389f8187c012 | |
Uses uuid_generate_random(3) from libuuid | |
""" | |
from uuid import uuid4 | |
from multiprocessing import Process | |
def f(): | |
print uuid4() | |
if __name__ == '__main__': | |
for i in range(3): | |
Process(target=f).start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment