Why does VEXCode V5 Python import the urandom library by default?

Why does VEXCode V5 Python import the urandom library by default?

#region VEXcode Generated Robot Configuration
from vex import *
import urandom

# Brain should be defined by default
brain=Brain()

# Robot configuration code

# wait for rotation sensor to fully initialize
wait(30, MSEC)

#endregion VEXcode Generated Robot Configuration
1 Like

It’s a built in module and gets used in some of the example code, no other reason

5 Likes

@jpearman :
Thanks, got it.

Quick follow up Q: Is it possible to import a custom module, perhaps from an SD card? Idea is to take all the little pieces of code we wrote over the years (looks like we are moving away from RMS as they are sadly going to fade) and put them into a callable library, so for example if our project calls for an arc turn we would have a def arcturn() in our library file and we would do a “from whatever import arcturn” where whatever.py is where all our code sits in functions?

1 Like

see example here.

2 Likes

Beautiful. Thank you. Also checking micropython.org - pretty exciting project.

1 Like