Skip to main content

A compilation of packages

Project description

The file contains two classes: "tools" and "GUI". The "tools" class contains various functions that serve general purposes, such as checking if a string is a palindrome, filtering floating point numbers from a list, and so on. The "GUI" class contains functions for creating and managing graphical user interfaces with tkinter.

[Tools]

delay(sec): A function that pauses the execution of the program for the specified number of seconds.

start_thread(target, args=(), delay=None): A function that starts a thread that executes the specified function with the specified arguments. If a delay parameter is passed, the delay function is called before starting the thread.

isPalindrome(data): A function that checks whether a string is a palindrome.

multiply(num1, num2): A function that multiplies two numbers and returns the result as a string.

divide(num1, num2): A function that divides two numbers and returns the result as a string.

plus(num1, num2): A function that adds two numbers and returns the result as a string.

minus(num1, num2): A function that subtracts two numbers and returns the result as a string.

is_valid_parentheses(s): A function that checks whether the parentheses in a given string are valid.

merge_sorted_lists(list1, list2): A function that merges two sorted lists and returns a new sorted list.

evaluate(expression): A function that evaluates a mathematical expression as a string and returns the result. If the expression is invalid, the message "Invalid expression" is returned.

is_valid_number(data): A function that checks whether a string is a valid number. filter_real_numbers(data): A function that filters out all floating point numbers from a list of elements.

all_real_numbers(numbers): A function that checks whether all elements in a given list are floating point numbers.

[GUI] Constructor GUI(title="GUI", icon=None, width=500, height=500)

Creates a GUI with a window whose title is set to "title" (default is "GUI"), a size of "width" x "height" (default is 500 x 500). If "icon" is specified, the icon of the window is placed on the corresponding image.

[Methods] add_label(text, font_size=12): Creates a label element in the GUI with the text "text" and a font size of "font_size" (default is 12).

add_button(text, command=None, font_size=12, width=10, height=2): Creates a button element in the GUI with the text "text", which is executed when the button is clicked. The font size is "font_size" (default is 12), the width is "width" (default is 10) and the height is "height" (default is 2).

add_entry(font_size=12, width=20): Creates an entry element in the GUI with a font size of "font_size" (default is 12) and a width of "width" (default is 20).

add_textbox(font_size=12, width=50, height=10): Creates a text element in the GUI with a font size of "font_size" (default is 12), a width of "width" (default is 50), and a height of "height" (default is 10).

get_elements(): Returns a list of all elements in the GUI.

change_element(element, **kwargs): Changes the properties of an element. "element" is the element to change, and "kwargs" is a dictionary that contains the properties to change and their values.

show(): Shows the GUI.

msg_box(title, message): Displays a MessageBox with the title "title" and the message "message".

reset_screen(): Removes all elements from the GUI.

set_size(width, height): Resizes the GUI to "width" x "height".

set_title(title): Change the title of the GUI to "title".

set_icon(icon): Changes the GUI icon to the image specified in "icon".

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tools_python-0.1.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

tools_python-0.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file tools_python-0.1.tar.gz.

File metadata

  • Download URL: tools_python-0.1.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for tools_python-0.1.tar.gz
Algorithm Hash digest
SHA256 dfc009d44f4751f0f25921c96b0d18993257cf6390e13a8f7dc6f02d95cac0b0
MD5 23dea66eaf99bbef2849a6386ed4cabf
BLAKE2b-256 f957078c5e9032b8cd4200581f47f00d52f4c5dd777aaf7673a7858a84bbde93

See more details on using hashes here.

File details

Details for the file tools_python-0.1-py3-none-any.whl.

File metadata

  • Download URL: tools_python-0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for tools_python-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 afb8c8f369e8ac36d549f33f43566954555626d5be45088a82406996eafa72a8
MD5 85f0ce5262ae3b8571f0cfccfd5aac1c
BLAKE2b-256 ad5a654d27c953b8e22e34f7c4f4ad29516c3bc0c13ff9a6e5dfdbd1604d2c7f

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