Skip to main content

Python module for creating menus

Project description

Kpick

Python module for creating menus.

Установка

Для установки используйте следующую команду:

pip install Kpick

Basic Example

from Kpick import create_menu

menu_options = ['Option 1', 'Option 2', 'Option 3']
selection = create_menu(menu_options)

print(f'Вы выбрали: {selection_index}')

Advanced Example

import Kpick  

class Menu():
    def __init__(self) -> None:
        self.options = ["WireLessAttacl", "Wifi", "Hacking"]
        self.selected_index = None

    def main_menu(self):
        self.selected_index = Kpick.run_menu(self.options)

        if self.selected_index == 0:
            self.first()
        elif self.selected_index == 1:
            self.second()
        elif self.selected_index == 2:
            print("You selected Option 3.")

    def first(self):
        opt2 = ["Jammer", "Flood", "WPA PIN HACK","exit"]
        slt = Kpick.run_menu(opt2)
        
        if slt == 0:
            return(self.first())
        elif slt == 1:
            return(self.first())
        elif slt == 2:
            return(self.first())
        elif slt == 3:
            return(self.main_menu())

    def second(self):
        opt3 = ["Monitoring Mode", "Scan Networks", "exit"]
        slt2 = Kpick.run_menu(opt3)

        if slt2 == 0:
            return(self.second())
        elif slt2 == 1:
            return(self.second())
        elif slt2 == 2:
            return(self.main_menu())

menu = Menu()
menu.main_menu()

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

kpickmenu-1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

Kpickmenu-1.0-cp312-cp312-win_amd64.whl (7.5 kB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file kpickmenu-1.0.tar.gz.

File metadata

  • Download URL: kpickmenu-1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for kpickmenu-1.0.tar.gz
Algorithm Hash digest
SHA256 cfab79914be76199e03ce4b3e877654f417c4b53b7dec749f0c3e99965c72a06
MD5 ea78282b7bcc26170553da0607eb30e3
BLAKE2b-256 da19e53633156db67c9a4a60134c002dc64f822eaa91011aaa3cc5bb59352d7c

See more details on using hashes here.

File details

Details for the file Kpickmenu-1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: Kpickmenu-1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for Kpickmenu-1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b0b0c04f55d2793cf5b9353020aa4ab5a1fdd5ac3f5cfb30395af315d8aa6a9f
MD5 2da984cdde481dcc08ddc05981b790a8
BLAKE2b-256 707624cda82fa7c7247d2bf7ae0cb44533ceef1dc0a7d1318898f303556b23b4

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