Did I find the right examples for you? yes no

All Samples(919)  |  Call(880)  |  Derive(0)  |  Import(39)

        def S_IMODE(mode):
    return mode & 07777
        


src/f/u/fusepy-HEAD/examples/memoryll.py   fusepy(Download)
#!/usr/bin/env python
 
from collections import defaultdict
from errno import ENOENT, EROFS
from stat import S_IFMT, S_IMODE, S_IFDIR, S_IFREG
            if key == 'st_mode':
                # Keep the old file type bit fields
                a['st_mode'] = S_IFMT(a['st_mode']) | S_IMODE(attr['st_mode'])
            else:
                a[key] = attr[key]

src/h/u/hunch-sample-app-HEAD/django/core/management/base.py   hunch-sample-app(Download)
    if not os.access(filename, os.W_OK):
        st = os.stat(filename)
        new_permissions = stat.S_IMODE(st.st_mode) | stat.S_IWUSR
        os.chmod(filename, new_permissions)
 

src/h/u/hunch-sample-app-HEAD/django/core/files/move.py   hunch-sample-app(Download)
    def copystat(src, dst):
        """Copy all stat info (mode bits, atime and mtime) from src to dst"""
        st = os.stat(src)
        mode = stat.S_IMODE(st.st_mode)
        if hasattr(os, 'utime'):

src/l/r/lrparsing-1.0.5/doc/examples/lua52.py   lrparsing(Download)
        output_filename = os.path.splitext(input_filename)[0] + ".py"
        open(output_filename, "w").write(compiled)
        mode = stat.S_IMODE(os.stat(input_filename).st_mode)
        try:
            os.chmod(output_filename, mode & 0777)

src/b/u/bup-HEAD/lib/bup/xstat.py   bup(Download)
def classification_str(mode, include_exec):
    if pystat.S_ISREG(mode):
        if include_exec \
           and (pystat.S_IMODE(mode) \
                & (pystat.S_IXUSR | pystat.S_IXGRP | pystat.S_IXOTH)):

src/r/d/rdiff-backup-HEAD/rdiff_backup/rpath.py   rdiff-backup(Download)
	data['type'] = type
	data['size'] = statblock[stat.ST_SIZE]
	data['perms'] = stat.S_IMODE(mode)
	data['uid'] = statblock[stat.ST_UID]
	data['gid'] = statblock[stat.ST_GID]

src/t/o/topaz-HEAD/topaz/objects/fileobject.py   topaz(Download)
    def method_setgidp(self, space):
        return space.newbool(bool(stat.S_IMODE(self.get_stat(space).st_mode) & stat.S_ISGID))
 
    @classdef.method("setuid?")
    def method_setuidp(self, space):
        return space.newbool(bool(stat.S_IMODE(self.get_stat(space).st_mode) & stat.S_ISUID))
    def method_stickyp(self, space):
        return space.newbool(bool(stat.S_IMODE(self.get_stat(space).st_mode) & stat.S_ISVTX))
 
    @classdef.method("symlink?")
    def method_symlinkp(self, space):
    def method_world_readablep(self, space):
        if stat.S_IMODE(self.get_stat(space).st_mode) & stat.S_IROTH:
            return self.get_w_mode(space)
        return space.w_nil
 
    @classdef.method("world_writable?")
    def method_world_writablep(self, space):
        if stat.S_IMODE(self.get_stat(space).st_mode) & stat.S_IWOTH:

src/l/f/lfm-2.3/lfm/files.py   lfm(Download)
    except:
        group = unicode(st[stat.ST_GID])
    return (typ, stat.S_IMODE(st[stat.ST_MODE]), owner, group,
            size, st[stat.ST_MTIME])
 

src/g/r/GridBackup-HEAD/grid_backup/path.py   GridBackup(Download)
 
    data['type'] = typ
    data['perm'] = stat.S_IMODE(mode)
    data['ownr'] = "%d:%d" % (statblock[stat.ST_UID], statblock[stat.ST_GID])
    if (statblock[stat.ST_NLINK] > 1 and typ != 'dir'):

src/u/b/ubiquity-HEAD/scripts/plugininstall.py   ubiquity(Download)
 
                # Now actually copy source to target.
                mode = stat.S_IMODE(st.st_mode)
                if stat.S_ISLNK(st.st_mode):
                    linkto = os.readlink(sourcepath)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next