-
Random process not working
Hi, trying to figure this out, the random() process is not working on my version? the error message 'Message: global name 'random' is not defined' comes back every time. Is there a collection I need to load or call in specific? Does anyone know how to fix this?
-
Super Moderator
Hi,
Did you import the random module? It seems to be working here...
--Mitch
-
the random module does not even appear in the list of available modules? I checked the directory and there is a random.py file there but it seems like ironpython is not importing it or something like that?
-
Super Moderator
Is your installation non-standard? Here it works OK...
python Code:
import random
number=random.random()
print number
You will not get the autocomplete for a lot of the modules in Python - there are almost 200 of them in the lib folder - so I assume only the most commonly used ones in Rhino have been put in there...
If you cannot import random, then there must be something haywire with your install...
--Mitch
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules