Skip to main content

python with braces.

Project description

nestpy

"what if python, with braces, one line?"

SETUP

Install nestpy by executing:

$ pip install nestpython

After importing;

  • In order to compile a string from nestpy to python, use nestpy.ncompile(string)

  • In order to execute a nestpy string, use nestpy.nexec(string)

    For both, optional argument indent-level determines the indentation increment in the resulting python file. It is set to 1 by default.

  • To execute and compile files and folders, use the nestpy.files module:

    • nestpy.files.ncompile(file) compiles the given file to a string
    • nestpy.files.nexec(file) executes the file
    • nestpy.files.build(dir, new_dir) builds an entire golder
    • arguments can be provided.

FEATURING:

braces

Use {, ; and } instead of indentation! Indentation and newlines in the source files will be ignored. e.g.:

n = input('Enter Number: ');
if (n % 2 == 0) {
	print('n is even')
} else {
	print('n is odd')
}

(to be continued)


github : https://github.com/slycedf/nestpy

pypi : https://pypi.org/project/nestpython

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

nestpython-0.3.4.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

nestpython-0.3.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file nestpython-0.3.4.tar.gz.

File metadata

  • Download URL: nestpython-0.3.4.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for nestpython-0.3.4.tar.gz
Algorithm Hash digest
SHA256 b3c2eda1443019b4d64500f817a90027c0bd799282a1e69a1a13699dc932b3e3
MD5 ec1735c7bbfcbc1ce59d3c1e3aab6d13
BLAKE2b-256 7df333cd08a92d4ac851303e24c2990c6d329b90ffc5a3b04ee4b50344aae5b0

See more details on using hashes here.

File details

Details for the file nestpython-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: nestpython-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for nestpython-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9855065d6ca48d19285ae1f283018c6c1e9b9bbd7d3250e98c28bfae832aeec0
MD5 10ac875f9292dcaea7985bbd21d19662
BLAKE2b-256 9364bddbf5c2abf05658b200125aa949b0475f2953312e17f2550ccb75de39c9

See more details on using hashes here.

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