I have strange behavior of the below code. When I run this code from PyCharm level it works properly and return this window (including gif with Python logo!): Window with Python logo
When I run the same python code but with using .bat and .vbs files. It will give me such error:
One more thing... ".vbs" file is automatically started when windows (operating system) is turn on. ".vbs" file opening ".bat" file and ".bat" file opening ".py" file.
Do you know why python code is no able to find ".gif" when it is starting with windows operating system.
Here is code:
import tkinter as tk
class KeypadTest():
def __init__(self, master):
self.master = master
self.time_display = tk.IntVar()
global logo
logo = tk.PhotoImage(file="indeks_gif.gif")
tk.Label(self.master, height=10, width=10 , textvariable=self.time_display,bg="red").pack(side="right")
Info = """INFO"""
tk.Label(self.master,compound = tk.CENTER,image=logo,text=Info).pack()
master = tk.Tk()
KT = KeypadTest(master)
master.mainloop()