Terminal -- Python Mode (>>> prompt)
When a CodeJo project loads, some objects, functions, and methods are always loaded: colors, sounds, inputs; and each canvas brings in its own specific commands: Grid, Fabric, Turtle, Web, Document.
In addition these a brought in, which are not covered elsewhere:
- random
- The python
random module, to generate psuedo-random numbers. [more]
- random.random()
- return a random value between 0 and 1.
- random.choice(<list>)
- return a random item from a list.
- math
- The python
math module. [more]
- pi
- The literal value 3.14159...
- math.sin(<radians>)
- return the sine of the given angle. The angle is in RADIANS!
- math.radians(<degrees>)
- return the angle in radians, given the angle in degrees.
- js
- The Pyodide
js object, which gives access to the underlying worker-side JavaScript context. [See dir(js) for the full list]
- canvas
- The currently active CodeJo Canvas.
- codejo
- The
codeJo package.
- share
- The
codejo.share module, used to hold some values that are needed by disparate, otherwise unconnected parts of the system.
- builtins
- Python
builtins include a large amount of useful functionality. [more]
- dir([<object>])
- return the list of names in the current local scope, or with an argument, attempt to return a list of valid attributes for that object. [more]
- help(<object>)
- help on given python object.