<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ShadowClaw11</title>
    <description>The latest articles on DEV Community by ShadowClaw11 (@shadowclaw11).</description>
    <link>https://dev.to/shadowclaw11</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F409571%2F73442217-8cd4-42a5-b3a0-ba2fba0d88ec.png</url>
      <title>DEV Community: ShadowClaw11</title>
      <link>https://dev.to/shadowclaw11</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shadowclaw11"/>
    <language>en</language>
    <item>
      <title>PyQt5 tutorial | Python GUI with Qt</title>
      <dc:creator>ShadowClaw11</dc:creator>
      <pubDate>Mon, 03 Aug 2020 11:33:12 +0000</pubDate>
      <link>https://dev.to/shadowclaw11/pyqt5-tutorial-python-gui-with-qt-2eb2</link>
      <guid>https://dev.to/shadowclaw11/pyqt5-tutorial-python-gui-with-qt-2eb2</guid>
      <description>&lt;p&gt;This article is quick overview on the GUI library PyQt5. By the end of this article, you'll know what PyQt5 is, it's benefits as compared to other GUI libraries, it's widgets and how to set it up.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is PyQt5?
&lt;/h2&gt;

&lt;p&gt;PyQt5 is a Python binding of the popular GUI framework Qt. Furthermore, PyQt5 is a cross-platform library, which means it works on all platforms such as Mac, Linux and Windows. As a more newer and updated GUI framework, PyQt5's GUI's are more modern and better looking than other GUI libraries like &lt;a href="https://coderslegacy.com/python/python-gui/"&gt;Tkinter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Tkinter is actually the more popular GUI library due to it's age and community support. However, that doesn't mean that it's better than PyQt5, which edges it out in several areas (most notably it's look and cross platform ability). If you're interested in a more detailed &lt;a href="https://coderslegacy.com/pyqt-vs-tkinter/"&gt;comparison of PyQt5 and Tkinter&lt;/a&gt;, follow this link.&lt;/p&gt;

&lt;h3&gt;
  
  
  PyQt5 Installation
&lt;/h3&gt;

&lt;p&gt;PyQt5 doesn't come with the Python Standard Library so you'll have to install it yourself. It's pretty simple if you're using pip, where you just have to run the following command in the command prompt. "pip install pyqt5". Remember to keep everything lowercase.&lt;/p&gt;

&lt;p&gt;Once you've successfully installed it, try running the import pyqt5 command in a Python IDE. If it executes without a "Missing Module Error", then you're good to go.&lt;/p&gt;

&lt;h3&gt;
  
  
  PyQt5 Widgets
&lt;/h3&gt;

&lt;p&gt;PyQt5 makes use of widgets, which are small GUI components like buttons and entry fields. Using the inbuilt functions that PyQt5 provides you with, you can easily create and modify these widgets as you wish.&lt;/p&gt;

