Sindre Myren smyr...@gmail.com added the comment:
Thank you very much for the clarification :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5220
___
Sindre Myren smyr...@gmail.com added the comment:
I don't understand what you mean when you say how umask works in
relation to Python. How it works in relation to Python isn't different
from how it works for any other Unix program. Consider, for example,
the unix man page for 'open'.
This
Sindre Myren smyr...@gmail.com added the comment:
*Sorry.. A bit quick there. The line
os.mkdir('test4')
should have been:
os.mkdir('test4', 0777)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5220
Martin v. Löwis mar...@v.loewis.de added the comment:
I (as a programmer) have never seen the specific code for python's
mkdir function, And I have no way to know whether I should presume
that mkdir in python works the same way as the gnu command or not.
Unless it is documented that is.
You
Sindre Myren smyr...@gmail.com added the comment:
I have to agree with jab. While the way relative paths works are more or less
common knowledge, the way umask does and does not work in relation to python
isn't.
It is however given a short description at
R. David Murray rdmur...@bitdance.com added the comment:
I don't understand what you mean when you say how umask works in relation to
Python. How it works in relation to Python isn't different from how it works
for any other Unix program. Consider, for example, the unix man page for
'open'.
New submission from Joshua Bronson jabron...@gmail.com:
os.makedirs' mode argument defaults to a hardcoded value of 511 (0777 in
octal). This forces the caller to either pass in a different hardcoded value
(commonly 0750), or to implement a workaround that calculates the expected
mode based
Martin v. Löwis mar...@v.loewis.de added the comment:
I don't understand the problem. The directory creation *does* take the
umask into account - that's the whole point of the umask! The directory
being created has the bits (mode ~umask 0777) set - because of the
semantics of mkdir(2), not
Joshua Bronson jabron...@gmail.com added the comment:
Ah, I was misunderstanding the behavior of mkdir, thank you for the
explanation.
My misunderstanding stemmed from recently coming across two widely-used
packages which both pass mode=0750 to os.makedirs. I have no idea why
they would be
Martin v. Löwis mar...@v.loewis.de added the comment:
My misunderstanding stemmed from recently coming across two widely-used
packages which both pass mode=0750 to os.makedirs. I have no idea why
they would be doing this (as it effectively throws away part of the
umask), unless they too
Joshua Bronson jabron...@gmail.com added the comment:
My suspicion is that people setting explicit file permissions
typically know what they are doing, and that you will find that
your tickets get closed as invalid, explaining to you that this
mode usage is fully intentional.
For what it's
11 matches
Mail list logo