<p></p>
<p>Hello @ all,</p>
<p>i am testing out a first Tkinter python program on different OS. On Raspbian ( Stretch ) i run this program under IDLE and IDLE3 and from Geany ( 1.29 ). The code is :<br>
`<br>
#from Tkinter import * # Python 2<br>
from tkinter import * # Python 3</p>
<h1>definition of function upper radio button pressed which creates a picture in the window. The picture is in file  Rechteck_gelb_mit_Punkt_blau.gif</h1>
<h1>see definiton of blue_img on the bottom of this script</h1>
<p>def upper_radio_button_pressed():<br>
canvas.create_image(20,20, anchor=NW, image=blue_img)</p>
<h1>definition of function upper radio button pressed which creates a picture in the window. The picture is in file  Rechteck_gelb_mit_Punkt_rot.gif</h1>
<h1>see definiton of red_img on the bottom of this script</h1>
<p>def lower_radio_button_pressed():<br>
canvas.create_image(20,20, anchor=NW, image=red_img)</p>
<h1>definition of class App which is handling the Quit  and the hello Button</h1>
<p>class App:<br>
def <strong>init</strong>(self, master):<br>
frame = Frame(master)<br>
frame.pack()<br>
self.button = Button(frame,<br>
text="QUIT", fg="red",<br>
command=frame.quit)<br>
self.button.pack(side=LEFT)</p>
<pre><code>self.slogan = Button(frame,
                     text="Hello",
                     command=self.write_slogan)
self.slogan.pack(side=LEFT)
</code></pre>
<p>def write_slogan(self): # definition of function write slogan. The text is written in the command line box only if the button Hello is pressed.<br>
print ("Tkinter is easy to use!")</p>
<h1>Tkinter window definition</h1>
<p>root = Tk()<br>
root.title("First python Tkinter window")</p>
<h1>width x height + x_offset + y_offset:</h1>
<p>root.geometry("500x600+30+30")</p>
<h1>define red label inside the window with text  "red Label"</h1>
<p>w = Label(root, text="Red Label", bg="red", fg="white")</p>
<h1>automatic managing of geometrie ( pack manager )of label w  inside of the window</h1>
<h1>means x coordinate is done automatically and Y coordinate is given ( for x use padx =...)</h1>
<p>w.pack(fill=X,pady=10)</p>
<h1>integer variable definition</h1>
<p>v = IntVar()</p>
<p>entry1 = Entry(root)<br>
entry2 = Entry(root)</p>
<h1>definition of Label "Choose a programming language"</h1>
<p>Label(root,<br>
text="""Choose a<br>
programming language:""",<br>
justify = LEFT,<br>
padx = 20).pack()</p>
<h1>definition of pushable radiobuttons with text  Phyton or Perl</h1>
<p>Radiobutton(root,<br>
text="Python",<br>
padx = 20,<br>
variable=v,<br>
value=1,<br>
command=upper_radio_button_pressed).pack(anchor=W) # call the function upper_radio_button pressed</p>
<p>Radiobutton(root,<br>
text="Perl",<br>
padx = 20,<br>
variable=v,<br>
value=2,<br>
command=lower_radio_button_pressed).pack(anchor=W)# call the function upper_radio_button pressed</p>
<h1>a canvas is a graphical object, here blue_img and red_img</h1>
<h1>define the dimensions of the pictures  inside of the window and that it is shown inside of the window root</h1>
<p>canvas_width = 200<br>
canvas_height = 100<br>
canvas = Canvas(root,<br>
width=canvas_width,<br>
height=canvas_height)<br>
canvas.pack()</p>
<p>#definition of picture blue_img<br>
blue_img = PhotoImage(file="/Users/holgerlech/Documents/85_Computer/Python/Quadrat_gelb_mit Smilie.PPM")<br>
#definition of picture red_img<br>
red_img = PhotoImage(file="/Users/holgerlech/Documents/85_Computer/Python/Rechteck_gelb_mit_Punkt_rot.gif")</p>
<h1>call of the class App with parameter root for the window</h1>
<p>app = App(root)</p>
<p>Label(root,text="Vorname:").pack()<br>
vorname = entry1.pack()</p>
<p>Label(root,text="Nachnahme:").pack()<br>
nachname = entry2.pack()</p>
<p>#start window loop<br>
root.mainloop()</p>
<p>print(vorname)<br>
print(nachname)<br>
`<br>
In IDLE the Tk window was opened but in Geany only a Terminal window with "geany_run_script_93XQp0.sh" appears and that's it, nothing more happens. On Mac OS a script is started too, but then the Tk windows appears. Whats wrong here ?<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/34654103/90960244-9a215f00-e4a0-11ea-86e2-74a7baa73642.png"><img src="https://user-images.githubusercontent.com/34654103/90960244-9a215f00-e4a0-11ea-86e2-74a7baa73642.png" alt="200822_Geany_Tkinter_only_run_script" style="max-width:100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/34654103/90960248-9f7ea980-e4a0-11ea-9d83-718f636fb8de.png"><img src="https://user-images.githubusercontent.com/34654103/90960248-9f7ea980-e4a0-11ea-9d83-718f636fb8de.png" alt="200822_IDLE_Tkinter_first_runs" style="max-width:100%;"></a></p>
<p>Thank You very much !</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2578">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ73D6CMOR4LRUUDX4TSB7UEJANCNFSM4QIFEDAQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJY5LBDLONKBK7743WTSB7UEJA5CNFSM4QIFEDA2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KGFKVQQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2578",
"url": "https://github.com/geany/geany/issues/2578",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>