python with braces.
Project description
nestpython
"what if python, with braces, one line?"
SETUP
Install nestpython by executing:
$ pip install nestpython
After importing;
-
In order to compile a string from nestpython to python, use
nestpython.ncompile(string)
-
In order to execute a nestpython string, use
nestpython.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
nestpython.files
module:nestpython.files.ncompile(file)
compiles the given file to a stringnestpython.files.nexec(file)
executes the filenestpython.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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nestpython-0.3.12.tar.gz
.
File metadata
- Download URL: nestpython-0.3.12.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f610a7946e868e80573e5af97f70e724ed83606a12769b82257e5bf3984c9c26 |
|
MD5 | 495a459c912b4853cfd4f025fef4b55e |
|
BLAKE2b-256 | b12769db554d8b314af8b6569140c23baebea5919ce4ca286de034a53efcb8aa |
File details
Details for the file nestpython-0.3.12-py3-none-any.whl
.
File metadata
- Download URL: nestpython-0.3.12-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f37ecf908703e08a0179b7ea20277b6050e41d5a6d51d58a9a9d2cebd2d0d231 |
|
MD5 | 1db891feab35287f23bf398297866828 |
|
BLAKE2b-256 | f46b11e725661a4a568ed357fc5e7c8c2f275e8d041dbfb803df438a6928b98d |