Nudatus is a tool to remove comments from Python scripts.
It was created for use in uflash to help squeeze longer programs onto the micro:bit but it should be suitable for various environments with restricted storage.
Note Nudatus uses the tokenizer built into Python so only supports the syntax of the version it’s running on, but it’s extremely unlikely this will cause you any issues (print is handled fine).
Personally I pronounce nudatus as new-dat-us which I appreciate is probably ‘wrong’.
Usage
Nudatus is designed to be embedded within a greater tool (like uflash or Mu by ntoll) but also provides a CLI tool:
nudatus [-h] [--version] [input] [output]
An input file must be specified but if output is omitted the result will be printed on stdout.
Calling from a Python script is quite simple:
import nudatus
source = '' # Input script
result = nudatus.mangle(source) # Result as str
0.0.5
Drop support for everything below Python 3.5
Format with black
Add type annotations (not that there is much to type)
0.0.2
Respect the contents of lists and dicts
0.0.1
Initial release.
Metadata
Release files for nudatus 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nudatus-0.0.5.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nudatus-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 kB
Release files / nudatus-0.0.5.tar.gz
| Download URL | nudatus-0.0.5.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba84a8e022cb4af0f995176383f5ff9fa83d57ded3cedc6aa4db1687f88cacec
|
|
BLAKE2b-256 checksum How to use checksums |
234dcf8a2c68ef1f6653e3fb677e35e2fb3c549092853780a0cf6014beb83ec9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.12
|
Release files / nudatus-0.0.5-py3-none-any.whl
| Download URL | nudatus-0.0.5-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00284890d3b09aa90297eadcf9142504e13efc6e0ac5e5e8e8eb1947545296d1
|
|
BLAKE2b-256 checksum How to use checksums |
ab30014b1a127a66c93a7fbf18992aff1fd3478fd6385a68c4055e67b8c2b8b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.12
|