[Tutor] How to get file permissions (Python 2.4)?
Steven D'Aprano
steve at pearwood.info
Thu Mar 20 02:33:20 CET 2014
On Thu, Mar 20, 2014 at 01:13:28AM +0000, Alan Gauld wrote:
> On 19/03/14 16:48, leam hall wrote:
> >I can use os.chmod('/usr/local/somefile') to change permissions but I
> >haven't been able to find a way to test for file modes.
> >
> >>>>stat.S_IRWXU('/usr/bin/python')
> >Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> >TypeError: 'int' object is not callable
> >
> >What should I be looking for? Python 2.4.3 (RHEL 5)
>
> v2.4? Hmm, old. I think this is still valid tho'....
2.4 is old, but it's still supported by Red Hat Enterprise Linux, so it
will be around for a few more years.
--
Steven
More information about the Tutor
mailing list