Python
A quick look at Python in RCC
Python is a high-level, general-purpose programming language. It is known for its simplicity and readability. Python is a great language for beginners and experts alike. It is also the language of choice for many developers in the Roblox community.
Getting Started
Run
to install the Python compiler.
It will also request for a path to add the python bindings to, use the default path.
Why use Python?
Python is an excellent language for Roblox development, especially when it comes to backends. It is easy to learn and has a huge standard library (ported to Roblox). Many distributions of Python are also supported including:
- Jupyter Notebooks (Markdown gets converted to comments)
- Bython (Python with C/JS syntax)
Events
Events can easily be used like so:
Embedding Lua
You can embed Lua in Python like so:
Indexs start at 0
Unlike Lua, all indexs start at 0 in Python. This is also true for roblox-py
.
Lua
Python
Import
is equal to
is equal to
is also valid.
Export
Exporting values is a bit different than in vanilla Python.
will generate a
at the end of the file.