Monday, July 02, 2007
Generating UUID in Jython
I have been poking around STAX/STAF recently and I found a need to generate UUID or GUID in Windows. I tried uuid module in CPython but I can't call it inside my STAX job. I tried to create STAX process but I noticed that if the program is under heavy usage I cannot guarantee that the STAX process that runs the CPython gets the resulting UUID string. Since STAX is using Jython, I reasoned out that this should be possible in Java. A quick search in Google shows java.util.UUID. This class is just what I need.
So, basically, in Jython I can generate a UUID using the following command:
import java
print java.util.UUID.randomUUID()
~ts~
Subscribe to:
Post Comments (Atom)
Fedora install screen chronicle
Fedora install screen chronicle Below are links to Fedora installation screens. It is interesting to see how it has evolved over time. Fe...
-
Tried to update my Ubuntu host today and it did pickup that new version of VirtualBox is available (4.1.8). All other packages installed pro...
-
Installing MonoDevelop in OpenSUSE 12.2 from its repository was very easy. When running it for the first time though I got the message: Th...
-
Tried to run GenerateProjectFiles.bat to build Unreal Engine from source ( link ), but got error like below: C:\>Users\x\UnrealEngi...
No comments:
Post a Comment