0

I searched all over and found this

from os import stat
from pwd import getpwuid
filename='test.txt'
def find_owner(filename):
    return getpwuid(stat(filename).st_uid).pw_name

But in windows environment this is giving error

ImportError: No module named pwd

P.S I dont want to install any additional module and PWD isn't an inbuilt module. So a solution where there is no need to install any module is required.

The question is unique as the marked duplicate doesn't has an accepted answer first or all and then that answer too shows dependency on third party module which I clearly said I don't want.

EXODIA
  • 908
  • 3
  • 10
  • 28

0 Answers0