A small lightweight language that combines Python and HTML. Recommended file extension: .γ/.gmaj
Example syntax:
export <void> <!DOCTYPE html> </void> # recommended to use at the top of your file
# comment
x: int = 123; # variable
# semicolon is optional
def xyz() -> None { # opening brace
... # ellipsis (ignores the line)
} # closing brace
def main() -> None {
# to insert html, use the 'export html' statement along with a 'end html' as shown below
export <void>
<!-- html code here -->
<h1>
Hello, world!
</h1> <!-- this will open your browser to a random unused port with a 'Hello, world' heading -->
</void>
# after the closing 'html' tag, you can continue with python code
# to export for ex. a python variable, which is not possible with 'export gamma',
# you can use plain 'export' instead:
name: str = "Bob"
export print("Unformatted", "text") # creates plain text
export paragraph("Hello,", name) # creates a paragraph with text: 'Hello, Bob'
export heading1("Heading 1") # \
export heading2("Heading 2") # |
export heading3("Heading 3") # > headings
export heading4("Heading 4") # |
export heading1("Heading 1") # /
export weblink("https://google.com", "Google") # creates a hyperlink. param 1 is href
export image("cat.png", "A picture of a munchkin cat") # creates an image. param 1 is src, param 2 is alt
export list("item 1", "item 2", "item3") # creates an unordered list. cannot be created with brackets [] (e.g. export ["1", "2"]) like non-exported lists
export table("item 1", "item 2", "item") # creates a table
if __name__ == '__main__' { # runs only when the file is executed directly
main() # executes the main function
}
DISCLAIMER: The
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: Use cmdlet (recommended)
gammaj <filename>
Method 2: Run using python module
python -m gammaj <filename>
How to get Syntax Highlighting (new in v4)
- Disclaimer: Right now, syntax highlighting is only available for PyCharm (all editions including the free community edition)
- 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.
Metadata
Release files for GammaJ 6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gammaj-6.tar.gz | 17.7 kB | Without provenance | Details for gammaj-6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| GammaJ-6-py3-none-any.whl | Python 3 | none | any | Details for GammaJ-6-py3-none-any.whl |
Total release size: 34.8 kB
Release files / gammaj-6.tar.gz
| Download URL | gammaj-6.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77c8e42d1913e92d298e71d64ed340791208466c36d35eedc4a93d88213a3405
|
|
BLAKE2b-256 checksum How to use checksums |
b846944eaddb8157aa25d1c91c927c43b1f26b72482dbcca488fc37b9b024779
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / GammaJ-6-py3-none-any.whl
| Download URL | GammaJ-6-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8440ed84bcadc204055364bcea3fb8432d0bf131567b37dd2706bf24548bcebd
|
|
BLAKE2b-256 checksum How to use checksums |
1234902edfcb40499b572a54558a08443735ae195c534d3866ea52456a6d6b4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Security for GammaJ 6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.