Python Forum
Do you know what is that, in my terminal setings?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do you know what is that, in my terminal setings?
#1
I finally manage to install the visual code IDE and when I give it a simple code :
import tkinter as tk
import time
tk = tk.Tk()

self.geometry("350x500")
self.resizable(height = False, width = False)
self.title('Calculator')



class Sscalc():
    file = ("Main.png")
    image = file
    time = 5
    

def frm():
    Frame(self,image,time)

def lbl():
    Label(self,image,time)

self.after(5000)
self.destroy


if __name__ == "__main__":
    
    self.mainloop
it gives me this "warning": 'The terminal process failed to launch: Path to shell executable "C:\Python 385\Scripts\__pycache__" is not a file of a symlink.'
When I start to debug the program it falls into an infinite loop.
What peculiarity is that?
Huh
P.S.
I noticed that in the "warning" refers to the python 385 version, while I`m running the 374 one.
Reply
#2
Before anything else, this code will produce NameError:
Error:
self.geometry("350x500") NameError: name 'self' is not defined
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
The code as a whole doesn't really make any sense:

Your Sscalc class creates some variables that aren't used anywhere. Are they actually supposed to be instance variables? Those should be created within __init__, though you don't have any instances anywhere.

The two functions create some values and just throw them away, rather than returning them or otherwise doing something with them. Those functions aren't called anywhere, either.

Line 29: Is mainloop a method? It isn't being called (it's missing the parens).
Reply
#4
Thank you for your replies, ndc85430 you are wright as, while it is just my initial image and I destroyed it in the end, I would not be able to copy the frame and the label as I was intending to, thereafter I will not include it in a class, maybe Ill do it in the next steps of my app, buran I should first define them through a frame and afterward Ill use a geometry manager.
Thanks, for your advice.
I am not getting messages, every time an answer is posted in my threads in the forum.
I should dedicate some of my time to fix it.
Reply


Forum Jump:

User Panel Messages

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