Teaching myself Python Day 1

avatar

I have decided to start by following a tutorial to learn how to display data in a window and the add various code to get data to display. I am following: https://likegeeks.com/python-gui-examples-tkinter-tutorial/

Here is the display from today's code which I will post below the picture.
pylearnday1.png

from tkinter import *

window =Tk()
window.title("Pylearn Day 1")
window.geometry('1024x768')
lbl = Label(window, text="hello", font=("Arial Bold", 50))
lbl.grid(column=10, row=10)
def clicked():
    lbl.configure(text="Button 2 was clicked !!", font=("Arial Bold", 14))
button_1 = Button(window, text="Button 1", bg="orange", fg="red")
button_2 = Button(window, text="Button 2", fg="blue", command=clicked)
button_1.grid(column=1, row=0)
button_2.grid(column=2, row=9)

window.mainloop()

Short but sweet for today.



0
0
0.000
7 comments
avatar

@mytechtrail, when did you start to learn how to write code with Python?

Posted using Partiko Android

0
0
0.000
avatar

I do not consider my self a programmer, but I have been writing basic Python code off and on for over a year. I have written basic (dBase, C, Visual Basic, Perl) code in for over 25 years.

0
0
0.000
avatar

You got a GUI? Doing better than me. Anything related to UI just destroys me.

0
0
0.000
avatar

Well Tk is included with Python 3 installs, so just an import.

Web UI will come much later....

0
0
0.000
avatar

lol, never got around to that ... and by the time i do maybe Julia will catch up , i read Python 2 is going out too somewhere. I think on slashdot but here it is too, i have something here somewhere , a modified python script to post and vote that picks the body from a pregenerated file and i doubt i'll ever need more to get by here lol, unless for some reason steempy cli stops working and i have to go through the drag to get to Python just for that. I never really saw the need for it and with atm heavy into Phaser3(javascript) + php , of which i think i barely scratched the surface, combined with my talent for chaos and disorder it would probably be a bad idea too but hey ... now i know where to ask questions :p

i never heard much good about Python really other than that its widely adopted for some reason (probably the forced structure), its heavy and resource hungry, eats a lot of memory and all that, all in all not something i'd expect to be on top but well ...

if i ever need a discours on how to do transactions on the chain, i will find you haha

0
0
0.000
avatar

Hello fellow @mytechtrail

Your post was upvoted with 40.86% ($0.0125) because you are an awesome member of s77assistant group.

You have earn a total of $0.6978 so far. keep it up.
Together we can achieve our goal and push STEEM to the moon.

You can increase your upvote value by increasing your collected points with one of the following ways:

  1. Delegating more SP will generate more points per day,
  2. Inviting other steemians to join our group with !invite(@membername) command,
  3. Transfering Steem/SBD

Don't forget to use EnhancedSBI functionality every day and get 3 SBI shares for every 2 STEEM you send with 2for3 memo.


At the current time my full vote worth $0.0305 but with your help this can change.
Delegating power will increase my vote worth and your reward.
50SP, 100SP, 250SP, 500SP, 1,000SP, 5,000SP, Custom Amount
Make sure you have at least 15 SP left on your account.


Visit s77assistant's daily report to stay informed about any news


s77assistant now supports his first game.
image.png

0
0
0.000
avatar

Good luck! I remember starting to code many years ago. Switched languages many times. Tried different frameworks and plattforms. Somehow the early stages are the most satisfying ones. Stuff is simple and progression is fast.
Good old times...

Posted using Partiko Android

0
0
0.000