Did I find the right examples for you? yes no

All Samples(18)  |  Call(0)  |  Derive(0)  |  Import(18)
int(x=0) -> int or long
int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments
are given.  If x is floating point, the conversion truncates towards zero.
If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.(more...)

src/l/l/llfuse-0.40/examples/tmpfs.py   llfuse(Download)
    def symlink(self, inode_p, name, target, ctx):
        mode = (stat.S_IFLNK | stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | 
                stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP | 
                stat.S_IROTH | stat.S_IWOTH | stat.S_IXOTH)
        return self._create(inode_p, name, mode, ctx, target=target)

src/f/u/fusepy-HEAD/examples/memory.py   fusepy(Download)
from collections import defaultdict
from errno import ENOENT
from stat import S_IFDIR, S_IFLNK, S_IFREG
from sys import argv, exit
from time import time
    def symlink(self, target, source):
        self.files[target] = dict(st_mode=(S_IFLNK | 0777), st_nlink=1,
                                  st_size=len(source))
 
        self.data[target] = source

src/l/i/lib-pyFreenet-staging-HEAD/fcp/freenetfs.py   lib-pyFreenet-staging(Download)
            mode |= stat.S_IFIFO
        if kw.get('islink', False):
            mode |= stat.S_IFLNK
        if kw.get('issock', False):
            mode |= stat.S_IFSOCK
            mode |= stat.S_IFIFO
        if kw.pop('islink', False):
            mode |= stat.S_IFLNK
        if kw.pop('issock', False):
            mode |= stat.S_IFSOCK
        elif attr == 'islnk':
            if val:
                self[stat.ST_MODE] |= stat.S_IFLNK
            else:
                self[stat.ST_MODE] &= ~stat.S_IFLNK

src/m/e/mercurial-2.9.1/mercurial/pure/osutil.py   Mercurial(Download)
        return statmod.S_IFDIR
    if statmod.S_ISLNK(mode):
        return statmod.S_IFLNK
    if statmod.S_ISBLK(mode):
        return statmod.S_IFBLK

src/h/g/hg-HEAD/mercurial/pure/osutil.py   hg(Download)
        return statmod.S_IFDIR
    if statmod.S_ISLNK(mode):
        return statmod.S_IFLNK
    if statmod.S_ISBLK(mode):
        return statmod.S_IFBLK

src/s/a/salt-2014.1.3/salt/utils/find.py   salt(Download)
               'd': stat.S_IFDIR,
               'f': stat.S_IFREG,
               'l': stat.S_IFLNK,
               'p': stat.S_IFIFO,
               's': stat.S_IFSOCK,
               stat.S_IFBLK: 'b',
               stat.S_IFCHR: 'c',
               stat.S_IFDIR: 'd',
               stat.S_IFREG: 'f',
               stat.S_IFLNK: 'l',

src/s/a/salt-HEAD/salt/utils/find.py   salt(Download)
               'd': stat.S_IFDIR,
               'f': stat.S_IFREG,
               'l': stat.S_IFLNK,
               'p': stat.S_IFIFO,
               's': stat.S_IFSOCK,
               stat.S_IFBLK: 'b',
               stat.S_IFCHR: 'c',
               stat.S_IFDIR: 'd',
               stat.S_IFREG: 'f',
               stat.S_IFLNK: 'l',

src/f/o/FotoShareN9-HEAD/1.6.1/fotoshare/opt/FotoShareN9/plugins/sftp/libs/paramiko/sftp_attr.py   FotoShareN9(Download)
            elif kind == stat.S_IFREG:
                ks = '-'
            elif kind == stat.S_IFLNK:
                ks = 'l'
            elif kind == stat.S_IFSOCK:

src/f/o/FotoShareN9-HEAD/1.6.1/fotoshare/opt/FotoShareN9/plugins/scp/libs/paramiko/sftp_attr.py   FotoShareN9(Download)
            elif kind == stat.S_IFREG:
                ks = '-'
            elif kind == stat.S_IFLNK:
                ks = 'l'
            elif kind == stat.S_IFSOCK:

src/s/a/salt-thin-HEAD/salt/utils/find.py   salt-thin(Download)
               'd': stat.S_IFDIR,
               'f': stat.S_IFREG,
               'l': stat.S_IFLNK,
               'p': stat.S_IFIFO,
               's': stat.S_IFSOCK,
               stat.S_IFBLK: 'b',
               stat.S_IFCHR: 'c',
               stat.S_IFDIR: 'd',
               stat.S_IFREG: 'f',
               stat.S_IFLNK: 'l',

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