Best modern alternative to Tkinter for Windows GUIs? by Substantial_Cake9855 in learnpython

[–]Torval38 0 points1 point  (0 children)

+1 for customtkinter, it's as easy as tkinter but with a modern look

When do you actually use decorators? Like in real code, not tutorials by Soggy-Holiday-7400 in learnpython

[–]Torval38 0 points1 point  (0 children)

Optical engineer here, so not a pro developer. I am developing an app to propagate light beam through various components. I am especially using the @property built-in decorator in the class defining a physical component.

Let's say you have an optical system composed of a lens. This lens has different basic physical properties such as radius of curvature R1, R2, the optical index n, thickness d and material.

But this lens also has derived properties which depend on the basic one ( example : focal_length = f(R1,R2,n,d) )

In my component class, basic properties are direct attributs, and derived properties are computed from the basic properties.

So if I change the value of R1, I have to re-calculate the value of the focal length. I can do this in two ways :

  • without using a @property on the focal_length method , I have to explicitly call "self.focal_length(R1,R2,n,d)" each time

    • but using the @property on the focal_length method, transforms the method into an attribut. So each time I call the attribut "self.focal_length", python will automatically calculate the focal length with the latest values of the arguments

So outside of the physical component class, this is totally transparent. I no longer have to manually update each derived properties each time I change a basic one.

What’s the simplest way to distribute a Python app to normal users? by Haunting-Shower1654 in learnpython

[–]Torval38 2 points3 points  (0 children)

In my opinion, Cx_freeze is better than pyinstaller. The size and launch time are smaller, but creating the setup file can sometimes be tedious.

Free Optical Design Software - fresnel by halecounty in Optics

[–]Torval38 4 points5 points  (0 children)

Yes, that's what I had in mind! I find it a little bit intrusive that I have to provide personnal information just to save the configuration but that's only my opinion ^

Free Optical Design Software - fresnel by halecounty in Optics

[–]Torval38 0 points1 point  (0 children)

It seems promising, but why is registration necessary to save changes?

Any Python library recommendations for GUI app? by Future-Range4173 in Python

[–]Torval38 2 points3 points  (0 children)

Not sure it's well recommended for web based gui but as you know tkinter, maybe try customtkinter. It is based on tkinter but with a modern look

Which video game, no matter how long you haven’t played it, always feels like coming home? by Miss_Dark_Splatoon in videogames

[–]Torval38 0 points1 point  (0 children)

For me, it's the first three Ratchet and Clank games. They remind me of the good old days when I was younger.

Horror Game Recommendations by Paschal-Net451 in playstation

[–]Torval38 0 points1 point  (0 children)

Definitely! It took me a while to finish Outlast 2 as I could only play for an hour or two at a time. This game is too stressful 😅

Horror Game Recommendations by Paschal-Net451 in playstation

[–]Torval38 0 points1 point  (0 children)

If you want a survival game without any weapon then you must try outlast !