How to get the name of an instance to affect a tkinter labelHow to get the ASCII value of a character?How to get a function name as a string in Python?How to get the current time in PythonGetting the class name of an instance?How to get line count cheaply in Python?How to get a JavaScript object's class?How do I get the number of elements in a list?Naming Classes - How to avoid calling everything a “<WhatEver>Manager”?ttk tkinter multiple frames/windowsPython timer in math game Tkinter
is "prohibition against," a double negative?
Fixing a blind bolt hole when the first 2-3 threads are ruined?
In Endgame, wouldn't Stark have remembered Hulk busting out of the stairwell?
How to understand payment due date for credit card?
Why do presidential pardons exist in a country having a clear separation of powers?
What should be done with the carbon when using magic to get oxygen from carbon dioxide?
Why military weather satellites?
How to handle inventory and story of a player leaving
Scaling arrows.meta with tranform shape
Board Chinese train at a different station (on-route)
Defending Castle from Zombies
Why does Sauron not permit his followers to use his name?
How can I fix cracks between the bathtub and the wall surround?
Was it illegal to blaspheme God in Antioch in 360.-410.?
How to stay mindful of the gap in the breath
Do manacles provide any sort of in-game mechanical effect or condition?
Why doesn't Starship have four landing legs?
What is the sound/audio equivalent of "unsightly"?
Storing milk for long periods of time
Idiomatic way to create an immutable and efficient class in C++?
How to save money by shopping at a variety of grocery stores?
Are spot colors limited and why CMYK mix is not treated same as spot color mix?
Get contents before a colon
Can two aircraft be allowed to stay on the same runway at the same time?
How to get the name of an instance to affect a tkinter label
How to get the ASCII value of a character?How to get a function name as a string in Python?How to get the current time in PythonGetting the class name of an instance?How to get line count cheaply in Python?How to get a JavaScript object's class?How do I get the number of elements in a list?Naming Classes - How to avoid calling everything a “<WhatEver>Manager”?ttk tkinter multiple frames/windowsPython timer in math game Tkinter
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'd like to be able to call a subroutine with an instance of a class passed to it and then use a string of the name of the instance to affect which tkinter label is updated.
I know this is an oddly specific and convoluted way of asking something that's probably quite simple but I'm bad at articulating what I need into google.
I'm making a fallout inspired game and I'd like to let the player choose an enemy to shoot at and update their health meter. So far I have all the maths behind the shooting subroutine down, I just don't know how to target the correct label widget at the end
from tkinter import *
Root = Tk()
PlrWeapon = ["Pipe Revolver Rifle",6,5,0]
class Raider:
Species = "Human"
def __init__(self, Name, Level, MaxHealth, Health, Alive, Unique, Weapon, Armour):
self.Name = Name
self.Level = Level
self.MaxHealth = MaxHealth
self.Health = Health
self.Alive = Alive
self.Unique = Unique
self.Weapon = Weapon
self.Armour = Armour
def Shoot(self):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
Enemy1 = Raider("Tessa",
5,
50,
50,
True,
False,
["Pipe Pistol",3,2,0],
["Armourless",0,0,0])
Enemy2 = Raider("Bobby",
5,
50,
50,
True,
False,
["Pipe Rifle",5,4,0],
["Leather",2,3,1])
Shoot(Enemy1)
Enemy1Name = Label(Root, text=Enemy1.Name)
Enemy1Name.grid(row=0, column=0)
Enemy1Health = Label(Root, text=Enemy1.Health)
Enemy1Health.grid(row=0, column=1)
Enemy2Name = Label(Root, text=Enemy2.Name)
Enemy2Name.grid(row=1, column=0)
Enemy2Health = Label(Root, text=Enemy2.Health)
Enemy2Health.grid(row=1, column=1)
Root.mainloop()
ideally at the end of the Shoot()
routine there would be a part that acted like this
def Shoot(self):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
## start of wishful thinking ##
str(self)+"Health".config(text=self.Health)
If you understand what I'm trying to communicate and have a solution I would really appreciate the help. Thanks.
python python-3.x oop tkinter
add a comment |
I'd like to be able to call a subroutine with an instance of a class passed to it and then use a string of the name of the instance to affect which tkinter label is updated.
I know this is an oddly specific and convoluted way of asking something that's probably quite simple but I'm bad at articulating what I need into google.
I'm making a fallout inspired game and I'd like to let the player choose an enemy to shoot at and update their health meter. So far I have all the maths behind the shooting subroutine down, I just don't know how to target the correct label widget at the end
from tkinter import *
Root = Tk()
PlrWeapon = ["Pipe Revolver Rifle",6,5,0]
class Raider:
Species = "Human"
def __init__(self, Name, Level, MaxHealth, Health, Alive, Unique, Weapon, Armour):
self.Name = Name
self.Level = Level
self.MaxHealth = MaxHealth
self.Health = Health
self.Alive = Alive
self.Unique = Unique
self.Weapon = Weapon
self.Armour = Armour
def Shoot(self):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
Enemy1 = Raider("Tessa",
5,
50,
50,
True,
False,
["Pipe Pistol",3,2,0],
["Armourless",0,0,0])
Enemy2 = Raider("Bobby",
5,
50,
50,
True,
False,
["Pipe Rifle",5,4,0],
["Leather",2,3,1])
Shoot(Enemy1)
Enemy1Name = Label(Root, text=Enemy1.Name)
Enemy1Name.grid(row=0, column=0)
Enemy1Health = Label(Root, text=Enemy1.Health)
Enemy1Health.grid(row=0, column=1)
Enemy2Name = Label(Root, text=Enemy2.Name)
Enemy2Name.grid(row=1, column=0)
Enemy2Health = Label(Root, text=Enemy2.Health)
Enemy2Health.grid(row=1, column=1)
Root.mainloop()
ideally at the end of the Shoot()
routine there would be a part that acted like this
def Shoot(self):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
## start of wishful thinking ##
str(self)+"Health".config(text=self.Health)
If you understand what I'm trying to communicate and have a solution I would really appreciate the help. Thanks.
python python-3.x oop tkinter
" I just don't know how to target the correct label widget at the end". Could you please explain what you mean by this? I Get everything else, just this statement is a little confusing. Also, what is fallout? Is it a game? I am a noob at gaming so forgive me for this question.
– user11093202
Mar 28 at 4:10
add a comment |
I'd like to be able to call a subroutine with an instance of a class passed to it and then use a string of the name of the instance to affect which tkinter label is updated.
I know this is an oddly specific and convoluted way of asking something that's probably quite simple but I'm bad at articulating what I need into google.
I'm making a fallout inspired game and I'd like to let the player choose an enemy to shoot at and update their health meter. So far I have all the maths behind the shooting subroutine down, I just don't know how to target the correct label widget at the end
from tkinter import *
Root = Tk()
PlrWeapon = ["Pipe Revolver Rifle",6,5,0]
class Raider:
Species = "Human"
def __init__(self, Name, Level, MaxHealth, Health, Alive, Unique, Weapon, Armour):
self.Name = Name
self.Level = Level
self.MaxHealth = MaxHealth
self.Health = Health
self.Alive = Alive
self.Unique = Unique
self.Weapon = Weapon
self.Armour = Armour
def Shoot(self):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
Enemy1 = Raider("Tessa",
5,
50,
50,
True,
False,
["Pipe Pistol",3,2,0],
["Armourless",0,0,0])
Enemy2 = Raider("Bobby",
5,
50,
50,
True,
False,
["Pipe Rifle",5,4,0],
["Leather",2,3,1])
Shoot(Enemy1)
Enemy1Name = Label(Root, text=Enemy1.Name)
Enemy1Name.grid(row=0, column=0)
Enemy1Health = Label(Root, text=Enemy1.Health)
Enemy1Health.grid(row=0, column=1)
Enemy2Name = Label(Root, text=Enemy2.Name)
Enemy2Name.grid(row=1, column=0)
Enemy2Health = Label(Root, text=Enemy2.Health)
Enemy2Health.grid(row=1, column=1)
Root.mainloop()
ideally at the end of the Shoot()
routine there would be a part that acted like this
def Shoot(self):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
## start of wishful thinking ##
str(self)+"Health".config(text=self.Health)
If you understand what I'm trying to communicate and have a solution I would really appreciate the help. Thanks.
python python-3.x oop tkinter
I'd like to be able to call a subroutine with an instance of a class passed to it and then use a string of the name of the instance to affect which tkinter label is updated.
I know this is an oddly specific and convoluted way of asking something that's probably quite simple but I'm bad at articulating what I need into google.
I'm making a fallout inspired game and I'd like to let the player choose an enemy to shoot at and update their health meter. So far I have all the maths behind the shooting subroutine down, I just don't know how to target the correct label widget at the end
from tkinter import *
Root = Tk()
PlrWeapon = ["Pipe Revolver Rifle",6,5,0]
class Raider:
Species = "Human"
def __init__(self, Name, Level, MaxHealth, Health, Alive, Unique, Weapon, Armour):
self.Name = Name
self.Level = Level
self.MaxHealth = MaxHealth
self.Health = Health
self.Alive = Alive
self.Unique = Unique
self.Weapon = Weapon
self.Armour = Armour
def Shoot(self):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
Enemy1 = Raider("Tessa",
5,
50,
50,
True,
False,
["Pipe Pistol",3,2,0],
["Armourless",0,0,0])
Enemy2 = Raider("Bobby",
5,
50,
50,
True,
False,
["Pipe Rifle",5,4,0],
["Leather",2,3,1])
Shoot(Enemy1)
Enemy1Name = Label(Root, text=Enemy1.Name)
Enemy1Name.grid(row=0, column=0)
Enemy1Health = Label(Root, text=Enemy1.Health)
Enemy1Health.grid(row=0, column=1)
Enemy2Name = Label(Root, text=Enemy2.Name)
Enemy2Name.grid(row=1, column=0)
Enemy2Health = Label(Root, text=Enemy2.Health)
Enemy2Health.grid(row=1, column=1)
Root.mainloop()
ideally at the end of the Shoot()
routine there would be a part that acted like this
def Shoot(self):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
## start of wishful thinking ##
str(self)+"Health".config(text=self.Health)
If you understand what I'm trying to communicate and have a solution I would really appreciate the help. Thanks.
python python-3.x oop tkinter
python python-3.x oop tkinter
edited Mar 28 at 1:44
user11093202
asked Mar 27 at 22:09
Rees KRees K
296 bronze badges
296 bronze badges
" I just don't know how to target the correct label widget at the end". Could you please explain what you mean by this? I Get everything else, just this statement is a little confusing. Also, what is fallout? Is it a game? I am a noob at gaming so forgive me for this question.
– user11093202
Mar 28 at 4:10
add a comment |
" I just don't know how to target the correct label widget at the end". Could you please explain what you mean by this? I Get everything else, just this statement is a little confusing. Also, what is fallout? Is it a game? I am a noob at gaming so forgive me for this question.
– user11093202
Mar 28 at 4:10
" I just don't know how to target the correct label widget at the end". Could you please explain what you mean by this? I Get everything else, just this statement is a little confusing. Also, what is fallout? Is it a game? I am a noob at gaming so forgive me for this question.
– user11093202
Mar 28 at 4:10
" I just don't know how to target the correct label widget at the end". Could you please explain what you mean by this? I Get everything else, just this statement is a little confusing. Also, what is fallout? Is it a game? I am a noob at gaming so forgive me for this question.
– user11093202
Mar 28 at 4:10
add a comment |
1 Answer
1
active
oldest
votes
If I understood you correctly, you want to change the health label related to the Raider
object passed to Shoot
method.
Here is a solution which can work, but I am not sure if this is a suggested way of going as you have to be very careful.
def Shoot(self, win):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
win.nametowidget('.health'.format(self.Name)).config(text=self.Health)
Enemy1Name = Label(Root, text=Enemy1.Name, name='name'+Enemy1.Name)
Enemy1Name.grid(row=0, column=0)
Enemy1Health = Label(Root, text=Enemy1.Health, name='health'+Enemy1.Name)
Enemy1Health.grid(row=0, column=1)
Enemy2Name = Label(Root, text=Enemy2.Name, name='name'+Enemy2.Name)
Enemy2Name.grid(row=1, column=0)
Enemy2Health = Label(Root, text=Enemy2.Health, name='health'+Enemy2.Name)
Enemy2Health.grid(row=1, column=1)
The widgets are stored as a tree structure by tkinter, where your Tk()
window is root represented by .
. Then its children will be presented as .unique_widget1_id
and children of widget1 like .unique_widget1_id.unique_widget2_id
. By default, tkinter creates ids like .140343920750152
which can be seen through widget.__str__()
method.
But you can add user-defined names to widgets when creating them as shown in this solution(Please be sure that every widget have a unique name to avoid issues. If you create two widgets with same name then it will create only first widget and second one will be just a reference to the same widget). Then you can call nametowidget()
method on any widget/window and provide relative/absolute path to get widget object(and perform operations on widget).
Let me know if you have questions.
PS: Widget name can not start from upper-case letter.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55387233%2fhow-to-get-the-name-of-an-instance-to-affect-a-tkinter-label%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If I understood you correctly, you want to change the health label related to the Raider
object passed to Shoot
method.
Here is a solution which can work, but I am not sure if this is a suggested way of going as you have to be very careful.
def Shoot(self, win):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
win.nametowidget('.health'.format(self.Name)).config(text=self.Health)
Enemy1Name = Label(Root, text=Enemy1.Name, name='name'+Enemy1.Name)
Enemy1Name.grid(row=0, column=0)
Enemy1Health = Label(Root, text=Enemy1.Health, name='health'+Enemy1.Name)
Enemy1Health.grid(row=0, column=1)
Enemy2Name = Label(Root, text=Enemy2.Name, name='name'+Enemy2.Name)
Enemy2Name.grid(row=1, column=0)
Enemy2Health = Label(Root, text=Enemy2.Health, name='health'+Enemy2.Name)
Enemy2Health.grid(row=1, column=1)
The widgets are stored as a tree structure by tkinter, where your Tk()
window is root represented by .
. Then its children will be presented as .unique_widget1_id
and children of widget1 like .unique_widget1_id.unique_widget2_id
. By default, tkinter creates ids like .140343920750152
which can be seen through widget.__str__()
method.
But you can add user-defined names to widgets when creating them as shown in this solution(Please be sure that every widget have a unique name to avoid issues. If you create two widgets with same name then it will create only first widget and second one will be just a reference to the same widget). Then you can call nametowidget()
method on any widget/window and provide relative/absolute path to get widget object(and perform operations on widget).
Let me know if you have questions.
PS: Widget name can not start from upper-case letter.
add a comment |
If I understood you correctly, you want to change the health label related to the Raider
object passed to Shoot
method.
Here is a solution which can work, but I am not sure if this is a suggested way of going as you have to be very careful.
def Shoot(self, win):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
win.nametowidget('.health'.format(self.Name)).config(text=self.Health)
Enemy1Name = Label(Root, text=Enemy1.Name, name='name'+Enemy1.Name)
Enemy1Name.grid(row=0, column=0)
Enemy1Health = Label(Root, text=Enemy1.Health, name='health'+Enemy1.Name)
Enemy1Health.grid(row=0, column=1)
Enemy2Name = Label(Root, text=Enemy2.Name, name='name'+Enemy2.Name)
Enemy2Name.grid(row=1, column=0)
Enemy2Health = Label(Root, text=Enemy2.Health, name='health'+Enemy2.Name)
Enemy2Health.grid(row=1, column=1)
The widgets are stored as a tree structure by tkinter, where your Tk()
window is root represented by .
. Then its children will be presented as .unique_widget1_id
and children of widget1 like .unique_widget1_id.unique_widget2_id
. By default, tkinter creates ids like .140343920750152
which can be seen through widget.__str__()
method.
But you can add user-defined names to widgets when creating them as shown in this solution(Please be sure that every widget have a unique name to avoid issues. If you create two widgets with same name then it will create only first widget and second one will be just a reference to the same widget). Then you can call nametowidget()
method on any widget/window and provide relative/absolute path to get widget object(and perform operations on widget).
Let me know if you have questions.
PS: Widget name can not start from upper-case letter.
add a comment |
If I understood you correctly, you want to change the health label related to the Raider
object passed to Shoot
method.
Here is a solution which can work, but I am not sure if this is a suggested way of going as you have to be very careful.
def Shoot(self, win):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
win.nametowidget('.health'.format(self.Name)).config(text=self.Health)
Enemy1Name = Label(Root, text=Enemy1.Name, name='name'+Enemy1.Name)
Enemy1Name.grid(row=0, column=0)
Enemy1Health = Label(Root, text=Enemy1.Health, name='health'+Enemy1.Name)
Enemy1Health.grid(row=0, column=1)
Enemy2Name = Label(Root, text=Enemy2.Name, name='name'+Enemy2.Name)
Enemy2Name.grid(row=1, column=0)
Enemy2Health = Label(Root, text=Enemy2.Health, name='health'+Enemy2.Name)
Enemy2Health.grid(row=1, column=1)
The widgets are stored as a tree structure by tkinter, where your Tk()
window is root represented by .
. Then its children will be presented as .unique_widget1_id
and children of widget1 like .unique_widget1_id.unique_widget2_id
. By default, tkinter creates ids like .140343920750152
which can be seen through widget.__str__()
method.
But you can add user-defined names to widgets when creating them as shown in this solution(Please be sure that every widget have a unique name to avoid issues. If you create two widgets with same name then it will create only first widget and second one will be just a reference to the same widget). Then you can call nametowidget()
method on any widget/window and provide relative/absolute path to get widget object(and perform operations on widget).
Let me know if you have questions.
PS: Widget name can not start from upper-case letter.
If I understood you correctly, you want to change the health label related to the Raider
object passed to Shoot
method.
Here is a solution which can work, but I am not sure if this is a suggested way of going as you have to be very careful.
def Shoot(self, win):
Damage = 0
for i in range(1,4):
Difference = PlrWeapon[i] - self.Armour[i]
if Difference >= 0:
Damage = Damage + Difference
self.Health = self.Health - Damage
if self.Health <= 0:
self.Alive = False
win.nametowidget('.health'.format(self.Name)).config(text=self.Health)
Enemy1Name = Label(Root, text=Enemy1.Name, name='name'+Enemy1.Name)
Enemy1Name.grid(row=0, column=0)
Enemy1Health = Label(Root, text=Enemy1.Health, name='health'+Enemy1.Name)
Enemy1Health.grid(row=0, column=1)
Enemy2Name = Label(Root, text=Enemy2.Name, name='name'+Enemy2.Name)
Enemy2Name.grid(row=1, column=0)
Enemy2Health = Label(Root, text=Enemy2.Health, name='health'+Enemy2.Name)
Enemy2Health.grid(row=1, column=1)
The widgets are stored as a tree structure by tkinter, where your Tk()
window is root represented by .
. Then its children will be presented as .unique_widget1_id
and children of widget1 like .unique_widget1_id.unique_widget2_id
. By default, tkinter creates ids like .140343920750152
which can be seen through widget.__str__()
method.
But you can add user-defined names to widgets when creating them as shown in this solution(Please be sure that every widget have a unique name to avoid issues. If you create two widgets with same name then it will create only first widget and second one will be just a reference to the same widget). Then you can call nametowidget()
method on any widget/window and provide relative/absolute path to get widget object(and perform operations on widget).
Let me know if you have questions.
PS: Widget name can not start from upper-case letter.
answered Mar 28 at 5:31
KamalKamal
1,5601 gold badge6 silver badges20 bronze badges
1,5601 gold badge6 silver badges20 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55387233%2fhow-to-get-the-name-of-an-instance-to-affect-a-tkinter-label%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
" I just don't know how to target the correct label widget at the end". Could you please explain what you mean by this? I Get everything else, just this statement is a little confusing. Also, what is fallout? Is it a game? I am a noob at gaming so forgive me for this question.
– user11093202
Mar 28 at 4:10