Skip to main content

JynPopMod Python Module

Project description

  1. switch_case(variable, cases)

    • variable: A value to check against the dictionary cases.
    • cases: A dictionary where keys are the possible values of variable and values are the corresponding functions to execute.
    • What it does: Mimics a switch-case statement, executing the function associated with the value of variable.
  2. pop(message)

    • message: A string to display in a message box.
    • What it does: Displays a simple message in a pop-up window.
  3. popinp(message)

    • message: A string to display in an input dialog.
    • What it does: Prompts the user for input through a dialog box.
  4. create_main_window()

    • What it does: Initializes and creates the main Tkinter window for the GUI.
  5. set_window_size(width, height)

    • width: The desired width of the window.
    • height: The desired height of the window.
    • What it does: Sets the size of the window.
  6. center_window(window, width, height)

    • window: The Tkinter window object.
    • width: The width of the window.
    • height: The height of the window.
    • What it does: Centers the window on the screen.
  7. minimize_window(window)

    • window: The Tkinter window object.
    • What it does: Minimizes the window.
  8. maximize_window(window)

    • window: The Tkinter window object.
    • What it does: Maximizes the window.
  9. set_window_bg_color(window, color)

    • window: The Tkinter window object.
    • color: A string representing the color to set as the background (e.g., "red", "blue").
    • What it does: Sets the background color of the window.
  10. create_button(window, text, command)

    • window: The Tkinter window object.
    • text: The label or text to display on the button.
    • command: The function to call when the button is clicked.
    • What it does: Creates a button widget.
  11. create_label(window, text)

    • window: The Tkinter window object.
    • text: The text to display on the label.
    • What it does: Creates a label widget.
  12. create_text_widget(window, height, width)

    • window: The Tkinter window object.
    • height: The height of the text widget.
    • width: The width of the text widget.
    • What it does: Creates a text widget for multi-line text input.
  13. bind_mouse_click(widget, callback)

    • widget: The Tkinter widget to bind the mouse click event to.
    • callback: The function to call when the mouse click happens.
    • What it does: Binds a mouse click event to a widget.
  14. bind_key_press(widget, callback)

    • widget: The Tkinter widget to bind the key press event to.
    • callback: The function to call when a key is pressed.
    • What it does: Binds a key press event to a widget.
  15. move_file(src, dest)

    • src: The source file path.
    • dest: The destination file path.
    • What it does: Moves a file from src to dest.
  16. copy_file(src, dest)

    • src: The source file path.
    • dest: The destination file path.
    • What it does: Copies a file from src to dest.
  17. create_directory(path)

    • path: The directory path to create.
    • What it does: Creates a new directory at the specified path.
  18. create_zip_file(file_paths, zip_path)

    • file_paths: A list of paths to files to include in the ZIP.
    • zip_path: The path where the resulting ZIP file should be saved.
    • What it does: Creates a ZIP file from the specified files.
  19. extract_zip_file(zip_path, dest)

    • zip_path: The path of the ZIP file.
    • dest: The destination directory to extract the files to.
    • What it does: Extracts files from the ZIP to the destination directory.
  20. capture_photo(output_path)

    • output_path: The file path where the captured photo should be saved.
    • What it does: Captures a photo using the webcam and saves it to output_path.
  21. record_video(output_path, duration)

    • output_path: The file path to save the recorded video.
    • duration: The duration in seconds for which to record the video.
    • What it does: Records a video using the webcam for the specified duration and saves it to output_path.
  22. start_http_server(port)

    • port: The port on which the server should run.
    • What it does: Starts an HTTP server listening on the specified port.
  23. get_server_status()

    • What it does: Checks and returns the current status of the HTTP server.
  24. upload_file_to_server(file_path, url)

    • file_path: The path of the file to upload.
    • url: The server URL where the file should be uploaded.
    • What it does: Uploads a file to the server at the specified URL.
  25. text_to_speech(text)

    • text: The text to convert into speech.
    • What it does: Converts the text into speech.
  26. speech_to_text()

    • What it does: Records speech from the microphone and converts it into text.
  27. get_cpu_usage()

    • What it does: Retrieves the current CPU usage percentage.
  28. get_memory_usage()

    • What it does: Retrieves the current memory usage percentage.
  29. get_ip_address()

    • What it does: Retrieves the system's current IP address.
  30. safe_run(func)

    • func: The function to run safely.
    • What it does: Executes the function func, catching any exceptions and preventing the program from crashing.
  31. track_mouse_position(callback)

    • callback: The function to call whenever the mouse position changes.
    • What it does: Tracks the mouse position and calls the callback when it moves.
  32. run_shell_command(command)

    • command: The shell command to execute.
    • What it does: Runs a system shell command and returns the result.
  33. send_email(subject, body, to_email)

    • subject: The subject of the email.
    • body: The body content of the email.
    • to_email: The recipient's email address.
    • What it does: Sends an email with the specified subject and body to the given recipient.
  34. change_widget_bg_color(widget, color)

    • widget: The Tkinter widget.
    • color: The background color to apply to the widget.
    • What it does: Changes the background color of the widget.
  35. change_widget_font(widget, font)

    • widget: The Tkinter widget.
    • font: The font to apply to the widget (e.g., "Helvetica 12").
    • What it does: Changes the font of the widget.
  36. add_widget_border(widget, width, color)

    • widget: The Tkinter widget.
    • width: The border width to apply.
    • color: The border color to apply.
    • What it does: Adds a border to the widget.
  37. pack_with_padding(widget, padding)

    • widget: The Tkinter widget.
    • padding: The padding around the widget.
    • What it does: Packs the widget with the specified padding.
  38. grid_widget(widget, row, column)

    • widget: The Tkinter widget.
    • row: The row in the grid where the widget should be placed.
    • column: The column in the grid where the widget should be placed.
    • What it does: Places the widget in a specific row and column in the grid.
  39. place_widget(widget, x, y)

    • widget: The Tkinter widget.
    • x: The x-coordinate where to place the widget.
    • y: The y-coordinate where to place the widget.
    • What it does: Places the widget at the specified x and y coordinates.
  40. delayed_pop(message, delay)

    • message: The message to display.
    • delay: The number of seconds to wait before displaying the message.
    • What it does: Displays a delayed pop-up message after the specified delay.
  41. start_timer(duration, callback)

    • duration: The duration in seconds for the timer.
    • callback: The function to call when the timer finishes.
    • What it does: Starts a timer and triggers the callback after the specified duration.
  42. get_weather(city, api_key)

    • city: The name of the city for which to get the weather.
    • api_key: The API key for accessing the weather API.
    • What it does: Retrieves the weather data for the specified city using an external weather API.
  43. copy_to_clipboard(text)

    • text: The text to copy to the clipboard.
    • What it does: Copies the given text to the clipboard.
  44. paste_from_clipboard()

    • What it does: Pastes the text from the clipboard.
  45. text_to_speech(text)

  • text: The text to be converted to speech.
  • What it does: Converts the given text into speech using the pyttsx3 engine.
  1. speech_to_text()
  • What it does: Records audio from the microphone and converts the spoken words to text using Google's speech recognition API.
  1. start_timer(seconds, callback)
  • seconds: The number of seconds to run the timer for.
  • callback: The function to call once every second during the timer's countdown.
  • What it does: Runs a countdown timer for seconds, calling callback() once every second.
  1. generate_random_string(length=15)
  • length: The desired length of the generated string.
  • What it does: Generates a random alphanumeric string of length length, with possible special characters.
  1. find_files_by_extension(directory, extension)
  • directory: The directory to search in.
  • extension: The file extension to search for (e.g., '.txt').
  • What it does: Returns a list of files in directory that have the given extension.
  1. get_ip_address()
  • What it does: Returns the local IP address of the machine.
  1. send_email(subject, body, to_email, mailname, mailpass)
  • subject: The subject of the email.
  • body: The body content of the email.
  • to_email: The recipient's email address.
  • mailname: The sender's email username.
  • mailpass: The sender's email password.
  • What it does: Sends an email using Gmail's SMTP server.
  1. convert_image_to_grayscale(image_path, output_path)
  • image_path: The path to the image to convert.
  • output_path: The path to save the grayscale image.
  • What it does: Converts the given image to grayscale and saves it at output_path.
  1. play_audio(text)
  • text: The text to be converted to speech.
  • What it does: Converts the given text to speech using pyttsx3.
  1. record_audio()

    • What it does: Records audio from the microphone and converts it to text using speech recognition.
  2. get_cpu_usage()

    • What it does: Returns the current CPU usage as a percentage.
  3. get_memory_usage()

    • What it does: Returns the current memory usage as a percentage.
  4. open_url(url)

    • url: The URL to open.
    • What it does: Opens the specified URL in the default web browser.
  5. create_zip_file(source_dir, output_zip)

    • source_dir: The directory containing files to zip.
    • output_zip: The output path for the zip file.
    • What it does: Creates a ZIP file from the contents of the source_dir.
  6. extract_zip_file(zip_file, extract_dir)

    • zip_file: The path to the zip file.
    • extract_dir: The directory to extract files into.
    • What it does: Extracts the contents of the ZIP file to extract_dir.
  7. capture_screenshot(output_path)

    • output_path: The path to save the screenshot.
    • What it does: Takes a screenshot of the current screen and saves it to output_path.
  8. move_file(source, destination)

    • source: The file path of the source file.
    • destination: The file path to move the file to.
    • What it does: Moves a file from source to destination.
  9. copy_file(source, destination)

    • source: The file path of the source file.
    • destination: The file path to copy the file to.
    • What it does: Copies a file from source to destination.
  10. show_file_properties(file_path)

    • file_path: The path to the file.
    • What it does: Returns the file's size and last modified time.
  11. check_website_status(url)

    • url: The URL of the website to check.
    • What it does: Returns True if the website is accessible (status code 200), else False.
  12. run_shell_command(command)

    • command: The shell command to execute.
    • What it does: Executes a shell command and returns the output and any errors.
  13. get_weather(city, api_key)

    • city: The name of the city to check the weather for.
    • api_key: The API key for accessing the weather service.
    • What it does: Retrieves the current weather for the specified city using the OpenWeatherMap API.
  14. monitor_file_changes(file_path, callback)

    • file_path: The path to the file to monitor.
    • callback: The function to call when the file is modified.
    • What it does: Monitors the file for changes and calls callback() when the file is modified.
  15. reverse_string(string)

    • string: The string to reverse.
    • What it does: Returns the reversed version of the input string.
  16. calculate_factorial(number)

    • number: The number to calculate the factorial of.
    • What it does: Returns the factorial of number.
  17. swap_values(a, b)

    • a: The first value.
    • b: The second value.
    • What it does: Returns b and a swapped.
  18. find_maximum(numbers)

    • numbers: A list of numbers.
    • What it does: Returns the maximum value in the list numbers.
  19. find_minimum(numbers)

    • numbers: A list of numbers.
    • What it does: Returns the minimum value in the list numbers.
  20. get_random_choice(choices)

    • choices: A list of choices.
    • What it does: Returns a random element from the list choices.
  21. generate_unique_id()

    • What it does: Generates and returns a unique ID using uuid.
  22. concatenate_lists(list1, list2)

    • list1: The first list.
    • list2: The second list.
    • What it does: Returns a new list that is the concatenation of list1 and list2.
  23. write_to_file(filename, content)

    • filename: The file to write to.
    • content: The content to write to the file.
    • What it does: Writes content to the specified file.
  24. read_from_file(filename)

    • filename: The file to read from.
    • What it does: Reads and returns the content of the specified file.
  25. parse_json(json_string)

    • json_string: The JSON string to parse.
    • What it does: Parses the JSON string and returns the corresponding Python object.
  26. create_file_if_not_exists(filename)

    • filename: The file to create if it doesn't exist.
    • What it does: Creates an empty file at filename if it doesn't already exist.
  27. create_directory(directory)

    • directory: The directory to create if it doesn't exist.
    • What it does: Creates the specified directory if it doesn't already exist.
  28. send_http_request(url, method='GET', data=None)

    • url: The URL to send the request to.
    • method: The HTTP method to use ('GET' or 'POST').
    • data: The data to send (only used with 'POST').
    • What it does: Sends an HTTP request to the specified url using the specified method and data, returning the response.
  29. get_cpu_temperaturelinux()

    • What it does: Returns the CPU temperature (in Celsius) for Linux systems, or None if not available.
  30. calculate_square_root(number)

    • number: The number to calculate the square root of.
    • What it does: Returns the square root of number.
  31. track_mouse_position(callback)

    • callback: The function to call with the mouse's position as arguments.
    • What it does: Tracks the mouse position and calls callback() with the current (x, y) position.
  32. show_error_messagebox(message)

  • message: The error message to display.
  • What it does: Displays a message box with the title "Error" and the provided message.
  1. start_background_task(backtask)
  • backtask: The function to execute in the background.
  • What it does: Starts a separate thread to run the provided function without blocking the main program.
  1. nocrash(func)
  • func: The function to wrap in a crash-preventing decorator.
  • What it does: Executes the function safely, preventing unhandled exceptions from crashing the program.
  1. contains_swears_better(text)
  • text: The input string to check.
  • What it does: Returns True if the text contains any profane words; otherwise, False.
  1. filter_profanity_in_text(text)
  • text: The input string to filter.
  • What it does: Censors profanity in the provided text by replacing inappropriate words with asterisks.
  1. speech_to_text_with_filter()
  • No arguments.
  • What it does: Listens for speech input, converts it to text, and filters any profanity.
  1. get_system_uptime()
  • No arguments.
  • What it does: Returns the system uptime in seconds since the last boot.
  1. download_image_from_url(image_url, save_path)
  • image_url: The URL of the image to download.
  • save_path: The local path to save the image.
  • What it does: Downloads an image from the specified URL and saves it to the given path.
  1. monitor_new_files(directory, callback)
  • directory: The folder to monitor.
  • callback: The function to call when new files are detected.
  • What it does: Continuously checks the directory for new files and triggers the callback with the new file names.
  1. check_if_file_exists(file_path)
  • file_path: The path of the file to check.
  • What it does: Returns True if the file exists, otherwise False.
  1. check_internet_connection()
  • No arguments.
  • What it does: Pings a server (e.g., Google) to check for an active internet connection. Returns True if connected.
  1. create_web_server(directory, port=8000)
  • directory: The directory to serve files from.
  • port: The port number for the web server (default: 8000).
  • What it does: Starts a simple HTTP server that serves files from the specified directory.
  1. create_web_server(html, port=8000)
  • html: The HTML content to serve.
  • port: The port number for the web server (default: 8000).
  • What it does: Hosts a web server displaying the provided HTML content.
  1. uppercase_list(lst)
  • lst: A list of strings.
  • What it does: Converts each string in the list to uppercase and returns the modified list.
  1. remove_duplicates(lst)
  • lst: A list of items.
  • What it does: Removes duplicate elements from the list and returns a new list with unique items.
  1. find_index(lst, element)
  • lst: The list to search.
  • element: The element to find.
  • What it does: Returns the index of the element in the list, or -1 if not found.
  1. random_element(lst)
  • lst: A list of items.
  • What it does: Returns a random item from the list, or None if the list is empty.
  1. validate_email(email)
  • email: The email address to validate.
  • What it does: Returns True if the email matches a standard pattern; otherwise, False.
  1. split_into_chunks(text, chunk_size)
  • text: The string to split.
  • chunk_size: The size of each chunk.
  • What it does: Splits the text into smaller chunks of the specified size and returns a list of chunks.

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

jynpopmod-0.6.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

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

JynPopMod-0.6-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file jynpopmod-0.6.tar.gz.

File metadata

  • Download URL: jynpopmod-0.6.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for jynpopmod-0.6.tar.gz
Algorithm Hash digest
SHA256 72b6be09af0e75a38d22d46ce5cee1991779790c6498584b3c0b0ced71f6d3c1
MD5 81b2620966101eb1ac7c1c121f991ec3
BLAKE2b-256 feba897e0a277aad35a34b31f1c1099e5197c916175cd082469598afb261c9c4

See more details on using hashes here.

File details

Details for the file JynPopMod-0.6-py3-none-any.whl.

File metadata

  • Download URL: JynPopMod-0.6-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for JynPopMod-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b253c619b63a72776bf2c3e74ae4436bd08c05666f52e4d2115626e7b7743d66
MD5 72150fd6a58585f0851da5813bbf8a3b
BLAKE2b-256 e609c951fb909e88c0e089f1a22fbd630720b84441acb57e68456533a74959ff

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