Skip to content

Instantly share code, notes, and snippets.

View Diapolo10's full-sized avatar
🏠
Working from home

Lari Liuhamo Diapolo10

🏠
Working from home
View GitHub Profile
@Diapolo10
Diapolo10 / menu_launcher.py
Created May 22, 2016 19:15 — forked from abishur/menu_launcher.py
A simple menu system using python for the Terminal (Framebufer)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Topmenu and the submenus are based of the example found at this location http://blog.skeltonnetworks.com/2010/03/python-curses-custom-menu/
# The rest of the work was done by Matthew Bennett and he requests you keep these two mentions when you reuse the code :-)
# Basic code refactoring by Andrew Scheller
from time import sleep
import curses, os #curses is the interface for capturing key presses on the menu, os launches the files
screen = curses.initscr() #initializes a new window for capturing key presses
curses.noecho() # Disables automatic echoing of key presses (prevents program from input each key twice)
@Diapolo10
Diapolo10 / hangman.py
Last active September 15, 2024 17:35 — forked from sheebydeeby/hangman.py
from getpass import getpass
def print_line(line_count: int = 1) -> None:
"""Print a number of newlines."""
print('\n' * line_count, end='')
def ask_guess(used: list[str], answer: list[str]) -> str:
while True: