Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. menator01

    Yet another simple basic tkinter calculator

    Can use either button or keyboard. esc will clear and either return key will calculate. Very few bug checks. So may run into one here and there. import tkinter as tk from decimal import Decimal class Window(tk.Tk): ''' Class creates the display window ''' def __init__(self)...
  2. menator01

    Bingo with tkinter and python

    Latest project finished. Could be optimized some. import tkinter as tk from random import choice, choices from itertools import groupby class Window(): def __init__(self, parent): parent.columnconfigure(0, weight=1) parent.rowconfigure(0, weight=0)...
  3. menator01

    Python Helping someone with a pygame project

    I've been helping someone with their project and decided to give it my own touch by using classes and implementing a scoring system for the game among other things. Anyhow I've seem to hit a snag. I'm using pygame's collide group to detect collision and for some reason it will collide even if...
  4. menator01

    Latest game with pygame

    Was helping someone with their project and decided to have my own go at it. import pygame from pygame import mixer from random import randint, choice, random, shuffle, randrange import math from pathlib import Path import os pygame.init() mixer.init() path = Path(__file__).parent # Set width...
  5. menator01

    Playing around with tkinter and bubble popups

    Can't seem to get more than one at a time to popup but, all do popup after the one before fades. Any thoughts welcome. import tkinter as tk from random import randrange, uniform, choice from time import time class Bubble(tk.Tk): ''' Class creates popup window ''' def __init__(self...
  6. menator01

    Tkinter overlay

    Was helping someone with their project for a tkinter overlay. It's just a countdown time with an alarm after reaching 10 seconds. Haven't added a drag feature yet. Any thoughts? Can now drag widget around desktop Key binds are shift+r = reset pause = stop/start counter esc = exit program...
  7. menator01

    Version 2 of my weather app.

    This version should work world wide. May have some bugs when it comes to the wind direction arrow. I've tried testing it and the rain. To try it create a virtual environment and use pip to run the requirements.txt to install needed modules. You can download the zip file from my-python to get...
  8. menator01

    Movie Search

    Just re-wrote my pyside movie search script. If anyone would like to give it a try, you can download from this link or visit my-python.org. I have a few other scripts there as well. Enjoy
  9. menator01

    Python Testing pygame resolution on different monitors

    As the title says. Was just wondering if I could get some feedback on where the cyan square is placed on various screens. On mine it's where I would expect. If the window is too big for the window close, pressing any key will close the window I'll post the code and image of my screen import...
  10. menator01

    Pygame Buttons

    Been playing around with creating buttons with pygame and thought I would share. btn_class.py import pygame # Inialize pygame font pygame.font.init() # Create a sprite group btn_sprites = pygame.sprite.Group() class Button(pygame.sprite.Sprite): def __init__(self, x=0, y=0...
  11. menator01

    Latest Project - querying steam api

    Started a python project for game search on steam. It's in no way finished as I still need to finish the detail part, the search bar, and continue working on the bugs I find. Will probably continue on optimizing the code as well. There are parts that can be done better. Just trying to get...
  12. menator01

    Console weather display

    Although there are better ways to do this but, just playing around. :) import asyncio from bs4 import BeautifulSoup import requests from datetime import datetime, timedelta import sys USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)...
  13. menator01

    Kivy Example

    My first test kivy project. It's simple. The only thing I can't seem to get to work is the video thumbnail from web. If it's in the local directory it works. You can learn more about kivy from here. test.py from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager...
  14. menator01

    Random Quote

    Gets a random quote from internet. Tkinter and python import requests import json import tkinter as tk root = tk.Tk() root.title('Random quote of the day') def get_quote(): frame = tk.Frame(root) frame.grid(column=0, row=1, sticky='news', padx=1) url =...
  15. menator01

    Simple tkinter window using pygame sound mixer

    Simple tkinter window using images and pygame sound mixer. You will need to download or create a wav file and name it click.wav or edit accordingly. # Do the imports import tkinter as tk import pygame # Inialize pygame mixer pygame.mixer.init() root = tk.Tk() root.geometry('400x200+350+350')...
  16. menator01

    Color name and hex value from web

    Not posted in a while so, here is a quick tkinter app for getting a hex value for color. Enjoy. import tkinter as tk from tkinter import ttk from bs4 import BeautifulSoup import requests class Data: ''' Data queries the web for color hex and names from the web parses the page and...
  17. menator01

    Simple pygame rain animation

    Little project was playing around with. You can download the image and sound files from github requires pillow # Do the imports import pygame import os from random import random, randint from PIL import Image # Initiate pygame pygame.init() # Path to executing script path =...
  18. menator01

    Python PyQt5 - Python 3.12 Music Player - Part 5

    In the final part of the tutorial we will add some dynamic text and images to our app In our imports add from PyQt5.QtGui import QPixmap Add the class class Data: def __init__(self): pass def data(self, player): info = {} info['artist'] =...
  19. menator01

    Python PyQt5 - Python 3.12 Music Player - Part 4

    In this tutorial we will be adding functionality to our buttons. Buttons: Get Audio - Used to get our music file Clear List - Clear the playlist Play/Pause - Will play or pause our music player Prev - Go back to previous track Next - Go to nest track Stop - Stop the music player Exit - Exit the...
  20. menator01

    Pyqt6 Tutorial

    I started a python and pyqt6 tutorial on making a music player but, I have ran into a snag. PyQt6 has had an overhaul and I'm not able to get it to play any music files among a couple other library issues. Seems PyQt6 doesn't support openssl3 yet. So I'm going to rename the title to PyQt5 Music...
Back
Top Bottom