cm2py
cm2py is a Python package for generating and manipulating save strings for the roblox game Circuit Maker 2.
Installation
Use the package manager pip to install cm2py from pypi.
pip install cm2py
Usage
Basic program to generate a line of 8 looping OR gates:
import cm2py as cm2
LENGTH = 8
save = cm2.Save()
blocks = []
for i in range(LENGTH):
blocks.append(save.addBlock(cm2.OR, (i, 0, 0)))
### Commented out for clarity.
### You should store connections in a list if you want to modify them later.
# connections = []
for i in range(LENGTH):
# connections.append(save.addConnection(blocks[i-1], blocks[i]))
save.addConnection(blocks[i - 1], blocks[i]) # Directly add the connections to the save object
saveString = save.exportSave()
print(saveString)
(from the loop.py example)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
Release files for cm2py 0.3.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cm2py-0.3.11.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cm2py-0.3.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.5 kB
Release files / cm2py-0.3.11.tar.gz
| Download URL | cm2py-0.3.11.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34cc96d2eba5244b3a94bc6fa3a771a8a1f38104c5f431c668b964bf1c2499ab
|
|
BLAKE2b-256 checksum How to use checksums |
ee3bec3e656d1dee51bd14e6a4cd439d39271398d663e903fc01656e21b4f61f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.2
|
Release files / cm2py-0.3.11-py3-none-any.whl
| Download URL | cm2py-0.3.11-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dfae14a9c7968592435ff0b85cea56952dbb2f95e14f232c26b2ec20b4bcd269
|
|
BLAKE2b-256 checksum How to use checksums |
44f673fce8337ed8bf1c638a1292319d52f53f9a0e4138d9ac52bb08ade60832
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.2
|