Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do i run the code?
#1

Hello,
first, i'm total newbie in programming. Started yesterday. I have trouble to understand how to open the coded python files. I have Tkinter import (with GUI) but when i try to open that .py file it opens cmd and then immediately closes. I know that i don't have any errors because I tried the same code in IDLE and everything worked perfectly. (I'm using Visual studio code program by the way).
Hope You understand
thanks!
Reply
#2
python filename.py
for more info here
https://python-forum.io/Thread-Basic-How...ython-code
Recommended Tutorials:
Reply
#3
Sorry but i didn't understand that well
Reply
#4
Please show your code with tkinter.
It's hard to help without seeing what you are trying to do.
tkinter requires a minimum amount of code, like:
import tkinter as tk

root = tk.Tk()
root.title('My first app')
root.mainloop()
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020