Skip to main content

Modify and extend the Python language with (relative) ease

Project description

Makros

Extend the Python language with (relative) ease

Codecov PyPI

This program converts custom python files with a custom syntax to regular python files. The overall goals of this project are:

  1. To include some of the features that I feel are missing from the python programming language
  2. Provide a method for others to use this functionality without needing to contribute to this repo

Installation

pip install makros

Usage

To use this simply create a file with the .mpy extension, like the following:

macro import namespace

namespace greet:
    name = "World"

    export def set_name(new_name):
        name = new_name

    export def say_hello():
        print("Hello, " + name)

greet.say_hello()
greet.set_name("trickypr")
greet.say_hello()

Then just run it with makros:

makros my_file.mpy

For more info, please read our docs, or read the examples.

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

makros-1.1.1.tar.gz (31.3 kB view hashes)

Uploaded Source

Built Distribution

makros-1.1.1-py3-none-any.whl (36.7 kB view hashes)

Uploaded Python 3

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