Skip to main content

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.2

  • Respect the contents of lists and dicts

0.0.1

  • Initial release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nudatus-0.0.4.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file nudatus-0.0.4.tar.gz.

File metadata

  • Download URL: nudatus-0.0.4.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for nudatus-0.0.4.tar.gz
Algorithm Hash digest
SHA256 5dd73fdb52757d46346f6e878f9e9529f6fb85d2e6e3be0295c68bbf36c7fd78
MD5 62dadd8082bd7c15956d38a644754150
BLAKE2b-256 f623930e4eabe7168552cf488dc4321d6f093b6048ce181a8ad8ba6f2ce4b3bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page