Skip to main content

A collection of tools to simplify your Python experience!

Project description

PyPack

A collection of tools to simplify your python experience!

Requirements

  • Python 3.6 or higher
  • Tkinter (usually included with Python)

Installation

To install this package, you can use pip:

pip install .

Available Functions

start_window(window)

The start_window function uses window.mainloop to start the windows main loop.

Parameter Description Example
window The window to use [window].mainloop() start_window(root) (Initializes the main loop for root)

initialize_window(title="My App", size="300x200")

The intialize_window function creates a window that the user can run with the start(window) function.

Parameter Description Example
title The title of the window that is created. My App (App Name)
size The size of the window created (In Pixels) 300x200 Pixels

pack_button(window, text, command)

The pack_button function adds a button to the Tkinter window with the specified text and command. Below is a description of each parameter.

Parameter Description Example Usage
window The Tkinter window where the button will be added. root (main application window)
text The label text to display on the button. "Click Me"
command The function to call when the button is clicked. button_clicked (a function that gets executed on click)

Example Usage

from PyPack import initialize_window, pack_button, start_window

def on_button_clicked(): 
    print("Hello, world!")

# Creates a window with the title 'My App' and size '300x200' pixels.
window = initialize_window("My App", "300x200")

# Adds a button to the window
pack_button(window, "Click me!", on_button_clicked)

# Starts the main loop
start_window(window)

License

This project is licensed under a Custom License. You are free to use, modify, and fork the code. Redistribution under the same name as the original software is not permitted. Any distribution or use must provide proper attribution to the original author. See the LICENSE file for details.

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

olpack-0.1.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

OlPack-0.1.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file olpack-0.1.2.tar.gz.

File metadata

  • Download URL: olpack-0.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for olpack-0.1.2.tar.gz
Algorithm Hash digest
SHA256 493b54cf919f101040e073a476dbef263a6ee2806e643b42ead1bc1ea2efc12e
MD5 c3deaaceab4685d7c7b7f03d4dedd9d7
BLAKE2b-256 cf114eb8d87ac988b6d49cd71f83787212d1cdd71f0d71ee82f46aeb7e22afb8

See more details on using hashes here.

File details

Details for the file OlPack-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: OlPack-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for OlPack-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e4b9f18284ed4dd6583a6680e7e08209769e0b9c39fda002e3d33e5b75c19d62
MD5 e475643035424f434923f1461493ae8d
BLAKE2b-256 fbcf6a219e40d55b023140bfb5accc52c48b205da3d64c60ea6bd3613a388856

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page