Skip to main content

A collection of tools to simplify your Python experience!

Project description

QUICK NOTICE

This isnt uploaded to PyPI, so you'll need to download the code, and do pip install .

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.1.tar.gz (3.8 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.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: olpack-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 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.1.tar.gz
Algorithm Hash digest
SHA256 f862a7bf616b761d3d1eda401479162f61c4290ea4a750971f5e16601e887d1c
MD5 9b5dd64c9c8b15c06f7294b1bce0c285
BLAKE2b-256 b8e8ec8c83b9f45316a3436379189b900afa419a1b2d307988e2bc58d5c732c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: OlPack-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d96ba1fdbc1755d398cdad9ed167ac0672264acc39aec40df3cb3c4e9cec92d
MD5 0829f86c72c1748c0f0de4f2bcf835da
BLAKE2b-256 b6a4bbf413b2112c742679242854854b58ffb5bb2c4c39abbe806ba5e274b1c3

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