Problem with randomization using Python preprocessor