Be sure to capture the user's operating system first before implementing a Windows specific approach.
I am currently writing a python file that is meant to be run through the command line like pip and npm, but I also need to know when the user launches it directly through the file explorer (as in windows). Is this completely impossible (restricted to the program only knowing that it's run with no sys.argv arguments), or is there a way to make the program differentiate if it's being run directly through something like  the file explorer, or if it's being run through the command line? Thanks!
how can you know if the python file is run directly and not from the command line?