K
K
Kairat Ibraev2022-04-07 09:05:57
Python
Kairat Ibraev, 2022-04-07 09:05:57

What to use instead of os.chown in python for windows? Are there any alternatives?

I am learning Python from the book "Lubanovich Bill - Simple Python", I work on the command line from under windows 10, I got to the topic "files, directories" and stumbled upon this problem:
The chown () function of the os module changes the owner and is only available under UNIX OS . Error when executing command on windows command lineos.chown('oops', uid, gid)

AttributeError: module 'os' has no attribute 'chown'.
Since UNIX Winodws and MacOS have different file systems, the command is not executable. Question: Is there any workaround for Windows? Any alternatives to this feature?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kisaa, 2022-04-07
@lunsy

Not exactly chown, but the direction asks like this:
https://stackoverflow.com/questions/12168110/how-t...

K
Kairat Ibraev, 2022-04-07
@lunsy

Kisaa turned out to have the most adequate answer, the rest of the "helpers" "cackled" because of the bold font, which makes the text more understandable and does not contradict any rules

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question