PyCodeTools (PCT)
Run Python scripts with a few extra scripting helpers, and package them
into standalone .exe files from a simple Tkinter GUI — all from the
command line.
Install
pip install PyCodeTools
This gives you two equivalent commands: pycodetools and pct.
Enabling PCT in a script
Add this as the first line of your .py file:
pycodetools = enabled
print("pycodetools")
That first line is what PCT looks for. Run the file through pct and
it detects the line, prints a confirmation, and unlocks the extra
helpers below. Run it with plain python file.py instead and it will
raise NameError: name 'enabled' is not defined — always launch
PCT-enabled scripts with pct, not python.
Running a script
pct myscript.py
# or explicitly:
pct run myscript.py
# or the long form:
pycodetools myscript.py
If the enable line is found, you'll see:
pycodetools = enabled
PyCodeTools is now enabled for this run.
Running: py myscript.py
----------------------------------------
pycodetools
Extra helpers in your script
Once enabled, your script can use the extra helper functions by importing the package:
pycodetools = enabled
import pycodetools as pct
if pct.enabled:
pct.title("My App")
pct.banner("Welcome!")
print(pct.color("This is red text", "red"))
pct.timer(3)
if pct.confirm("Keep going?"):
print("Continuing...")
pct.pause()
Available helpers:
| Function | What it does |
|---|---|
pct.title(text) |
Sets the terminal window title |
pct.clear() |
Clears the terminal |
pct.pause(msg=...) |
"Press Enter to continue..." prompt |
pct.banner(text) |
Prints a boxed banner |
pct.color(text, name) |
Returns ANSI-colored text |
pct.timer(seconds) |
Countdown timer |
pct.confirm(prompt) |
Yes/No prompt, returns bool |
pct.enabled |
True if the enable line was detected |
Config / Build GUI
pct config myscript.py
Opens a Tkinter window with two tabs:
- Dependencies — pick from a preset list of common packages (or type a custom one) and install them with pip.
- Build .exe — compile the script into a standalone executable using PyInstaller, with options for one-file builds, hiding the console window, and naming the output.
Building .exe files requires PyInstaller:
pip install PyCodeTools[build]
License
MIT
Metadata
Release files for PyCodeTools 0.2.0
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 | |
|---|---|---|---|---|
| pycodetools-0.2.0.tar.gz | 7.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pycodetools-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.6 kB
Release files / pycodetools-0.2.0.tar.gz
| Download URL | pycodetools-0.2.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97cacedd6dfd0d12fe04955fb5b1ebfa9332204b44d3ec2fa24bfb02999c10e0
|
|
BLAKE2b-256 checksum How to use checksums |
f98ef6a8c188eb62599104ca246b467e61899600653f1b49e7ad48970ed50269
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Release files / pycodetools-0.2.0-py3-none-any.whl
| Download URL | pycodetools-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5b6a11c77fb15d8bad0d44d997fceb7fd9912d6c8a13702cf5ca79f49ca4eff
|
|
BLAKE2b-256 checksum How to use checksums |
e6c1f15a4bcd073295fcd81ea4c569dc073b3fd6bab4aa0bf9cbf1541e1634ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Security for PyCodeTools 0.2.0
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.