Is there a way to find out where is my python installed using OS?
Well i know that if we open a shell and run this:
import os
os.getcwd()
it will work but can we do this in idle too ?
when its saved on desktop for example ?
actually I'm looking for this output for example:
C:\Users\user\AppData\Local\Programs\Python\Python37
os.getcwdreturns your current working directory, not the location of either your script or the Python executable.sys.executablereturns the path of Python itself;sys.argv[0]is the location of the script (though it may be a path relative to you current working directory) when applicable.