&lt;p&gt;To help you get the feel of it, we'll be posting the code for several PyQt5 widgets and their respective outputs down below.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/pyqt5-qpushbutton/"&gt;QPushButton&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;A QPushButton is a simple widget used for creating buttons in PyQt5. When clicked it triggers a function that it's been connected to using the connect() function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;PyQt5&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;QtWidgets&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;PyQt5.QtWidgets&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;QApplication&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;QMainWindow&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;QApplication&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;win&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;QMainWindow&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setGeometry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setWindowTitle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"CodersLegacy"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;button&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;QtWidgets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;QPushButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;clicked&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Quit Button"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;move&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;350&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;220&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exec_&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VXWYkWbn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://coderslegacy.com/wp-content/uploads/2020/06/PyQtQPushButton.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VXWYkWbn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://coderslegacy.com/wp-content/uploads/2020/06/PyQtQPushButton.jpg" alt="PyQt5 button"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/pyqt-qlineedit/"&gt;QLineEdit&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The simplest way of taking input from the User in PyQt5. However, this method is only used to take single line input, for multiple line input you will need to use the QTextEdit widget.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;PyQt5&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;QtWidgets&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;PyQt5.QtWidgets&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;QApplication&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;QMainWindow&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;QApplication&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;win&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;QMainWindow&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setGeometry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setWindowTitle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"CodersLegacy"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;QtWidgets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;QLineEdit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;move&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exec_&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e7JW7EvF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://coderslegacy.com/wp-content/uploads/2020/06/QLineEdit.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e7JW7EvF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://coderslegacy.com/wp-content/uploads/2020/06/QLineEdit.jpg" alt="PyQt5 QLineEdit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/pyqt-qcombobox/"&gt;QComboBox&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Used to present the User with multiple options from which he may select one in a visually pleasing manner (through the use of a drop down menu).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;PyQt5&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;QtWidgets&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;PyQt5.QtWidgets&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;QApplication&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;QMainWindow&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;QApplication&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;win&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;QMainWindow&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setGeometry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setWindowTitle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"CodersLegacy"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;combo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;QtWidgets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;QComboBox&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;combo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Python"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;combo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Java"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;combo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"C++"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;combo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;move&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exec_&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--62YQzv7Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://coderslegacy.com/wp-content/uploads/2020/06/QCombobox.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--62YQzv7Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://coderslegacy.com/wp-content/uploads/2020/06/QCombobox.jpg" alt="PyQt5 QComboBox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to know more about PyQt5 and it's widgets, you can learn about them from our &lt;a href="https://coderslegacy.com/python/pyqt5-tutorial/"&gt;tutorials series at CodersLegacy&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>List of Widgets in Tkinter </title>
      <dc:creator>ShadowClaw11</dc:creator>
      <pubDate>Thu, 16 Jul 2020 15:36:04 +0000</pubDate>
      <link>https://dev.to/shadowclaw11/list-of-widgets-in-tkinter-5b4n</link>
      <guid>https://dev.to/shadowclaw11/list-of-widgets-in-tkinter-5b4n</guid>
      <description>&lt;p&gt;Each widget in Tkinter is included here with a brief description regarding it’s use and purpose. This is followed by a code sample from it’s respective article and the output is shown through the use of an image or video.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python Tkinter Widgets:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-frame/" rel="noopener noreferrer"&gt;Frame&lt;/a&gt;:
&lt;/h3&gt;

&lt;p&gt;Outlines the frame for your Tkinter window with a fixed size. Just like the human skeleton, a Tkinter window requires a frame to support it and give it structure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fez19osj0f5gn9y635d43.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fez19osj0f5gn9y635d43.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-button/" rel="noopener noreferrer"&gt;Buttons&lt;/a&gt;:
&lt;/h3&gt;

&lt;p&gt;The Python Tkinter Button is a standard Tkinter widget. A button is used as a way for the user to interact with the User interface. Once the button is clicked, an action is triggered by the program.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4of324c9c3773ipg7xmd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4of324c9c3773ipg7xmd.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-entry/" rel="noopener noreferrer"&gt;Entry&lt;/a&gt;:
&lt;/h3&gt;

