I'm trying to make a GUI for a password logger program. Right now I'm only trying to learn how making a GUI works but only ten lines in, My program wont run because of a supposed syntax error.
import tkinter as tk
from tkinter import filedialog, Text
import os
root = tk.Tk()
canvas = root.Canvas(root, height=700, width=700, bg="#263d42")
canvas.pack()
root.mainloop()
This is the entire script. The error looks like this:
File "<stdin>", line 1 & c:/FileLocation/main.py"
^
SyntaxError: invalid syntax
I've tried removing unnecessary imports but I get the same issue.
I am only trying to get the program to display a canvas on the screen.