Skip to main content

A collection of tools to simplify your Python experience!

Project description

Requirements

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

OlPack-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: OlPack-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af95cec22318af0e52d5f505d2a82bbf4202444cf5146796f39b909d3a8ffc77
MD5 1c079da371ee4ac23a16ebff0508f3d4
BLAKE2b-256 4f0f459a8224e1f28e4ef542797123d18ef1f451ecfb611959548efb8739021f

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