#pysimplegui
Explore tagged Tumblr posts
solspuren · 2 years ago
Text
Tumblr media
input()で西暦を入力してたのをpysimpleguiでウインドウを開いてそこに入力するようにした。
ウインドウが開いたらアクティブにしてそのまま入力したいが、spyderで実行するとウインドウがアクティブにならない。
一旦あきらめる。
このコードを動かすのは毎年年末に1回だけなので、来年の西暦をdatetimeで自動取得するようにしようかな。
そうしよう。
いろいろ試行錯誤してテストを走らすのに西暦を手入力する必要があっただけなんだ。
0 notes
hackernewsrobot · 1 year ago
Text
PySimpleGUI 4 will be sunsetted in Q2 2024
https://docs.PySimpleGUI.com/en/latest/readme/sunset/
0 notes
dae-platform · 1 year ago
Text
Create a GUI with Python
Create a GUI with Python Introduction to PySimpleGUI Enroll Now More Courses  
Tumblr media
View On WordPress
0 notes
elbrunoc · 5 years ago
Text
#Python – Context Meny and Key Press with #PySimpleGUI
#Python – Context Meny and Key Press with #PySimpleGUI
Tumblr media
Hi !
After my base sample code for a GUI app, now it’s time to add some interaction features:
Context Menu
Capture Key Press
In the following example, I’m adding a context menu with the following elements:
Tumblr media
This can be done as part of the window definition, in example
right_click_menu = ['Unused', ['&FPS', '---', 'Menu A', 'Menu B', 'Menu C', ['Menu C1', 'Menu C2'], '---',…
View On WordPress
0 notes
thesoftbincoder · 5 years ago
Photo
Tumblr media
Python Tutorial Part 3: Create GUI window using Tkinter The Softbincoder #python #instagram #facebook #iot #tech #cloud #thesoftbincoder #picostica #instagram #pysimplegui #tkinter #tkinterpython #gui #pythongui #pythonprogramming #learnpython #pythontutorial #pythonprogrammer #pythonprojects #software #softwaredevelopmentcompany #puttur #mangalore #karnataka https://www.instagram.com/p/B_sFL2TB6FG/?igshid=1o5jlrv4lt6g
0 notes
pythonfan-blog · 2 years ago
Link
5 notes · View notes
higashi-san · 4 years ago
Text
Dog-программист.
В 2004 году мне купили новодельную Sega Магистр 16 с клавиатурой. Не буду сейчас углубляться, скажу лишь, что на ней я начал изучать язык программирования (ЯП) Basic, хоть и сильно ограниченный, но очень любопытный для подростка. Потом, в 2007 году у меня начали появляться какие-никакие ПК, и я продолжил баловаться с программированием, но постепенно это сошло на нет. Наверное потому, что хотелось нагнать всё не игранное. А может потому, что у меня не было цели. Да и к тому же ЯП Basic потерял свою актуальность, например BlitzBasic 3D работал на устаревшем DirectX 7, а Dark Basic тогда был тяжеловат для моего ПК.
Вобщем, сейчас для бытовых нужд понадобилась одна программка, и я решил, что смогу написать её сам.
Tumblr media
Это фото именно моей приставки. Оригинал фото не сохранился.
ЯП выбрал Python, так как его рекомендуют для начинающих, он очень прост, очень гибок и очень актуален. Я посмотрел урок “Python за 1 час” от Хауди Хо и понял, что это мне подойдёт, и, блин, до чего же синтаксис похож на Basic. (Эх, лучше бы я сразу взял BlitzBasic 3D с которым уже работал.) Выбрав ЯП, я посмотрел более углублённый курс на ютубе и написал первую версию моей программы. А она очень проста.
У вас возникала рутинная мысль “блин, что приготовить поесть?” У меня нет, но я понимаю вашу озадаченность. И вот я сделал программку, которая решает эту проблему. Есть три текстовых списка, которые вы заполняете на свой вкус. Программа считывает из первого списка блюда, которые подаются с гарниром (Например: сосиски, котлеты, рыба жареная). Затем, из второго списка она считывает гарниры (Например: макароны, рис, пюре). Прога перемешивает эти два списка в один во всех возможных вариациях. Ну, с данными примерами, у нас получится список из девяти комбинаций блюд и граниров. Из третьего же списка программа считывает самостоятельные блюда. Тут могут быть макароны по-флотски, плов, греча с тушёнкой и всё что угодно, даже яичница. Всё это прога добавляет к предыдущему большому списку. Ну и наконец, программа выдаёт случайное блюдо из этого большого списка всех блюд составленного именно на ваших предпочтениях.
Эта программа предназначена для того, чтобы больше не думать “а что же приготовить на этот раз?” Поэтому я и называл её FudRan. Что означает food random.
Как видите, программка очень проста, но я столкнулся с проблемами, когда пришло время писать графическое окошко для презентабельности программы. Оказывается, Python не очень подходит для графических нужд. Нет, конечно у него есть несколько модулей для работы с графикой. И чтобы не писать всё вручную (мне ж всего лишь одно окошко надо и одну кнопку), я выбрал PySimpleGUI, он мощный, ничем сторонним пользоваться не нужно, и окошки генерирует в несчастные пять строчек кода.
Но, блин, как это всё оказалось неудобно.
В моей программе есть бесконечный цикл, в котором определяются данные, которые будут выводиться в окошке программы, но эти данные нужно уже знать при создании окна. Пипец. Вот нельзя просто взять и обновить текст в окне, особенно, если текст длиннее, чем тот что был раньше.
В итоге, я накостЫлил так, что окно программы, после взаимодействия, каждый раз закрывается и создаётся заново с новыми данными. В данных условиях это показалось самым простым способом. Ну а ещё, PySimpleGUI, почему-то, не позволил работать со шрифтами, хотя эта возможность задокументирована. Ну... может это мой косяк.
Вобщем, какая-никакая, вторая версия программы готова и работает.
Заметил забавную вещь. Когда кодишь программу, делаешь сначала сырую версию, а потом доводишь её до нужной кондиции. В голове постоянно крутятся новые и новые варианты, как можно улучшить прогу. Вот эту часть кода можно иногда пропускать, добавив одну проверку. А вот эти данные можно вывести дополнительно для информативности. И подобное. Кажется, что улучшать можно бесконечно.
Но у меня-то прога звёзд с неба не хватает. Я всего лишь прикрутил графический интерфейс в виде окошка, да добавил сравнение прошлого гарнира с новым, чтобы гарнир не повторялся два раза под ряд.
Было приятно вернуться к программированию. Это такое своеобразное творчество + чтение логики как книги.
Но вот теперь дилемма. У меня давно в планах создать одну очень простенькую игру, и я теперь не знаю, сгодится ли мне Python с модулем PyGame, или подобрать что-то другое.
Tumblr media
Вот так. Ну и я бы приложил ссылку на саму программу, но Яндекс.Диск почему-то считает, что в ней есть вирус. Вот тут я вобще не понял.
2 notes · View notes
pyshambles-blog · 6 years ago
Text
PySimpleGui Beginners-Day Two
PySimpleGui Beginners-Day Two. A guide to PySimpleGUI. In the second of this series I take you through every step of converting an existing Tkinter app to a full PySimpleGUI app with some extra trimmings.
PySimpleGui Beginners-Day Two
Building A Full Working App With A GUI
By the end of the PSG Day One Primer we had learnt the very basics of PySimpleGUI. There were some vital to understand concepts covered there which if you do not understand yet you might have some difficulty following all of this article.
The Most Important Thing To Know Is;
The most important thing to learn is how the design…
View On WordPress
0 notes
imperiumallaboveall · 2 years ago
Text
Watch "Python GUI Development With PySimpleGUI" on YouTube
youtube
NFT ml
youtube
All engine to Engine dynamics Microsoft Cortana Prime AI
0 notes
mike-ac · 3 years ago
Text
Damn Fast, High-Bandwidth Data Collection in Embedded Systems
This isn’t groundbreaking, but I’ve never seen it -- and I’m not sure why not.
The basic idea is to use some damn fast dual-port SRAM which is mapped into the MPU’s address space; and an external processor is shoveling the data out of the SRAM on the other side, and blasting into a huge (enough) DRAM buffer; eventually you will fill the buffers; but having the last N seconds of high-speed data when some fault occurs is mighty helpful.  In practice, a few variables at highest possible speed is probably better than tons of variables at pretty high speed, because sifting through all that stuff is not easy.  I’m thinking of the Leg Lab PS2 which had maybe 30 possible variables, and a way to look at (it was if I remember) 6 of them at a time in detail in a large portrait-type window.
There are web-based and non-web-based display / manipulation solutions.  Since we’re talking  ‘fairly small’ amounts of data on-screen at any given time, the web-based can get data from an SQL (say) back-end, running locally on the same machine as the web browser.  The variables would be buttons, and one would select some of them to see their graphs.  Since this is not ‘live’ data, but is analysis after-the-fact, no throughput considerations are important except to be snappy at human speed.
Non-Web programs of course do-it-all at once.  Your PySimpleGUI  (or similar) provides the data reading & displaying.  For me, this latter approach would be faster to implement.  It would have the downside that a normal website could easily provide info to others in real time; not needing to capture screen shots or video or other artifacts that would go onto Confluence or something like that.
Doing math between variables to create new variables of course is possible.  Or doing some sort of thresholding, etc. This is a later improvement to the basic functionality.
Summary: Collect data at high-speed using special HW; and display selected portions of that data via web or python app.
0 notes
sreetakeoff · 4 years ago
Text
Python Project Ideas
Python Projects Ideas has become one of the foremost popular languages. Clearly, Python may be a popular and in-demand skill to find out. But what is python programming used for? We’ve already briefly touched on a variety of the areas it is often applied to, and we’ve expanded on these and more Python examples below. Python can be used for students.
Desktop GUI
Every time you perform a task on your PC, be it a desktop or laptop, it's through an application. As an intermediate Python developer, you'll make your own desktop applications.You do not need to learn any front-end technology to make your own Graphical interface (GUI) applications, as you saw with web applications. You can build all the parts using Python.There are frameworks for building your desktop applications. PySimpleGUI is one among them, and it’s pretty user-friendly for an intermediate Python developer.
Command-Line
Command-line applications are those applications that employ during a console window. This is the prompt on Windows and therefore the Terminal on Linux and Mac. You’d click to use an internet or GUI application, but you’d type in commands for command-line applications. Users of command-line applications got to have some technical knowledge since they’ll get to use commands.
Tumblr media
0 notes
hackernewsrobot · 2 years ago
Text
PysimpleGUI
https://github.com/PySimpleGUI/PySimpleGUI
0 notes
elbrunoc · 5 years ago
Text
#Python - Creating GUIs with #PySimpleGUI. 2 webcams view with 50 lines of code
#Python – Creating GUIs with #PySimpleGUI. 2 webcams view with 50 lines of code
Tumblr media
Hi !
Working with Computer Vision is super fun. And there are some scenarios where display the step by step of the processing of an image is the best way to present this.
In most of my scenarios I use OpenCV, however for a more detailed presentation I needed to search and learn a GUI framework in Python. That’s how I get to PySimpleGUI (see references).
Note: As a long time C# dev,…
View On WordPress
0 notes
pythonfan-blog · 3 years ago
Link
10 notes · View notes
pyshambles-blog · 6 years ago
Text
PySimpleGui Beginners-Day One
PySimpleGui Beginners-Day One. Will help to get beginners over the initial learning curve when starting out with PSG. This primer is to ready a newb to be able to tackle the PSG docs with confidence and understand the very basics.
PySimpleGui Beginners-Day One
The Backstory
I first heard about PySimpleGui when I was collaborating with a guy called Mike on my Bletchley GitHub project. I was way out of my depth of course, he is a developer of many years experience.
Mike helped me solve lots of the problems that I was having with Bletchley, and he also refactored the code completely. Mike also showed me how quickly he could…
View On WordPress
0 notes
fancyhints · 4 years ago
Photo
Tumblr media
Converting MP4 to Animated GIFs with Python Python can be used to read in the common MP4 video format and convert it to an animated GIF. Of course, you can use a pre-built piece of software if you’d rather, but it’s fun (and a good learning experience) to do it yourself. In this tutorial, you will learn the following: How to extract frames from an MP4 video Turn the frames into a GIF Create an MP4 to GIF GUI Let’s get started! What You Need You will need to install the OpenCV bindings for Python to read in an MP4 file and convert each frame in the video into a JPG file. You can install that using pip like this: python3 -m pip install opencv-python You will also need Pillow to create the animated GIF from the JPGs that you extract from the video. It can also be installed with pip: python3 -m pip install Pillow To create a GUI, you will be using PySimpleGUI. To install that package, use the following command: python3 -m pip install PySimpleGUI If you are using Anaconda, https://fancyhints.com/converting-mp4-to-animated-gifs-with-python/?utm_source=tumblr&utm_medium=social&utm_campaign=ReviveOldPost
0 notes