Random with Seed in Python
I want to be able to generate the same random number sequence and use it in the script each time.
I want the numbers different for each line, but the same for each execution.
But I can't seed the Random function in the correct way.
I've started with this ...
# Basic generator template
from System import Random
#random = Random(config["seed"]) #Can't configure random outside of main because config has no scope here
# config["column_name"] is the column name
# config["column_type"] is the column datatype
# config["column_size"] is the column size
# config["n_rows"] is the number of rows
# config["seed"] is the current random seed
random = Random(config["seed"]) #If I configure it here it gives me the same number for every data row
#random = Random() # if I enable this line I get random numbers, but they aren't reproducable - they are different for every execution
adddays = random.Next(365)
newdt = datetime.datetime.now() + datetime.timedelta(days=adddays)
Can someone point me in the correct direction?