random :: SystemRandom :: Class SystemRandom
[hide private]
[frames] | no frames]

Class SystemRandom

    object --+        
             |        
_random.Random --+    
                 |    
            Random --+
                     |
                    SystemRandom

Alternate random number generator using sources provided
by the operating system (such as /dev/urandom on Unix or
CryptGenRandom on Windows).

 Not available on all systems (see os.urandom() for details).



Instance Methods [hide private]
  _notimplemented(self, *args, **kwds)
Method should not be called for a system random number generator.
  _stub(self, *args, **kwds)
Stub method.
  getrandbits(k)
Generates a long int with k random bits.
  getstate(self, *args, **kwds)
Method should not be called for a system random number generator.
  jumpahead(self, *args, **kwds)
Stub method.
  random(self)
Get the next random number in the range [0.0, 1.0).
  seed(self, *args, **kwds)
Stub method.
  setstate(self, *args, **kwds)
Method should not be called for a system random number generator.

Inherited from Random: __getstate__, __init__, __reduce__, __setstate__, betavariate, choice, expovariate, gammavariate, gauss, lognormvariate, normalvariate, paretovariate, randint, randrange, sample, shuffle, uniform, vonmisesvariate, weibullvariate

Inherited from Random (private): _randbelow

Inherited from _random.Random: __getattribute__, __new__

Inherited from object: __delattr__, __hash__, __reduce_ex__, __repr__, __setattr__, __str__


Class Variables [hide private]

Inherited from Random: VERSION

Inherited from object: __class__


Method Details [hide private]

_notimplemented(self, *args, **kwds)

 
Method should not be called for a system random number generator.

_stub(self, *args, **kwds)

 
Stub method. Not used for a system random number generator.
Returns:
None

getrandbits(k)

 
Generates a long int with k random bits.
Returns:
x

Overrides: _random.Random.getrandbits

getstate(self, *args, **kwds)

 
Method should not be called for a system random number generator.
Overrides: Random.getstate

jumpahead(self, *args, **kwds)

 
Stub method. Not used for a system random number generator.
Returns:
None

Overrides: _random.Random.jumpahead

random(self)

 
Get the next random number in the range [0.0, 1.0).
Returns:
x in the interval [0, 1).

Overrides: _random.Random.random

seed(self, *args, **kwds)

 
Stub method. Not used for a system random number generator.
Returns:
None

Overrides: Random.seed

setstate(self, *args, **kwds)

 
Method should not be called for a system random number generator.
Overrides: Random.setstate