A small lightweight language that combines Python and HTML.
Project description
A small lightweight language that combines Python and HTML. Recommended file extension: .γ/.gmaj
Example syntax:
# comment
x: int = 123 # variable
def xyz() -> None:
... # ellipsis (ignores the line)
def main() -> None:
# to insert html, use the 'html' opening and closing tags as shown below
<html>
<!-- html code here -->
<h1>
Hello, world!
</h1> <!-- this will open your browser to a random unused port with a 'Hello, world' heading -->
</html>
# after the closing 'html' tag, you can continue with python code
if __name__ == '__main__': # runs only when the file is executed directly
main() # executes the main function
DISCLAIMER: You cannot import GammaJ files in Python files or from other GammaJ files. You can import Python from GammaJ files though.
Running a GammaJ file
Method 1: Run using python module
python -m gammaj <filename>
Method 2: Use cmdlet
gammaj <filename>
How to get Syntax Highlighting (new in v4)
- Disclaimer: Right now, syntax highlighting is only available for PyCharm
- Download GammaJ.xml here
- Click 'Download raw file'
- Move the downloaded file (usually in C:/Users//Downloads) to your PyCharm 'filetypes' directory (usually C:/Users//AppData/Roaming/JetBrains/PyCharm/filetypes)
- Restart PyCharm (if needed)
- Voilà! You now have colour in your GammaJ file.
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
gammaj-4.tar.gz
(16.5 kB
view details)
Built Distribution
GammaJ-4-py3-none-any.whl
(16.2 kB
view details)
File details
Details for the file gammaj-4.tar.gz
.
File metadata
- Download URL: gammaj-4.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5361353254cd63fefd1e8c8588f076a01d0e6da6f331c0c32b03dbfd8550a1d4 |
|
MD5 | 761c89099951270d6c0d7e2e0c3b4663 |
|
BLAKE2b-256 | e7aacb1126f84bf428a20dfa24215748a9eaa14e93c3c657a7b8a56fa1ad4d55 |
File details
Details for the file GammaJ-4-py3-none-any.whl
.
File metadata
- Download URL: GammaJ-4-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb180b208c5594a54ebcfbf31dcd1a8c214a0e0305c8569cd8f3361cc0b44d02 |
|
MD5 | c08be839c9f93c45310e3942525d94eb |
|
BLAKE2b-256 | b60980f6c45f0154d65c509d8d94b58e4368fffb99147dd556570db9ecdfcc89 |