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)
Several modules must be compiled when running VMware Workstation on Ubuntu
Several modules must be compiled when running VMware Workstation on Ubuntu I have a machine with Ubuntu 24.04.2 with VMware Workstation wor...
-
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 update my Ubuntu host today and it did pickup that new version of VirtualBox is available (4.1.8). All other packages installed pro...
-
This is quick start guide how to run ssh server on QNX. Tested on QNX 6.5 (650SP1-VM.tar). # ssh-keygen -t dsa -b 1024 -f /etc/ssh/ssh...
No comments:
Post a Comment