&lt;p&gt;A standard Tkinter widget used to take input from the user through the user interface. A simple box is provided where the user can input text.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftd4ygoshbuonrtjujjbz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftd4ygoshbuonrtjujjbz.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-label/" rel="noopener noreferrer"&gt;Label&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A Tkinter widget used to display simple lines of text on a GUI. Also very versatile, and can even be used to display images. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2g2ymlv4xguoye5tszvf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2g2ymlv4xguoye5tszvf.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-check-button/" rel="noopener noreferrer"&gt;Check Button&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A check button is a Tkinter GUI widget that presents to the user a set of predefined options. The user may select more than one option.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftm3ovu6letbxc2rv8n5u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftm3ovu6letbxc2rv8n5u.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-radio-button/" rel="noopener noreferrer"&gt;Radio Button&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A radio button is a Tkinter GUI widget that allows the user to choose only one of a predefined set of mutually exclusive options.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Firbwmkp2lmrlqqryy28x.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Firbwmkp2lmrlqqryy28x.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-menu/" rel="noopener noreferrer"&gt;Menu&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Tkinter Menu widget is used to create various types of menus  in the GUI such as top-level menus, which are displayed right under the title bar of the parent window. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc8kn38i7twnmzy4lepql.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc8kn38i7twnmzy4lepql.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-combobox/" rel="noopener noreferrer"&gt;ComboBox&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A special extension of Tkinter, the ttk module brings forward this widget. A combobox presents a drop down list of options and displays them one at a time. Has a more modern approach than other similar widgets. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpqlplvpsbqkp8lwgf3jx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpqlplvpsbqkp8lwgf3jx.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-list-box/" rel="noopener noreferrer"&gt;List Box&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Another Tkinter widget that is used to display a list of options for the user to select. Displays all of the options in one go. Furthermore, all options are in text format.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fln7rult28r46261nccc4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fln7rult28r46261nccc4.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-menu-button/" rel="noopener noreferrer"&gt;Menu Button&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A combination of both the button and menu widget, this button widget displays a drop down menu with a list of options once clicked. This widget is unique because it's able to incorporate aspects of both check buttons and radio buttons into it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6vb6tab0nrt7vy1u26vq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6vb6tab0nrt7vy1u26vq.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/tkinter-canvas/" rel="noopener noreferrer"&gt;Canvas&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;One of the more advanced Tkinter widgets. As the name suggests, it's used to draw graphs and plots on. You can even display images on a Canvas. It's like a drawing board on which you can paint or draw anything.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhjauhbc5r0zoifwm4d6g.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhjauhbc5r0zoifwm4d6g.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-gui/python-tkinter-scale/" rel="noopener noreferrer"&gt;Scale&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Tkinter Scale widget is used to implement a graphical slider to the User interface giving the user the option of picking through a range of values. The Maximum and minimum values on the Scale can be set the programmer.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjxnr5n148t9ijgoz0hyn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjxnr5n148t9ijgoz0hyn.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://coderslegacy.com/python/python-tkinter-scrollbar/" rel="noopener noreferrer"&gt;Scrollbar&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A useful widget in GUI's, which allows you to scroll in a Tkinter window or enable scroll for certain widgets. Typically used when you're limited in space for your Tkinter window, but want more space for the widget (e.g Canvas).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs4kbdkge7iremp5ncfrd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs4kbdkge7iremp5ncfrd.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Extra Tkinter Content
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://coderslegacy.com/deleting-widgets-with-tkinter-destroy/" rel="noopener noreferrer"&gt;Deleting widgets in Tkinter&lt;/a&gt;&lt;br&gt;
&lt;a href="https://coderslegacy.com/python/tkinter-close-window/" rel="noopener noreferrer"&gt;How to close a Tkinter window (programatically)&lt;/a&gt;&lt;br&gt;
&lt;a href="https://coderslegacy.com/python/problem-solving/disable-resizing-in-tkinter/" rel="noopener noreferrer"&gt;Disable resizing for a Tkinter window&lt;/a&gt;&lt;br&gt;
&lt;a href="https://coderslegacy.com/python/problem-solving/change-font-in-tkinter/" rel="noopener noreferrer"&gt;Changing the Default Tkinter Font&lt;/a&gt;&lt;br&gt;
&lt;a href="https://coderslegacy.com/python/tkinter-clear-entry/" rel="noopener noreferrer"&gt;Emptying out the Entrybox contents&lt;/a&gt;&lt;br&gt;
&lt;a href="https://coderslegacy.com/python/problem-solving/tkinter-color-chooser/" rel="noopener noreferrer"&gt;Creating a color chooser&lt;/a&gt;&lt;br&gt;
&lt;a href="https://coderslegacy.com/python/tkinter-grid/" rel="noopener noreferrer"&gt;Tkinter Grid Placement&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>tkinter</category>
      <category>programming</category>
    </item>
    <item>
      <title>Tkinter  - Disable Resizing- </title>
      <dc:creator>ShadowClaw11</dc:creator>
      <pubDate>Sun, 28 Jun 2020 10:01:33 +0000</pubDate>
      <link>https://dev.to/shadowclaw11/tkinter-disable-resizing-1mh4</link>
      <guid>https://dev.to/shadowclaw11/tkinter-disable-resizing-1mh4</guid>
      <description>&lt;p&gt;While typically users are given the option to resize GUI windows at will, there may be times where you wish to disable the resizing feature for a Tkinter window. For instance, your GUI window may not support resizing. If you weren’t careful with how you packed/placed the objects into the window, resizing will ruin your set up.&lt;/p&gt;

&lt;p&gt;Luckily, there is an easy one line fix to this issue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import tkinter as tk

root = tk.Tk()
root.geometry("200x150")

label = tk.Label(root, text = "Hello World")
label.pack(padx = 5, pady = 5)

root.resizable(False, False) 
root.mainloop()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Since the user has the option to resize the Tkinter window for both the X ad Y axis, we too have the option to disable resizing individually for the X and Y axis. Passing two False arguments into the resizable function will disable both.&lt;/p&gt;

&lt;p&gt;Remember to call the resizable function before the mainloop() function but after the tk.Tk() function.&lt;/p&gt;

