Skip to main content

Strip comments from scripts, intened for use with MicroPython and other sorage constrained environments

Project description

Nudatus is a tool to remove comments from python scripts

It’s 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 extreamly unlikly this will cause you any issues (print is handled fine)

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

  • Initial release.

Project details


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.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page