Windows for Python
Project description
Python-Windows
Code:
import random
from time import sleep
from PyWindows.PyWindows import Window, types
def randRect(window):
x = random.randint(0, 590)
y = random.randint(0, 430)
r = random.randint(0, 255)
g = random.randint(0, 255)
b = random.randint(0, 255)
window.createRect(x, y, 50, 50, r, g, b)
sleep(0.05)
window = Window(800, 250, 640, 480, types.openGL)
renderer = window.getRenderer()
window.create()
quit = False
while not quit:
# Loop and Exit
loop = window.loop()
if loop == 256:
window.quit()
quit = True
randRect(window)
Create Message Boxes
Code:
from PyWindows.PyWindows import types, createMessageBox
myMsg = createMessageBox("Hello World", "Do you accept?", types.question)
if myMsg == 1:
print("Yay you accepted")
createMessageBox("Yay", "You Accepted", types.info)
elif myMsg == 2:
print("How dare you decline")
createMessageBox("Very Bad", "How dare you decline", types.warning)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyWindows-1.0.tar.gz
(899.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
PyWindows-1.0-py3-none-any.whl
(900.8 kB
view details)
File details
Details for the file PyWindows-1.0.tar.gz.
File metadata
- Download URL: PyWindows-1.0.tar.gz
- Upload date:
- Size: 899.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
346de05e156cfa9a30ab0c3c2da5a9313d0c49a86616fc1eeeca168f4029e6b4
|
|
| MD5 |
c46eeb301f2edad1b209fc135477bad9
|
|
| BLAKE2b-256 |
f98d791841bb90eb7ac9e0138f7e62424d57c1c3d75a7017648de8dec8c204da
|
File details
Details for the file PyWindows-1.0-py3-none-any.whl.
File metadata
- Download URL: PyWindows-1.0-py3-none-any.whl
- Upload date:
- Size: 900.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c193e9a20c5d09523b55f34f43edf6e36ee742581d3fbbfed2d15e1fd54c23a
|
|
| MD5 |
6d86a866980bf643876b4ab19a18c200
|
|
| BLAKE2b-256 |
200aadaa2e4d2dfcb9e467959d209af92f1918aaa7f04e5ab6b70062cf6d50e8
|