Skip to main content

TkLang

Allows one to parse .tk files

Instillation

python -m pip install TkLang

Usage

import tklang as tkl
content = tkl.load("your_tk_file.tk")

Example(s)

TkLang Code

<src>
    <button id="LLJ" height="1" width="20">LLJ</button>
    <button id="LLJW">LLJW</button>
</src>

Note that the <src> tag is arbitrary and may be replaced with what ever name you desire; however, it is required. Omitting the src tag will cause issues with parser. We recommend replacing 'src' with 'app'

Python Code

import tklang as tkl
import tkinter as tk
t = tkl.load("test.tk")

root = t['master']
b1 = t['LLJ']

b1.grid(row=0, column=0)

root.mainloop()

Note that the 'master' key in the 't' dictionary is auto-definned and the root/master for all widgets in that TKL File

Features

load(src: file_name) -> dict
write(target_path: path_to_file, tag: tag_to_write_to_file) -> None

Changelog

0.0.1 ~ ~ 11/5/2020 10:01

  • Initial Unstable Release

0.0.2 ~ ~ 11/5/2020 10:03

  • Added README.md File

0.0.3 ~ ~ 11/5/2020 10:30

  • Updated README.md File

0.0.4 ~ ~ 11/5/2020 10:43

  • Added setup.py & instillation_requires

  • filemodes -> file-modes

0.0.5 ~ ~ 11/5/2019 10:47

  • Updated changelog

0.1.0 ~ ~ 11/5/2020 13:17

  • TkLang is now able to filter out tags through a series of checks rather than having the code run for a while and then hit an expected error. This will hopefully increase the speed of TkLang

0.1.1 ~ ~ 11/6/2020 12:35

  • Updated README.md
  • Addded Support for distrubtions

0.2.1 ~ ~ 11/6/2020 15:11

  • Added Support for frames

0.2.2 ~ ~ 11/9/2020 8:58

  • Initialized a git repository
  • Added a .gitignore file

0.2.5 ~ ~ 11/9/2020 9:44

  • Updated Changelog for 0.2.2/5 changes
  • Added a write function for writing to .tk files

Note that the write function is in an incredibly early stage and should be used only when necessary

0.2.6 ~ ~ 11/9/2020 10:02

  • Added documentation to all functions and to the module itself (init.py)

1.0.0 ~ ~ [PLANNED]

Initial Stable Release

Metadata

Release files for TkLang 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TkLang 0.2.6
File Size Uploaded Provenance Actions
TkLang-0.2.6.tar.gz 4.1 kB Without provenance Details for TkLang-0.2.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for TkLang 0.2.6
File Interpreter ABI Platform Actions
TkLang-0.2.6-py3-none-any.whl Python 3 none any Details for TkLang-0.2.6-py3-none-any.whl

Total release size: 9.2 kB

Release files / TkLang-0.2.6.tar.gz

Download URL TkLang-0.2.6.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cdb96bcb0c2b997f6e0022fae0d701d480f703dd140bbb5c1621f2c54ed68f70
BLAKE2b-256 checksum
How to use checksums
fa211ff612e99f5175178edcfbcab5009b60130325a8a196653faabb49aba4b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.0

Release files / TkLang-0.2.6-py3-none-any.whl

Download URL TkLang-0.2.6-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1a8d59643eba21fe88039ac22e7b187e0a1eb150a35748592e48ff232230d1b
BLAKE2b-256 checksum
How to use checksums
ee2e9677c7afed8e83dde8d4db348c2ba12740c1a72788e926979c1099629902
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.0

Security for TkLang 0.2.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page