A utility module to supplement the functionality of module random supplied with
python. Some functions make use of device /dev/urandom which might cause some
Copyrights: K Raghu Prasad [Prangya Technologies Pvt. Ltd.]
License: GNU Library General Public License (Version 2).
$Revision: 0.1 $
$Date: 2003/01/01 08:29:57 $
$Author: admin $
- Function to create a long integer out of a character-list or character-
bytevals: A list of bytes or a character-string.
Returns: Long value obtained from the characters present in the supplied
list of bytes or character-string.
ParamException: Parameter "bytevals" is not a sequence of bytes.
- randomStr(choice, len)
- Function to obtain a random string of length num using the characters
specified in list choice.
choice: A list of available characters from where the random string is
to be built.
len: The length of expected random string.
Returns: A random string of length len containing characters from given list
ParamException: Parameter "choice" is not a sequence type or "len" is
not an integer or long type.
- Function to seed the random generator from device /dev/urandom.
Uses python module random based on Wichmann-Hill generator.
IOError: Access denied on /dev/urandom or OS does not support it.
||__file__ = '/usr/lib/python2.2/site-packages/prangya/randutils.pyc'|
__name__ = 'prangya.randutils'
__version__ = '0.1'