'trying to learn python tkinter. but when i run the following code the tkinter window does not open[error: "RMS" is not defined"] "
Solution 1:[1]
The indentation in the code is wrong because of which main is being checked inside the class definition.
The indentation should be as below:
from tkinter import *
class RMS:
self.root = root
....
self.root.geometry("...")
if __name__ == "main":
root = TK()
obj = RMS(root)
....
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Manu mathew |

