<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Graphic &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:Graphic</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 15:01:42 +0000</pubDate>
    <item>
      <title>Nature Timespiral: The Evolution of Earth from the Big Bang</title>
      <link>https://personaljournal.ca/paulsutton/nature-timespiral-the-evolution-of-earth-from-the-big-bang</link>
      <description>&lt;![CDATA[Nature Timespiral: The Evolution of Earth from the Big Bang&#xA;&#xA;This is one of the best graphical representation of the evolution of the universe and planet earth I have seen in a long time.&#xA;&#xA;[Nature Timespiral: The Evolution of Earth from the Big Bang&#xA;](https://www.visualcapitalist.com/cp/nature-timespiral-the-evolution-of-earth-from-the-big-bang/)&#xA;&#xA;Tags&#xA;&#xA;#Universe,#Planetary,#Live,#Evolution,#Graphic,#TimeSpiral&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Nature Timespiral: The Evolution of Earth from the Big Bang</p>

<p>This is one of the best graphical representation of the evolution of the universe and planet earth I have seen in a long time.</p>
<ul><li><a href="https://www.visualcapitalist.com/cp/nature-timespiral-the-evolution-of-earth-from-the-big-bang/" rel="nofollow">Nature Timespiral: The Evolution of Earth from the Big Bang
</a></li></ul>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:Universe" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Universe</span></a>,<a href="/paulsutton/tag:Planetary" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Planetary</span></a>,<a href="/paulsutton/tag:Live" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Live</span></a>,<a href="/paulsutton/tag:Evolution" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Evolution</span></a>,<a href="/paulsutton/tag:Graphic" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Graphic</span></a>,<a href="/paulsutton/tag:TimeSpiral" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">TimeSpiral</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/nature-timespiral-the-evolution-of-earth-from-the-big-bang</guid>
      <pubDate>Fri, 18 Aug 2023 06:00:00 +0000</pubDate>
    </item>
    <item>
      <title>VLC media Player</title>
      <link>https://personaljournal.ca/paulsutton/vlc-media-player</link>
      <description>&lt;![CDATA[VLC media Player&#xA;&#xA;I am not sure if this is a bug. When opening an MP3 track in VLC, the colours for the album graphic appear to be incorrect.&#xA;&#xA;vlc&#xA;&#xA;The image on the left is correct and how it appears in the xfce4 file manger,  the image on the right  is how it appears in VLC media player.&#xA;&#xA;It is almost as if vlc inverts the image colour scheme.&#xA;&#xA;Tags&#xA;&#xA;#VLC,#MediaPlayer,#Album,#Graphic,#Colours,#Colors&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>VLC media Player</p>

<p>I am not sure if this is a bug. When opening an MP3 track in VLC, the colours for the album graphic appear to be incorrect.</p>

<p><img src="https://git.qoto.org/zleap/documents/-/raw/master/stemgroup/vlc.png" alt="vlc"></p>

<p>The image on the left is correct and how it appears in the xfce4 file manger,  the image on the right  is how it appears in VLC media player.</p>

<p>It is almost as if vlc inverts the image colour scheme.</p>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:VLC" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">VLC</span></a>,<a href="/paulsutton/tag:MediaPlayer" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">MediaPlayer</span></a>,<a href="/paulsutton/tag:Album" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Album</span></a>,<a href="/paulsutton/tag:Graphic" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Graphic</span></a>,<a href="/paulsutton/tag:Colours" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Colours</span></a>,<a href="/paulsutton/tag:Colors" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Colors</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/vlc-media-player</guid>
      <pubDate>Sat, 21 May 2022 19:36:13 +0000</pubDate>
    </item>
    <item>
      <title>Add  more functions</title>
      <link>https://personaljournal.ca/paulsutton/add-more-functions</link>
      <description>&lt;![CDATA[Add  more functions&#xA;&#xA;I have added a few more maths functions to the application and also provided a clear function.  There are still a few items to add to help improve debugging but the application is starting to take shape. &#xA;&#xA;Notes &#xA; &#xA;window = Tk()&#xA;window.title(&#39;Maths Application&#39;)&#xA;window.geometry(&#34;570x150&#34;) # w x h&#xA;window.resizable(0,0)&#xA;&#xA;The above code is being modified as I go. So I am changing the window size depending on what is being displayed.&#xA;&#xA;I have also made the Window title reflect the purpose of the application.&#xA;&#xA;That the source code now has &#39;result&#39; as a label rather than output.  This will show up future screenshots. &#xA;&#xA;addition app&#xA;&#xA;The code for the above is as follows. &#xA;&#xA;!/usr/bin/env python&#xA;import Tkinter # note use of caps&#xA;from Tkinter import &#xA;&#xA;window = Tk()&#xA;window.title(&#39;Maths Application&#39;)&#xA;window.geometry(&#34;570x150&#34;) # w x h&#xA;window.resizable(0,0)&#xA;&#xA;define button actions&#xA;def btn1():&#xA;&#x9;#convert box text in to integers&#x9;&#xA;&#x9;ent1 = int(entrytext.get())&#xA;&#x9;ent2 = int(entrytext2.get())&#xA;&#x9;&#xA;&#x9;#add the 2 integers and store in variable add&#xA;&#x9;add = (ent1 + ent2)&#xA;&#x9;print (add)&#xA;&#x9;&#xA;&#x9;#insert value of variable add in&#x9;to box outtext &#xA;&#x9;outtext1.insert(0,str(add)) # insert response&#xA;&#xA;def btn2():&#xA;&#x9;#print(&#34;subtraction&#34;)&#xA;&#x9;ent1 = int(entrytext.get())&#xA;&#x9;ent2 = int(entrytext2.get())&#xA;&#x9;&#xA;&#x9;#subtract the 2 integers and store in variable sub&#xA;&#x9;sub = (ent1 - ent2)&#xA;&#x9;&#xA;&#x9;&#xA;&#x9;#insert value of variable sub in&#x9;to box outtext &#xA;&#x9;outtext1.insert(0,str(sub)) # insert response&#x9;&#xA;&#x9;&#xA;def btn3():&#xA;&#x9;#print(&#34;multiply&#34;)&#xA;&#x9;ent1 = int(entrytext.get())&#xA;&#x9;ent2 = int(entrytext2.get())&#xA;&#x9;&#xA;&#x9;#multiply the 2 integers and store in variable mul&#xA;&#x9;mul = (ent1  ent2)&#xA;&#x9;&#x9;&#xA;&#x9;#insert value of variable mul in&#x9;to box outtext &#xA;&#x9;outtext1.insert(0,str(mul)) # insert response&#x9;&#x9;&#xA;&#xA;def btn4():&#xA;&#x9;#print(&#34;divide&#34;)&#xA;&#x9;ent1 = int(entrytext.get())&#xA;&#x9;ent2 = int(entrytext2.get())&#xA;&#x9;&#xA;&#x9;#multiply the 2 integers and store in variable div&#xA;&#x9;div = (ent1 / ent2)&#xA;&#x9;&#x9;&#xA;&#x9;#insert value of variable mul in&#x9;to box outtext &#xA;&#x9;outtext1.insert(0,str(div)) # insert response&#x9;&#xA;&#x9;&#xA;clear boxes&#xA;def clear():&#xA;&#x9;#print(&#34;clear boxes&#34;) # leave in for legacy testing&#xA;&#x9;entrytext.delete(0, END) # clear input box&#xA;&#x9;entrytext2.delete(0, END) # clear input box2&#xA;&#x9;outtext1.delete(0, END) # clear output box&#xA;&#x9;&#xA;btntog2 = Button( window, text =&#39;+&#39;, command=btn1) # add&#xA;btntog3 = Button( window, text =&#39;-&#39;, command=btn2)  # subtract&#xA;btntog4 = Button( window, text =&#39;x&#39;, command=btn3) #multiply&#xA;btntog5 = Button( window, text =&#39;/&#39;, command=btn4) #divide&#xA;btntog6 = Button( window, text =&#39;Clear&#39;, command=clear) #clear&#xA;btnexit = Button( window, text =&#39;Exit&#39;,command=exit)&#x9; #exit&#xA;&#xA;define some labels&#xA;box1 = Label(window, text=&#34;1st Value&#34;)&#xA;box2 = Label(window, text=&#34;2nd Value&#34;)&#xA;box3 = Label(window, text=&#34;Result&#34;)&#xA;&#xA;define entry box &#xA;entry1 = StringVar() # this is our entry box&#xA;entry2 = StringVar()&#xA;entrytext = Entry(window, textvariable=entry1) # this is our entry box&#xA;entrytext2 = Entry(window, textvariable=entry2) # this is our second entry box&#xA;&#xA;define out box &#xA;&#xA;entry2 = StringVar() # this is our output box&#xA;outtext1 = Entry(window, textvariable=entry2) # this is our output box&#xA;&#xA;display boxes&#xA;entrytext.grid(row = 3, column = 2,)  #display entry box&#xA;entrytext2.grid(row = 3, column = 3,)  #display entry box&#xA;outtext1.grid(row = 3, column = 4,) #display output box&#xA;&#xA;place labels&#xA;box1.grid(row = 1&#x9;, column = 2, padx = 5, pady = 5)&#xA;box2.grid(row = 1&#x9;, column = 3, padx = 5, pady = 5)&#xA;box3.grid(row = 1&#x9;, column = 4, padx = 5, pady = 5)&#xA;&#xA;buttons&#xA;btntog2.grid(row = 4, column = 2, padx = 1, pady = 1) # addition button&#xA;btntog3.grid(row = 4, column = 3, padx = 1, pady = 1) # subtraction button&#xA;btntog4.grid(row = 5, column = 2, padx = 1, pady = 1) # multiply button&#xA;btntog5.grid(row = 5, column = 3, padx = 1, pady = 1) # divide button&#xA;btntog6.grid(row = 4, column = 6, padx = 1, pady = 1) # clear button&#xA;btnexit.grid(row = 3, column = 6, padx = 1, pady = 1) # exit button&#xA;&#xA;window.mainloop()&#xA;&#xA;The code that I used for a previous application to detect if numerical values have been used is below but provided &#39;as is&#39; for now.&#xA;&#xA;def response():&#xA;&#x9;&#x9;&#xA;&#x9;msg = &#34;error : must be a text value&#34;&#xA;&#xA;&#x9;i = circletext.get()&#xA;&#x9;y = i.isdigit()&#xA;&#x9;l = len(circletext.get())&#xA;&#x9;#print l&#xA;&#x9;if y == True or l == 0:&#xA;&#x9;&#x9;circletext.insert(0,(msg))&#xA;&#x9;&#x9;&#xA;&#x9;else:&#x9;&#xA;&#x9;&#x9;x = random.choice(RESPONSES)&#xA;&#x9;&#x9;circletext2.delete(0, END) # clear prev output&#xA;&#x9;&#x9;circletext2.insert(0,str(x)) # insert response&#xA;&#xA;I will integrate a version of this in to the main code. &#xA;&#xA;#python, #tkinter, #programming, #python, #graphic, #applications, #bugs, #troubleshooting, #howto, #paignton, #library, #virtual, #codeclub&#xA;&#xA;Happy to provide help and support via decentralised social media.  I can be contacted on Mastodon here. You can get a free account on the http://qoto.org instance by following this link.&#xA;&#xA;cc-by logo&#xA;&#xA;Licenced under Attribution 4.0 International (CC BY 4.0)&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Add  more functions</p>

<p>I have added a few more maths functions to the application and also provided a clear function.  There are still a few items to add to help improve debugging but the application is starting to take shape.</p>

<p><strong>Notes</strong></p>

<pre><code>window = Tk()
window.title(&#39;Maths Application&#39;)
window.geometry(&#34;570x150&#34;) # w x h
window.resizable(0,0)
</code></pre>
<ol><li><p>The above code is being modified as I go. So I am changing the window size depending on what is being displayed.</p></li>

<li><p>I have also made the Window title reflect the purpose of the application.</p></li>

<li><p>That the source code now has &#39;result&#39; as a label rather than output.  This will show up future screenshots.</p></li></ol>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/tkinter/AdditionApp2.png" alt="addition app"></p>

<p>The code for the above is as follows.</p>

<pre><code>#!/usr/bin/env python
import Tkinter # note use of caps
from Tkinter import *

window = Tk()
window.title(&#39;Maths Application&#39;)
window.geometry(&#34;570x150&#34;) # w x h
window.resizable(0,0)

#define button actions
def btn1():
	#convert box text in to integers	
	ent1 = int(entrytext.get())
	ent2 = int(entrytext2.get())
	
	#add the 2 integers and store in variable add
	add = (ent1 + ent2)
	print (add)
	
	#insert value of variable add in	to box outtext 
	outtext1.insert(0,str(add)) # insert response

def btn2():
	#print(&#34;subtraction&#34;)
	ent1 = int(entrytext.get())
	ent2 = int(entrytext2.get())
	
	#subtract the 2 integers and store in variable sub
	sub = (ent1 - ent2)
	
	
	#insert value of variable sub in	to box outtext 
	outtext1.insert(0,str(sub)) # insert response	
	
def btn3():
	#print(&#34;multiply&#34;)
	ent1 = int(entrytext.get())
	ent2 = int(entrytext2.get())
	
	#multiply the 2 integers and store in variable mul
	mul = (ent1 * ent2)
		
	#insert value of variable mul in	to box outtext 
	outtext1.insert(0,str(mul)) # insert response		

def btn4():
	#print(&#34;divide&#34;)
	ent1 = int(entrytext.get())
	ent2 = int(entrytext2.get())
	
	#multiply the 2 integers and store in variable div
	div = (ent1 / ent2)
		
	#insert value of variable mul in	to box outtext 
	outtext1.insert(0,str(div)) # insert response	
	
#clear boxes
def clear():
	#print(&#34;clear boxes&#34;) # leave in for legacy testing
	entrytext.delete(0, END) # clear input box
	entrytext2.delete(0, END) # clear input box2
	outtext1.delete(0, END) # clear output box
	
btn_tog2 = Button( window, text =&#39;+&#39;, command=btn1) # add
btn_tog3 = Button( window, text =&#39;-&#39;, command=btn2)  # subtract
btn_tog4 = Button( window, text =&#39;x&#39;, command=btn3) #multiply
btn_tog5 = Button( window, text =&#39;/&#39;, command=btn4) #divide
btn_tog6 = Button( window, text =&#39;Clear&#39;, command=clear) #clear
btn_exit = Button( window, text =&#39;Exit&#39;,command=exit)	 #exit

# define some labels
box1 = Label(window, text=&#34;1st Value&#34;)
box2 = Label(window, text=&#34;2nd Value&#34;)
box3 = Label(window, text=&#34;Result&#34;)

#define entry box 
entry1 = StringVar() # this is our entry box
entry2 = StringVar()
entrytext = Entry(window, textvariable=entry1) # this is our entry box
entrytext2 = Entry(window, textvariable=entry2) # this is our second entry box

#define out box 

entry2 = StringVar() # this is our output box
outtext1 = Entry(window, textvariable=entry2) # this is our output box

#display boxes
entrytext.grid(row = 3, column = 2,)  #display entry box
entrytext2.grid(row = 3, column = 3,)  #display entry box
outtext1.grid(row = 3, column = 4,) #display output box

#place labels
box1.grid(row = 1	, column = 2, padx = 5, pady = 5)
box2.grid(row = 1	, column = 3, padx = 5, pady = 5)
box3.grid(row = 1	, column = 4, padx = 5, pady = 5)

#buttons
btn_tog2.grid(row = 4, column = 2, padx = 1, pady = 1) # addition button
btn_tog3.grid(row = 4, column = 3, padx = 1, pady = 1) # subtraction button
btn_tog4.grid(row = 5, column = 2, padx = 1, pady = 1) # multiply button
btn_tog5.grid(row = 5, column = 3, padx = 1, pady = 1) # divide button
btn_tog6.grid(row = 4, column = 6, padx = 1, pady = 1) # clear button
btn_exit.grid(row = 3, column = 6, padx = 1, pady = 1) # exit button

window.mainloop()


</code></pre>

<p>The code that I used for a previous application to detect if numerical values have been used is below but provided &#39;as is&#39; for now.</p>

<pre><code>def response():
		
	msg = &#34;error : must be a text value&#34;

	i = circletext.get()
	y = i.isdigit()
	l = len(circletext.get())
	#print l
	if y == True or l == 0:
		circletext.insert(0,(msg))
		
	else:	
		x = random.choice(RESPONSES)
		circletext2.delete(0, END) # clear prev output
		circletext2.insert(0,str(x)) # insert response
</code></pre>

<p>I will integrate a version of this in to the main code.</p>

<p><a href="/paulsutton/tag:python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">python</span></a>, <a href="/paulsutton/tag:tkinter" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">tkinter</span></a>, <a href="/paulsutton/tag:programming" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">programming</span></a>, <a href="/paulsutton/tag:python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">python</span></a>, <a href="/paulsutton/tag:graphic" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">graphic</span></a>, <a href="/paulsutton/tag:applications" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">applications</span></a>, <a href="/paulsutton/tag:bugs" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">bugs</span></a>, <a href="/paulsutton/tag:troubleshooting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">troubleshooting</span></a>, <a href="/paulsutton/tag:howto" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">howto</span></a>, <a href="/paulsutton/tag:paignton" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">paignton</span></a>, <a href="/paulsutton/tag:library" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">library</span></a>, <a href="/paulsutton/tag:virtual" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">virtual</span></a>, <a href="/paulsutton/tag:codeclub" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">codeclub</span></a></p>

<p>Happy to provide help and support via decentralised social media.  I can be contacted on Mastodon <a href="https://qoto.org/@zleap/" rel="nofollow">here</a>. You can get a free account on the <a href="http://qoto.org" rel="nofollow">http://qoto.org</a> instance by following <a href="https://qoto.org/invite/pN8gdTzi" rel="nofollow">this link</a>.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/88x31.png" alt="cc-by logo"></p>

<p><a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">Licenced under Attribution 4.0 International (CC BY 4.0)</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/add-more-functions</guid>
      <pubDate>Thu, 21 May 2020 06:44:22 +0000</pubDate>
    </item>
    <item>
      <title>Addition Application</title>
      <link>https://personaljournal.ca/paulsutton/addition-application</link>
      <description>&lt;![CDATA[Addition Application&#xA;&#xA;So following on from the previous posts, I am how sharing a small application, that makes use of what we have been learning. &#xA;&#xA;This presents 2 input boxes and an output box,  any values entered in to the first two,  the sum is placed in to the last box.&#xA;&#xA;addition app&#xA;&#xA;This is not perfect, but getting there slowly.&#xA;&#xA;We need to:-&#xA;&#xA;Fix the name of the button from button1&#xA;Detect if the user has entered numerical values&#xA;Detect for empty boxes&#xA;Make labels more useful&#xA;Fix spelling in comments&#xA;Fix clarity of comments&#xA;&#xA;The code for the above is as follows. &#xA;&#xA;!/usr/bin/env python&#xA;import Tkinter # note use of caps&#xA;from Tkinter import *&#xA;&#xA;window = Tk()&#xA;window.title(&#39;App 1&#39;)&#xA;window.geometry(&#34;650x125&#34;) # w x h&#xA;window.resizable(0,0)&#xA;&#xA;define button actions&#xA;def btn1():&#xA;&#x9;#convert box text in to integers&#x9;&#xA;&#x9;ent1 = int(entrytext.get())&#xA;&#x9;ent2 = int(entrytext2.get())&#xA;&#x9;&#xA;&#x9;#add the 2 integers and store in variable add&#xA;&#x9;add = (ent1 + ent2)&#xA;&#x9;print add&#xA;&#x9;&#xA;&#x9;#instert value add in&#x9;to box outtext &#xA;&#x9;outtext1.insert(0,str(add)) # insert response&#xA;&#x9;&#xA;btntog2 = Button( window, text =&#39;button1&#39;, command=btn1)&#xA;btnexit = Button( window, text =&#39;exit&#39;,command=exit)&#x9;&#xA;&#xA;define some labels&#xA;box1 = Label(window, text=&#34;Entry 1: &#34;)&#xA;box2 = Label(window, text=&#34;Entry 2: &#34;)&#xA;box3 = Label(window, text=&#34;Ouput1: &#34;)&#xA;&#xA;define entry box &#xA;entry1 = StringVar() # this is our entry box&#xA;entry2 = StringVar()&#xA;entrytext = Entry(window, textvariable=entry1) # this is our entry box&#xA;entrytext2 = Entry(window, textvariable=entry2) # this is our second entry box&#xA;&#xA;define out box &#xA;&#xA;entry2 = StringVar() # this is our output box&#xA;outtext1 = Entry(window, textvariable=entry2) # this is our output box&#xA;&#xA;display boxes&#xA;entrytext.grid(row = 3, column = 2,)  #display entry box&#xA;entrytext2.grid(row = 3, column = 3,)  #display entry box&#xA;outtext1.grid(row = 3, column = 4,) #display output box&#xA;&#xA;place labels&#xA;box1.grid(row = 1&#x9;, column = 2, padx = 5, pady = 5)&#xA;box2.grid(row = 1&#x9;, column = 3, padx = 5, pady = 5)&#xA;box3.grid(row = 1&#x9;, column = 4, padx = 5, pady = 5)&#xA;&#xA;buttons&#xA;btntog2.grid(row = 3, column = 5, padx = 5, pady = 5)&#xA;btnexit.grid(row = 3, column = 6, padx = 5, pady = 5)&#xA;&#xA;window.mainloop()&#xA;&#xA;#python, #tkinter, #programming, #python, #graphic, #applications, #bugs, #troubleshooting, #howto, #paignton, #library, #virtual, #codeclub&#xA;&#xA;Happy to provide help and support via decentralised social media.  I can be contacted on Mastodon here. You can get a free account on the http://qoto.org instance by following this link.&#xA;&#xA;cc-by logo&#xA;&#xA;Licenced under Attribution 4.0 International (CC BY 4.0)&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Addition Application</p>

<p>So following on from the previous posts, I am how sharing a small application, that makes use of what we have been learning.</p>

<p>This presents 2 input boxes and an output box,  any values entered in to the first two,  the sum is placed in to the last box.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/tkinter/AdditionApp.png" alt="addition app"></p>

<p>This is not perfect, but getting there slowly.</p>

<p>We need to:-</p>
<ul><li>Fix the name of the button from button1</li>
<li>Detect if the user has entered numerical values</li>
<li>Detect for empty boxes</li>
<li>Make labels more useful</li>
<li>Fix spelling in comments</li>
<li>Fix clarity of comments</li></ul>

<p>The code for the above is as follows.</p>

<pre><code>#!/usr/bin/env python
import Tkinter # note use of caps
from Tkinter import *

window = Tk()
window.title(&#39;App 1&#39;)
window.geometry(&#34;650x125&#34;) # w x h
window.resizable(0,0)

#define button actions
def btn1():
	#convert box text in to integers	
	ent1 = int(entrytext.get())
	ent2 = int(entrytext2.get())
	
	#add the 2 integers and store in variable add
	add = (ent1 + ent2)
	print add
	
	#instert value add in	to box outtext 
	outtext1.insert(0,str(add)) # insert response
	
btn_tog2 = Button( window, text =&#39;button1&#39;, command=btn1)
btn_exit = Button( window, text =&#39;exit&#39;,command=exit)	

# define some labels
box1 = Label(window, text=&#34;Entry 1: &#34;)
box2 = Label(window, text=&#34;Entry 2: &#34;)
box3 = Label(window, text=&#34;Ouput1: &#34;)

#define entry box 
entry1 = StringVar() # this is our entry box
entry2 = StringVar()
entrytext = Entry(window, textvariable=entry1) # this is our entry box
entrytext2 = Entry(window, textvariable=entry2) # this is our second entry box

#define out box 

entry2 = StringVar() # this is our output box
outtext1 = Entry(window, textvariable=entry2) # this is our output box

#display boxes
entrytext.grid(row = 3, column = 2,)  #display entry box
entrytext2.grid(row = 3, column = 3,)  #display entry box
outtext1.grid(row = 3, column = 4,) #display output box

#place labels
box1.grid(row = 1	, column = 2, padx = 5, pady = 5)
box2.grid(row = 1	, column = 3, padx = 5, pady = 5)
box3.grid(row = 1	, column = 4, padx = 5, pady = 5)

#buttons
btn_tog2.grid(row = 3, column = 5, padx = 5, pady = 5)
btn_exit.grid(row = 3, column = 6, padx = 5, pady = 5)

window.mainloop()

</code></pre>

<p><a href="/paulsutton/tag:python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">python</span></a>, <a href="/paulsutton/tag:tkinter" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">tkinter</span></a>, <a href="/paulsutton/tag:programming" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">programming</span></a>, <a href="/paulsutton/tag:python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">python</span></a>, <a href="/paulsutton/tag:graphic" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">graphic</span></a>, <a href="/paulsutton/tag:applications" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">applications</span></a>, <a href="/paulsutton/tag:bugs" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">bugs</span></a>, <a href="/paulsutton/tag:troubleshooting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">troubleshooting</span></a>, <a href="/paulsutton/tag:howto" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">howto</span></a>, <a href="/paulsutton/tag:paignton" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">paignton</span></a>, <a href="/paulsutton/tag:library" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">library</span></a>, <a href="/paulsutton/tag:virtual" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">virtual</span></a>, <a href="/paulsutton/tag:codeclub" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">codeclub</span></a></p>

<p>Happy to provide help and support via decentralised social media.  I can be contacted on Mastodon <a href="https://qoto.org/@zleap/" rel="nofollow">here</a>. You can get a free account on the <a href="http://qoto.org" rel="nofollow">http://qoto.org</a> instance by following <a href="https://qoto.org/invite/pN8gdTzi" rel="nofollow">this link</a>.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/88x31.png" alt="cc-by logo"></p>

<p><a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">Licenced under Attribution 4.0 International (CC BY 4.0)</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/addition-application</guid>
      <pubDate>Wed, 20 May 2020 06:30:00 +0000</pubDate>
    </item>
  </channel>
</rss>