python - get the root from tkinter for turtle

0 votes
I am trying to get the root from tkinter for turtle. How do I get that?
Jul 5, 2019 in Python by Haseeb
114 views

1 answer to this question.

0 votes

Hey @Haseeb, try something like this:

import turtle

canvas = turtle.getcanvas()
root = canvas.winfo_toplevel()
answered Jul 5, 2019 by Barbara

Related Questions In Python

0 votes
1 answer

How to get the return value from a thread using python?

You don't need to change your existing ...READ MORE

answered Dec 3, 2018 in Python by Nymeria
• 3,520 points

edited Dec 19, 2018 by Nymeria 35,900 views
0 votes
1 answer

I'm working on a Summer dataset for practice in Python. However I get the below error:

Hi@Pratap, I think to find duplicate values using ...READ MORE

answered Jun 15 in Python by MD
• 40,940 points
81 views
0 votes
1 answer

How can I find out the index of an element from row and column in Python?

You probably want to use np.ravel_multi_index: [code] import numpy ...READ MORE

answered Apr 16, 2018 in Python by charlie_brown
• 7,780 points
272 views
0 votes
1 answer

Where can I get the list of Python keywords?

Just import a module “keyword”. Here you ...READ MORE

answered Apr 19, 2018 in Python by aayushi
• 750 points
77 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,179 views
0 votes
0 answers
+4 votes
6 answers
0 votes
1 answer

What are the naming conventions for variables and data types in python?

There are certain rules that we have ...READ MORE

answered May 20, 2019 in Python by Mohammad
• 3,210 points
171 views
0 votes
1 answer