Merge branch 'Dev-latest' of https://github.com/MikeTheWatchGuy/PySimpleGUI into Dev-latest

This commit is contained in:
PySimpleGUI 2019-10-27 09:07:22 -04:00
commit 7d9486eb27
11 changed files with 74 additions and 34 deletions

View File

@ -1,18 +0,0 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---
### Type of Issues (Enhancement, Error, Bug, Question)
### Operating System
### Python version
### PySimpleGUI Port and Version
### Code or partial code causing the problem

View File

@ -0,0 +1,35 @@
---
name: Issue Form - Must fill in this form with every new issue submitted
about: This form contains the information needed to help you solve your problem
title: "[ Enhancement/Bug/Question] My problem is..."
labels: ''
assignees: ''
---
### Type of Issues (Enhancement, Error, Bug, Question)
### Operating System
### Python version
### PySimpleGUI Port and Version
### Your Experience Levels In Months or Years
_________ Python programming experience
_________ Programming experience overall
_________ Have used another Python GUI Framework (tkiner, Qt, etc) previously (yes/no is fine)?
### You have completed these steps:
- [ ] Read instructions on how to file an Issue
- [ ] Searched through main docs http://www.PySimpleGUI.org for your problem
- [ ] Searched through the readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
- [ ] Looked for Demo Programs that are similar to your goal http://www.PySimpleGUI.com
- [ ] Note that there are also Demo Programs under each port on GitHub
- [ ] Run your program outside of your debugger (from a command line)
- [ ] Searched through Issues (open and closed) to see if already reported
### Code or partial code causing the problem

View File

@ -0,0 +1,16 @@
## Pull Request Instructions
**Pull requests are not currently accepted for for core code which are these files:**
* PySimpleGUI.py
* PySimpleGUIQt.py
* PySimpleGUIWx.py
* PySimpleGUIWeb.py
The bandwidth required to review and merge these changes simply isn't there. Because PySimpleGUI core files are a single file,
ALL submitted pull requests required a manual merge of the code.
If you have code that you believe will fix a problem in the core code, post it in the Issue that discusses the problem.
This has worked well in the past as it enables the community to see the proposed changes.
Pull Requests for the Demo Files are being accepted and are welcomed.

View File

