How can you use tags to get access to a create_rectangle() object?How can I safely create a nested directory?How do you split a list into evenly sized chunks?How do I return multiple values from a function?How to get the current time in PythonHow can I make a time delay in Python?How can you profile a Python script?Proper way to declare custom exceptions in modern Python?How do I parse XML in Python?How to access environment variable values?How to iterate over rows in a DataFrame in Pandas?
Beginner to guitar playing - where should I begin?
What are the occurences of total war in the Native Americans?
Is it possible to paint an object inside with one texture and outside with another?
How to prevent a hosting company from accessing a VM's encryption keys?
Talk interpreter
How can I download a file from a host I can only SSH to through another host?
Number of academics in various EU countries
Is one hour layover sufficient at Singapore Changi Airport (Indian citizen travelling from US to India)?
Thought experiment and possible contradiction between electromagnetism and special relativity
Can an Arcane Focus be embedded in one's body?
Why is the UK so keen to remove the "backstop" when their leadership seems to think that no border will be needed in Northern Ireland?
Hangman game in Python - need feedback on the quality of code
Half filled water bottle
LINQ for generating all possible permutations
What's special ammo in Destiny 2?
Why did my folder names end up like this, and how can I fix this using a script?
Under what circumstances does intermodulation become an issue in a filter after LNA setup?
Is it allowed to work ONLINE on F-1 visa?
Disk usage of integer column vs boolean column in Postgres
What stops you from using fixed income in developing countries?
How do you capitalize agile costs with less mature teams?
What do Teignmouth, Paris, Ulm, Auxerre, Brunswick, Beaumont-en-Auge, and Ryazan have in common?
rationalizing sieges in a modern/near-future setting
Cooking Scrambled Eggs
How can you use tags to get access to a create_rectangle() object?
How can I safely create a nested directory?How do you split a list into evenly sized chunks?How do I return multiple values from a function?How to get the current time in PythonHow can I make a time delay in Python?How can you profile a Python script?Proper way to declare custom exceptions in modern Python?How do I parse XML in Python?How to access environment variable values?How to iterate over rows in a DataFrame in Pandas?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm writing the game of life in Python and need to get access to the rectangles I created on my canvas, I have assigned tags to the rectangles named 'filled'.
How can I use tags to get access to the filled rectangles so I'd be able to check the neighbours around each rectangle that I have given the attribute tag 'filled'? If there is such a way or any suggestions on how I can found the neighbours.
python tkinter tags tkinter-canvas
add a comment |
I'm writing the game of life in Python and need to get access to the rectangles I created on my canvas, I have assigned tags to the rectangles named 'filled'.
How can I use tags to get access to the filled rectangles so I'd be able to check the neighbours around each rectangle that I have given the attribute tag 'filled'? If there is such a way or any suggestions on how I can found the neighbours.
python tkinter tags tkinter-canvas
Post your code, possible solutions depend on how you represented cells, and the data structure you hold them in.
– Reblochon Masque
Mar 30 at 5:55
add a comment |
I'm writing the game of life in Python and need to get access to the rectangles I created on my canvas, I have assigned tags to the rectangles named 'filled'.
How can I use tags to get access to the filled rectangles so I'd be able to check the neighbours around each rectangle that I have given the attribute tag 'filled'? If there is such a way or any suggestions on how I can found the neighbours.
python tkinter tags tkinter-canvas
I'm writing the game of life in Python and need to get access to the rectangles I created on my canvas, I have assigned tags to the rectangles named 'filled'.
How can I use tags to get access to the filled rectangles so I'd be able to check the neighbours around each rectangle that I have given the attribute tag 'filled'? If there is such a way or any suggestions on how I can found the neighbours.
python tkinter tags tkinter-canvas
python tkinter tags tkinter-canvas
edited Mar 29 at 1:05
user2152012
asked Mar 27 at 17:58
user2152012user2152012
511 gold badge1 silver badge9 bronze badges
511 gold badge1 silver badge9 bronze badges
Post your code, possible solutions depend on how you represented cells, and the data structure you hold them in.
– Reblochon Masque
Mar 30 at 5:55
add a comment |
Post your code, possible solutions depend on how you represented cells, and the data structure you hold them in.
– Reblochon Masque
Mar 30 at 5:55
Post your code, possible solutions depend on how you represented cells, and the data structure you hold them in.
– Reblochon Masque
Mar 30 at 5:55
Post your code, possible solutions depend on how you represented cells, and the data structure you hold them in.
– Reblochon Masque
Mar 30 at 5:55
add a comment |
0
active
oldest
votes
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%2f55383748%2fhow-can-you-use-tags-to-get-access-to-a-create-rectangle-object%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using 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%2f55383748%2fhow-can-you-use-tags-to-get-access-to-a-create-rectangle-object%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
Post your code, possible solutions depend on how you represented cells, and the data structure you hold them in.
– Reblochon Masque
Mar 30 at 5:55