PySimpleGUI | actively developed & supported .

 by   PySimpleGUI Python Version: 4.60.5 License: LGPL-3.0

kandi X-RAY | PySimpleGUI Summary

kandi X-RAY | PySimpleGUI Summary

PySimpleGUI is a Python library typically used in Telecommunications, Media, Media, Entertainment applications. PySimpleGUI has no bugs, it has no vulnerabilities, it has build file available, it has a Weak Copyleft License and it has medium support. You can install using 'pip install PySimpleGUI' or download it from GitHub, GitLab, PyPI.

Transforms the tkinter, Qt, WxPython, and Remi (browser-based) GUI frameworks into a simpler interface. The window definition is simplified by using Python core data types understood by beginners (lists and dictionaries). Further simplification happens by changing event handling from a callback-based model to a message passing one. Your code is not required to have an object oriented architecture which makes the package usable by a larger audience. While the architecture is simple to understand, it does not necessarily limit you to only simple problems. Some programs are not well-suited for PySimpleGUI however. By definition, PySimpleGUI implements a subset of the underlying GUI frameworks' capabilities. It's difficult to define exactly which programs are well suited for PySimpleGUI and which are not. It depends on the details of your program. Duplicating Excel in every detail is an example of something not well suited for PySimpleGUI. I could use a coffee! It fuels consultants, editors, domain registration and so many other things required for PySimpleGUI to be a thriving project. Every donation helps, and help is needed and appreciated.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              PySimpleGUI has a medium active ecosystem.
              It has 11712 star(s) with 1735 fork(s). There are 226 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 705 open issues and 2623 have been closed. On average issues are closed in 69 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of PySimpleGUI is 4.60.5

            kandi-Quality Quality

              PySimpleGUI has 0 bugs and 0 code smells.

            kandi-Security Security

              PySimpleGUI has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              PySimpleGUI code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              PySimpleGUI is licensed under the LGPL-3.0 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              PySimpleGUI releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed PySimpleGUI and discovered the below as its top functions. This is intended to give you an instant insight into PySimpleGUI implemented functionality, and help decide if they suit your requirements.
            • Pack a form into a tkinter .
            • Creates a popup color dialog .
            • Chooses a color dialog .
            • Set options .
            • Create a mini - GUI .
            • Initialize the widget .
            • Builds the results for a subform .
            • Set options options .
            • Displays a file dialog .
            • Initialize global pysimplegui settings .
            Get all kandi verified functions for this library.

            PySimpleGUI Key Features

            No Key Features are available at this moment for PySimpleGUI.

            PySimpleGUI Examples and Code Snippets

            The Elements-Pre-Defined Buttons (use in your layout)
            Pythondot img1Lines of Code : 429dot img1License : Weak Copyleft (LGPL-3.0)
            copy iconCopy
            CalendarButton(button_text,
                target = (555666777, -1),
                close_when_date_chosen = True,
                default_date_m_d_y = (None, None, None),
                image_filename = None,
                image_data = None,
                image_size = (None, None),
                image_subsample = None,
                 
            The Elements-Popup Not PEP8 Compliant names
            Pythondot img2Lines of Code : 399dot img2License : Weak Copyleft (LGPL-3.0)
            copy iconCopy
            Popup(args=*<1 or N object>,
                title = None,
                button_color = None,
                background_color = None,
                text_color = None,
                button_type = 0,
                auto_close = False,
                auto_close_duration = None,
                custom_text = (None, None),
                non_blo  
            The Elements-Popups PEP8 Versions
            Pythondot img3Lines of Code : 356dot img3License : Weak Copyleft (LGPL-3.0)
            copy iconCopy
            popup(args=*<1 or N object>,
                title = None,
                button_color = None,
                background_color = None,
                text_color = None,
                button_type = 0,
                auto_close = False,
                auto_close_duration = None,
                custom_text = (None, None),
                non_blo  
            Dynamically Updating an Element in a Multiple Window Setup
            Pythondot img4Lines of Code : 52dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            import PySimpleGUI as sg
            
            def popup():
                sg.theme('DarkBlue4')
                layout = [
                    [sg.Text("You name"), sg.Input("", key='Name')],
                    [sg.Text("", size=0, key='Test')],
                    [sg.Button('Save'), sg.Button('Auto Fill'), sg.Butt
            Is there a way to make the output text copyable (Python PySimpleGUI)
            Pythondot img5Lines of Code : 2dot img5License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            sg.Input(size=(10,1), disabled=True, text_color=sg.theme_text_color(), disabled_readonly_background_color=sg.theme_text_element_background_color(), key='-OUTPUT-')
            
            PySimpleGui table row click event
            Pythondot img6Lines of Code : 77dot img6License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            enable_click_events=True
            
            enable_events=True
            
            if event == "Submit" or event == sg.WIN_CLOSED:
                break
            elif event == "hello":
                data_selected = [nameList[row] for row in values[event]]
               
            How do I add elements horizontally instead of vertically in PySimpleGUI?
            Pythondot img7Lines of Code : 14dot img7License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            layout = [
                [element1],
                [sg.HSeparator(pad=(500,0))],
                [element2],
            ]
            
            layout = [
                [element1, sg.HSeparator(pad=(500,0)), element2],
            ]
            
            layout = [
                [sg.Column(left_part, vertic
            Update table values after event PySimpleGUI
            Pythondot img8Lines of Code : 37dot img8License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            import PySimpleGUI as sg
            from database import db_querys as db
            
            def delete_record(table: list, row: list, index: int) -> None:
                db.delete_db_item(table="records_data", key=row[0])
                del table[index]
            
            
            window = sg.Window("Vinyl Catal
            copy iconCopy
            window['myimg'].update(
                data=ImageTk.PhotoImage(img),
            )
            
            import PySimpleGUI as sg
            from PIL import Image, ImageTk #Image for open, ImageTk for display
            
            layout = [
                [sg.Button("Show")],
                [sg.Image(key="myimg
            hide_row() in pysimplegui work only one time?
            Pythondot img10Lines of Code : 42dot img10License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            element.Key = str(element.Key) + str(self.UniqueKeyCounter)
            
            'new_raw', 're', 'new_raw0', 're1', 'new_raw2', 're3',  'new_raw4', 're5', ...
            
            >>> window.key_dict
            {
            ...
             'new_raw': ,
             

            Community Discussions

            QUESTION

            Specifying folders to be included in pyinstaller exe
            Asked 2022-Mar-31 at 13:13

            So I am writing a test python program with PySimpleGui, and it looks like this:

            ...

            ANSWER

            Answered 2022-Mar-31 at 13:13

            So I did try using base64 encoding for the image, but there was a lot of it and it made my code look a bit wacky, so what I ended up doing was using --add-data "files/icon.ico;files" to package the icon with the exe, and this ended up working along with this answer

            Source https://stackoverflow.com/questions/71654636

            QUESTION

            hide_row() in pysimplegui work only one time?
            Asked 2022-Mar-30 at 08:49

            I use hide_row() element or feature in my code to hide row but it work only one time when i connected to Retreat button or Retreat key, when i clicked again or in the 2nd time it's not work (see the code or try it to understand what i mean) how make it work continuously not only one time or is there another way to undo or delete section or row.

            ...

            ANSWER

            Answered 2022-Mar-30 at 08:49

            It is caused by new element with duplicate key when add new row again, so it wll always find the first element when you call window[new_key].

            Should use different key for different element when you create a new element.

            Key of new element will be replace by

            Source https://stackoverflow.com/questions/71663320

            QUESTION

            Set multiline text from a file online to a text element in pysimplegui
            Asked 2022-Mar-26 at 15:34

            So I have this program that grabs a text file from the internet, reads it and then set the decoded text to an element.

            ...

            ANSWER

            Answered 2022-Mar-25 at 05:52

            You're decoding every line then calling .update() on the text element for each line. Instead:

            Source https://stackoverflow.com/questions/71612489

            QUESTION

            Python window doesn't close after video ended
            Asked 2022-Feb-26 at 13:41

            I'm currently making a code that will do various things such as controlling motors etc but at one point I need to code to popup a video on vlc and exit the window when the video ended, the problem is that the window currently stays after the video ended and the whole code just freezes and I can't do anything past the video

            I tried various things such as calculating the video length and call a self.close() when the timer hit but still the same thing

            I also tried adding "--play-and-exit" to the vlc parameters but it still won't budge...

            Here's the code if someone knows how to do it properly !

            ...

            ANSWER

            Answered 2022-Feb-26 at 13:41

            I have found the solution. This is the new main loop:

            Source https://stackoverflow.com/questions/71275864

            QUESTION

            PySimpleGUI tables - unable to create list of lists
            Asked 2022-Feb-03 at 12:03

            I'm unable to use PySimpleGUI.Table because of my inability to create list of lists, please see my code:

            ...

            ANSWER

            Answered 2022-Feb-03 at 12:03

            This exception maybe caused by the code you not show here.

            For example, in following code, [sg.Table(table_list, headings=table_headings)] come with [sg.Text('Hellow World')] at next line.

            Source https://stackoverflow.com/questions/70970061

            QUESTION

            Rendering HTML in PySimpleGUI?
            Asked 2022-Jan-30 at 07:26

            Does anyone know if it's possible to have PySimpleGUI render HTML?

            I am not after a full-blown browser, just an HTML viewer that lives in a PySimpleGUI window.

            I know tkinter has a module called tk_html_widgets, I'm also investigating what webview module can do.

            I know it is possible with Qt as PySide comes with a widget of this nature, though I'm really enjoying PySimpleGUI.

            I was just wondering if anyone has a suggestion to achieve this.

            For example, could I somehow import a TK widget such as tk_html_widgets into PySimpleGUI.

            Maybe I'm missing something and pysimpleGUI already has an HTML element that I am unaware of.

            ...

            ANSWER

            Answered 2022-Jan-30 at 02:41

            It looks like you can do this with tkhtmlview widgets. I think the key is to get a handle to the tk root node using the TKroot attribute of the PySimpleGUI Window. You should be able to draw most tk widgets using that handle. Here's a simple example that draws an HTML label in a PySimpleGUI window:

            Source https://stackoverflow.com/questions/70910389

            QUESTION

            pysimpleGUI - creating a thread on the fly
            Asked 2022-Jan-07 at 16:12

            I have created a GUI with PysimpleGUI that has multiple buttons, the intentionss is that users click on a button and continue to work on othe task while the action on the first clicked button is running, and when the action of the clicked button finished, then the thread exits (distroys the current thread),

            the code is throwing : RuntimeError: main thread is not in main loop

            Can someone help me create the _thread.start_new_thread process and incorporated to the main loop or maybe a solution to avoid RuntimeError

            for threading i am using : _thread

            the code:

            ...

            ANSWER

            Answered 2022-Jan-07 at 16:12

            Use library schedule in your thread, not in main loop, also no GUI update in your thread.

            Maybe code like this,

            Source https://stackoverflow.com/questions/70623242

            QUESTION

            SimpleGUI displaying mpf.plot in canvas
            Asked 2021-Dec-29 at 04:35

            The code below will embed the Matplotlib toolbar into an application and the plot to a specific canvas, but I would like to embed my mpf.plot instead of my plt.plot. the code works well but it will not produce what is intended, any advise please

            ...

            ANSWER

            Answered 2021-Dec-29 at 02:55

            Add option returnfig=True to mpf.plot to have it return fig, axlist.

            Source https://stackoverflow.com/questions/70514468

            QUESTION

            Pyinstaller opens Stockfish in console
            Asked 2021-Dec-14 at 13:07

            I have made a GUI (using PySimpleGUI) where you can play against Stockfish (I used python-chess module). I make an .exe-file using Pyinstaller --noconsole, but when i run it, it opens Stockfish in a console. When I run it form source, in PyCharm, Stockfish runs silently in the background.

            The relevant lines of code are (I guess):

            engine = chess.engine.SimpleEngine.popen_uci(engine_filename, shell = False)

            and, a bit later,

            best_move = engine.play(board, chess.engine.Limit(depth=20)).move

            Any advice on how I can make Stockfish run silently in the background also form the .exe-file?

            ...

            ANSWER

            Answered 2021-Dec-14 at 13:07

            Define your engine like below.

            Source https://stackoverflow.com/questions/70347075

            QUESTION

            How do I combine my python GUI with my python code
            Asked 2021-Dec-02 at 12:20

            so I've made a script with Selenium that inputs into a form details from a CSV. The goal is to make a GUI now and I've done that too , the tricky part now that I can't wrap my head around is the combining of the two.

            My GUI:

            ...

            ANSWER

            Answered 2021-Dec-02 at 11:09

            When Submit button clicked, then go your my script. It maybe like this

            Source https://stackoverflow.com/questions/70183613

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install PySimpleGUI

            You can install using 'pip install PySimpleGUI' or download it from GitHub, GitLab, PyPI.
            You can use PySimpleGUI like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            Your first stop should be the documentation and demo programs. If you still have a question or need help... no problem... help is available to you, at no cost. Simply file an Issue on the PySimpleGUI GitHub repo and you'll get help. Nearly all software companies have a form that accompanies bug reports. It's not a bad trade... fill in the form, get free software support. This information helps get you an answer efficiently. In addition to requesting information such as the version numbers of PySimpleGUI and underlying GUI frameworks, you're also given a checklist of items that may help you solve your problem. Please fill in the form. It may feel pointless to you. It may feel painful, despite it taking just a moment. It helps get you a solution faster. If it wasn't useful and necessary information to help you get a speedy reply and fix, you wouldn't be asked to fill it out. "Help me help you".
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install PySimpleGUI

          • CLONE
          • HTTPS

            https://github.com/PySimpleGUI/PySimpleGUI.git

          • CLI

            gh repo clone PySimpleGUI/PySimpleGUI

          • sshUrl

            git@github.com:PySimpleGUI/PySimpleGUI.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link