@ -1,5 +1,8 @@
# PySimpleGUI-Chess A Chess Game Playback Program # PySimpleGUI-Chess A Chess Game Playback Program
![image](https://user-images.githubusercontent.com/46163555/64135781-4c58a600-cdba-11e9-968d-60ddfb4c8952.png)
## Introduction ## Introduction
This is the start of a front-end GUI for an AI engine that plays chess. It simply reads moves the a PGN file and steps through it showing each of the moves on the board. This is the start of a front-end GUI for an AI engine that plays chess. It simply reads moves the a PGN file and steps through it showing each of the moves on the board.
@ -10,4 +13,4 @@ Locate where the pacakge was installed and run the programs from that folder. Y
## Home Page (GitHub) ## Home Page (GitHub)
[www.PySimpleGUI.com](www.PySimpleGUI.com) [www.PySimpleGUI.com](www.PySimpleGUI.com)

View File

@ -21,8 +21,7 @@ graph = window['-GRAPH-']
# -------------- Magic code to integrate PyGame with tkinter ------- # -------------- Magic code to integrate PyGame with tkinter -------
embed = graph.TKCanvas embed = graph.TKCanvas
os.environ['SDL_WINDOWID'] = str(embed.winfo_id()) os.environ['SDL_WINDOWID'] = str(embed.winfo_id())
# change this to 'x11' to make it work on Linux os.environ['SDL_VIDEODRIVER'] = 'windib' # change this to 'x11' to make it work on Linux
os.environ['SDL_VIDEODRIVER'] = 'windib'
# ----------------------------- PyGame Code ----------------------------- # ----------------------------- PyGame Code -----------------------------

View File

@ -47,7 +47,7 @@ def HowDoI():
history_offset = 0 history_offset = 0
while True: while True:
(button, value) = window.Read() (button, value) = window.Read()
if button is 'SEND': if button == 'SEND':
query = value['query'].rstrip() query = value['query'].rstrip()
print(query) print(query)
QueryHowDoI(query, value['Num Answers'], value['full text']) # send the string to HowDoI QueryHowDoI(query, value['Num Answers'], value['full text']) # send the string to HowDoI
@ -55,7 +55,7 @@ def HowDoI():
history_offset = len(command_history)-1 history_offset = len(command_history)-1
window.FindElement('query').Update('') # manually clear input because keyboard events blocks clear window.FindElement('query').Update('') # manually clear input because keyboard events blocks clear
window.FindElement('history').Update('\n'.join(command_history[-3:])) window.FindElement('history').Update('\n'.join(command_history[-3:]))
elif button is None or button is 'EXIT': # if exit button or closed using X elif button in (None, 'EXIT'): # if exit button or closed using X
break break
elif 'Up' in button and len(command_history): # scroll back in history elif 'Up' in button and len(command_history): # scroll back in history
command = command_history[history_offset] command = command_history[history_offset]

View File

@ -14,7 +14,7 @@ import time
of the timer that is displayed comes from the system timer, time.time(). This guarantees an of the timer that is displayed comes from the system timer, time.time(). This guarantees an
accurate time value is displayed regardless of the accuracy of the PySimpleGUI timer tick. If accurate time value is displayed regardless of the accuracy of the PySimpleGUI timer tick. If
this design were not used, then the time value displayed would slowly drift by the amount of time this design were not used, then the time value displayed would slowly drift by the amount of time
it takes to execute the PySimpleGUI read and update calls (not good!) it takes to execute the PySimpleGUI read and update calls (not good!)
NOTE - you will get a warning message printed when you exit using exit button. NOTE - you will get a warning message printed when you exit using exit button.
It will look something like: invalid command name \"1616802625480StopMove\" It will look something like: invalid command name \"1616802625480StopMove\"
@ -48,9 +48,9 @@ while (True):
if event == 'button': if event == 'button':
event = window.FindElement(event).GetText() event = window.FindElement(event).GetText()
# --------- Do Button Operations -------- # --------- Do Button Operations --------
if event is None or event == 'Exit': # ALWAYS give a way out of program if event in (None, 'Exit'): # ALWAYS give a way out of program
break break
if event is 'Reset': if event == 'Reset':
start_time = int(round(time.time() * 100)) start_time = int(round(time.time() * 100))
current_time = 0 current_time = 0
paused_time = start_time paused_time = start_time

View File

@ -30,9 +30,9 @@ while (True):
if event == 'button': if event == 'button':
event = window.FindElement(event).GetText() event = window.FindElement(event).GetText()
# --------- Do Button Operations -------- # --------- Do Button Operations --------
if event is None or event == 'Exit': # ALWAYS give a way out of program if event in (None, 'Exit'): # ALWAYS give a way out of program
break break
if event is 'Reset': if event == 'Reset':
start_time = int(round(time.time() * 100)) start_time = int(round(time.time() * 100))
current_time = 0 current_time = 0
paused_time = start_time paused_time = start_time

View File

@ -5,6 +5,13 @@
# PySimpleGUI openCV YOLO Deep Learning # PySimpleGUI openCV YOLO Deep Learning
![SNAG-0360](https://user-images.githubusercontent.com/13696193/58116963-93d07300-7bcb-11e9-8402-142913710b82.jpg)
![YOLO May 21](https://user-images.githubusercontent.com/13696193/58117189-017c9f00-7bcc-11e9-9569-c65775d15559.gif)
## Running the Demos ## Running the Demos
You will need to pip install openCV and PySimpleGUI You will need to pip install openCV and PySimpleGUI

View File

@ -25,7 +25,7 @@ def Launcher():
# ---===--- Loop taking in user input --- # # ---===--- Loop taking in user input --- #
while True: while True:
(button, values) = window.Read() (button, values) = window.Read()
if button is 'Quit' or button is None: if button in ('Quit', None):
break # exit button clicked break # exit button clicked
source_file = values['_sourcefile_'] source_file = values['_sourcefile_']
@ -40,7 +40,7 @@ def Launcher():
file_to_remove = os.path.join(source_path, source_filename[:-3]+'.spec') file_to_remove = os.path.join(source_path, source_filename[:-3]+'.spec')
command_line = 'pyinstaller -wF "{}" {} {} {} {}'.format(source_file, icon_option, workpath_option, dispath_option, specpath_option) command_line = 'pyinstaller -wF "{}" {} {} {} {}'.format(source_file, icon_option, workpath_option, dispath_option, specpath_option)
if button is 'Make EXE': if button == 'Make EXE':
out='' out=''
try: try:
print(command_line) print(command_line)

View File

@ -1,4 +1,4 @@
# PySimpleGUI-HowDoI # PySimpleGUI-exemaker
## Introduction ## Introduction
This package contains a GUI front-end to PyInstaller. Use this tool to create EXE files from your python programs This package contains a GUI front-end to PyInstaller. Use this tool to create EXE files from your python programs
@ -6,11 +6,9 @@ This package contains a GUI front-end to PyInstaller. Use this tool to create E
![snag-0086](https://user-images.githubusercontent.com/13696193/46968655-c2103200-d081-11e8-926f-d5f977e726f3.jpg) ![snag-0086](https://user-images.githubusercontent.com/13696193/46968655-c2103200-d081-11e8-926f-d5f977e726f3.jpg)
## Installing ## Installing
When you install PySimpleGUI-HowDoI, it will install the other components that it requires. To install, on windows, type this into a command prompt: When you install PySimpleGUI-exemaker, it will install the other components that it requires. To install, on windows, type this into a command prompt:
pip install pysimplegui-exemaker pip install pysimplegui-exemaker