Merge pull request #5998 from PySimpleGUI/Dev-latest

Added drop_whitespace to the docstring for popup.  Added popup_error_…
This commit is contained in:
PySimpleGUI 2022-10-31 13:42:42 -04:00 committed by GitHub
commit 4a43ca9ff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 47 additions and 36 deletions

View File

@ -16663,6 +16663,7 @@ Parameter Descriptions:
| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
| bool | right_justify_buttons | If True then the buttons will be "pushed" to the right side of the Window |
| str | button_justification | Speficies if buttons should be left, right or centered. Default is left justified |
| bool | drop_whitespace | Controls is whitespace should be removed when wrapping text. Parameter is passed to textwrap.fill. Default is to drop whitespace (so popup remains backward compatible) |
| str or None | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X
Show animation one frame at a time. This function has its own internal clocking meaning you can call it at any frequency
@ -16852,6 +16853,26 @@ Parameter Descriptions:
| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X
Show an error message and as many additoinal lines of messages as you want.
Will show the same error window as PySimpleGUI uses internally. Has a button to
take the user to the line of code you called this popup from.
If you include the Exception information in your messages, then it will be parsed and additional information
will be in the window about such as the specific line the error itself occurred on.
```
popup_error_with_traceback(title,
messages,
emoji = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| str | title | The title that will be shown in the popup's titlebar and in the first line of the window |
| bytes | emoji | An optional BASE64 Encoded image to shows in the error window |
| *Any | messages | A variable number of lines of messages you wish to show your user |
Display a calendar window, get the user's choice, return as a tuple (mon, day, year)
```
@ -17720,6 +17741,7 @@ Parameter Descriptions:
| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
| bool | right_justify_buttons | If True then the buttons will be "pushed" to the right side of the Window |
| str | button_justification | Speficies if buttons should be left, right or centered. Default is left justified |
| bool | drop_whitespace | Controls is whitespace should be removed when wrapping text. Parameter is passed to textwrap.fill. Default is to drop whitespace (so popup remains backward compatible) |
| str or None | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X
Show animation one frame at a time. This function has its own internal clocking meaning you can call it at any frequency

View File

@ -1627,6 +1627,7 @@ Parameter Descriptions:
| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
| bool | right_justify_buttons | If True then the buttons will be "pushed" to the right side of the Window |
| str | button_justification | Speficies if buttons should be left, right or centered. Default is left justified |
| bool | drop_whitespace | Controls is whitespace should be removed when wrapping text. Parameter is passed to textwrap.fill. Default is to drop whitespace (so popup remains backward compatible) |
| str or None | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X
The other output Popups are variations on parameters. Usually the button_type parameter is the primary one changed.
@ -3799,17 +3800,6 @@ Your Window's layout is composed of lists of Elements. In addition to elements,
| vbottom | Vertically align element or row of elements to the bottom of the row |
| vcenter | Vertically align element or row of elements to the center of the row |
- Text
- Single Line Input
- Buttons including these types:
- File Browse
- Folder Browse
- Calendar picker
- Date Chooser
- Read window
- Close window ("Button" & all shortcut buttons)
- Realtime
## Keys
***Keys are a super important concept to understand in PySimpleGUI.***

View File

@ -2058,20 +2058,6 @@ Your Window's layout is composed of lists of Elements. In addition to elements,
- Text
- Single Line Input
- Buttons including these types:
- File Browse
- Folder Browse
- Calendar picker
- Date Chooser
- Read window
- Close window ("Button" & all shortcut buttons)
- Realtime
## Keys
***Keys are a super important concept to understand in PySimpleGUI.***

View File

@ -3341,6 +3341,7 @@ Don't use these. They are here in case you're searching for them. Instead use
<!-- <+func.popup_auto_close+> -->
<!-- <+func.popup_cancel+> -->
<!-- <+func.popup_error+> -->
<!-- <+func.popup_error_with_traceback+> -->
<!-- <+func.popup_get_date+> -->
<!-- <+func.popup_get_file+> -->
<!-- <+func.popup_get_folder+> -->

View File

@ -16663,6 +16663,7 @@ Parameter Descriptions:
| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
| bool | right_justify_buttons | If True then the buttons will be "pushed" to the right side of the Window |
| str | button_justification | Speficies if buttons should be left, right or centered. Default is left justified |
| bool | drop_whitespace | Controls is whitespace should be removed when wrapping text. Parameter is passed to textwrap.fill. Default is to drop whitespace (so popup remains backward compatible) |
| str or None | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X
Show animation one frame at a time. This function has its own internal clocking meaning you can call it at any frequency
@ -16852,6 +16853,26 @@ Parameter Descriptions:
| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X
Show an error message and as many additoinal lines of messages as you want.
Will show the same error window as PySimpleGUI uses internally. Has a button to
take the user to the line of code you called this popup from.
If you include the Exception information in your messages, then it will be parsed and additional information
will be in the window about such as the specific line the error itself occurred on.
```
popup_error_with_traceback(title,
messages,
emoji = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| str | title | The title that will be shown in the popup's titlebar and in the first line of the window |
| bytes | emoji | An optional BASE64 Encoded image to shows in the error window |
| *Any | messages | A variable number of lines of messages you wish to show your user |
Display a calendar window, get the user's choice, return as a tuple (mon, day, year)
```
@ -17720,6 +17741,7 @@ Parameter Descriptions:
| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
| bool | right_justify_buttons | If True then the buttons will be "pushed" to the right side of the Window |
| str | button_justification | Speficies if buttons should be left, right or centered. Default is left justified |
| bool | drop_whitespace | Controls is whitespace should be removed when wrapping text. Parameter is passed to textwrap.fill. Default is to drop whitespace (so popup remains backward compatible) |
| str or None | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X
Show animation one frame at a time. This function has its own internal clocking meaning you can call it at any frequency

View File

@ -1627,6 +1627,7 @@ Parameter Descriptions:
| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
| bool | right_justify_buttons | If True then the buttons will be "pushed" to the right side of the Window |
| str | button_justification | Speficies if buttons should be left, right or centered. Default is left justified |
| bool | drop_whitespace | Controls is whitespace should be removed when wrapping text. Parameter is passed to textwrap.fill. Default is to drop whitespace (so popup remains backward compatible) |
| str or None | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X
The other output Popups are variations on parameters. Usually the button_type parameter is the primary one changed.
@ -3799,17 +3800,6 @@ Your Window's layout is composed of lists of Elements. In addition to elements,
| vbottom | Vertically align element or row of elements to the bottom of the row |
| vcenter | Vertically align element or row of elements to the center of the row |
- Text
- Single Line Input
- Buttons including these types:
- File Browse
- Folder Browse
- Calendar picker
- Date Chooser
- Read window
- Close window ("Button" & all shortcut buttons)
- Realtime
## Keys
***Keys are a super important concept to understand in PySimpleGUI.***