&lt;p&gt;See more Tkinter related tit bits below.&lt;br&gt;
List of &lt;a href="https://coderslegacy.com/python/list-of-tkinter-widgets/"&gt;Tkinter Widgets&lt;/a&gt;&lt;br&gt;
How to &lt;a href="https://coderslegacy.com/python/problem-solving/improve-tkinter-resolution/"&gt;improve Tkinter screen resolution&lt;/a&gt;?&lt;br&gt;
How to &lt;a href="https://coderslegacy.com/python/problem-solving/change-font-in-tkinter/"&gt;change font type and size in Tkinter&lt;/a&gt;?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Creating Software in Python</title>
      <dc:creator>ShadowClaw11</dc:creator>
      <pubDate>Mon, 15 Jun 2020 16:18:52 +0000</pubDate>
      <link>https://dev.to/shadowclaw11/creating-software-in-python-24h</link>
      <guid>https://dev.to/shadowclaw11/creating-software-in-python-24h</guid>
      <description>&lt;p&gt;Before we get around to explaining how to create software using Python, let's list down some basic differences between an actual software and the small scripts. &lt;/p&gt;

&lt;p&gt;1.A Graphical User Interface (GUI)&lt;br&gt;
2.Exception Handling &lt;br&gt;
3.Logging System&lt;br&gt;
4.Software is compiled code that is executed&lt;br&gt;
5.Scripts are interpreted&lt;br&gt;
6.Script are typically a single file program&lt;br&gt;
7.Software may consists of several smaller programs working together&lt;/p&gt;

&lt;h1&gt;
  
  
  Required Python Skills
&lt;/h1&gt;

&lt;p&gt;It is fairly obvious that anyone attempting to create software should be sufficiently skilled in the core concepts of Python. However we'll be discussing certain types of skills here that aren't part of the core concepts (loops, functions, File Handling), but essential when it comes to making software. You can skim over this section if you read our &lt;a href="https://coderslegacy.com/top-11-coding-practices-for-great-coders/"&gt;Top Coding Practices&lt;/a&gt; article instead. Everything is explained in much more detail there with supporting code and images. &lt;/p&gt;

&lt;p&gt;There are several things that are acceptable while you are simply creating scripts or practicing programming, such as taking input from the console, debugging with the use of print statements, letting errors crash your program etc. However, when making software, especially software made for distribution to users, several things must be kept in mind. &lt;/p&gt;

&lt;p&gt;Three main things which we'll discuss briefly here are Logging, GUI's and Exception handling. Have you every used a software without a helpful User interface? Would you pick a console based software over a GUI based software? For obvious reasons, all software should have a helpful and user friendly GUI. If you don't know how to implement a GUI, head over to our Python GUI section where the &lt;a href="https://coderslegacy.com/python/python-gui/"&gt;various GUI libraries&lt;/a&gt; are discussed (After you read this article that is).&lt;/p&gt;

&lt;p&gt;Next up is Exception handling. When an error occurs, your entire program crashes. This is unacceptable in a software, especially larger ones. Many of us encounter errors while using software, but instead of the program crashing, an error message is displayed instead. This is &lt;a href="https://coderslegacy.com/python/python-exception-handling/"&gt;exception handling&lt;/a&gt;, where a good implementation can catch any exceptions and take an alternate route instead to maintain stability.  &lt;/p&gt;

&lt;p&gt;Using print statements to help you during debugging is a practice discouraged at higher levels. We have a proper system for this purpose called Logging. It involves system events that occur to be saved within a file, complete with details about that event such as the exact time is occurred. This is also useful because you can ask your customers to send you their log file if their software produces an error. Using this file you can then figure out what went wrong. &lt;/p&gt;

&lt;h1&gt;
  
  
  Pyinstaller
&lt;/h1&gt;

&lt;p&gt;Python doesn't natively come with a way to create compiled programs. However, pyinstaller is a python library that can be used for this purpose. You install it as you would a regular library using the pip install pyinstaller command in the cmd, and then follow the below steps. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to the command prompt, and navigate to the file you wish to convert. In this case, we'll be converting a file called "TestFile.py". First we navigate to the directory where our File is stored. In our case, Desktop. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once you've successfully reached your python file, run the "pyinstaller TestFile.py" command, and pyinstaller will take care of the rest. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is a very basic implementation of pyinstaller. In a more real life scenario, there will likely be many more issues. There's a good chance the default pyinstaller compiler settings won't work for you. Luckily there are many alternate settings available, such as the --onefile setting.&lt;/p&gt;

&lt;p&gt;For the full article, check the original article at &lt;a href="https://coderslegacy.com/"&gt;CodersLegacy&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
