Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(35)  |  Call(23)  |  Derive(0)  |  Import(12)
<comment-ja>
??????????????????????
@param path:??????
@return: ????True??????False
@rtype: bool
</comment-ja>
<comment-en>
test the readability of path
</comment-en>

        def is_readable(path):
    """
    ??????????????????????
    @param path:??????
    @return: ????True??????False
    @rtype: bool
    
    
    test the readability of path
    
    """
    return os.access(path, os.R_OK)
        


src/k/a/karesansui-HEAD/karesansui/lib/rrd/libvirt.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def is_libvirt_cpu_file_exist(rrd_dir, dev):
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            ret = False
 
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            ret = False
 
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            ret = False
 
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            return ""
 

src/k/a/karesansui-HEAD/karesansui/lib/firewall/iptables.py   karesansui(Download)
from karesansui.lib.const import FIREWALL_XML_FILE, \
     FIREWALL_USERCHAIN, RH_USERCHAIN, KARESANSUI_GROUP
from karesansui.lib.utils import get_xml_xpath as XMLXpath, \
     get_xml_parse as XMLParse, get_nums_xml_xpath as XMLXpathNum, \
     execute_command, r_chgrp, is_readable
    def read_iptables_config(self):
        config = {}
 
        res = []
        if is_readable(self.iptables_conf_file):

src/k/a/karesansui-HEAD/karesansui/lib/rrd/df.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def is_df_file_exist(rrd_dir, dev):
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            ret = False
 
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            return ""
 

src/k/a/karesansui-HEAD/karesansui/lib/rrd/interface.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def is_interface_file_exist(rrd_dir, dev):
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            ret = False
 
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            return ""
 

src/k/a/karesansui-HEAD/karesansui/lib/rrd/disk.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def is_disk_file_exist(rrd_dir, dev):
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            ret = False
 
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            return ""
 

src/k/a/karesansui-HEAD/karesansui/lib/rrd/cpu.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def is_cpu_file_exist(rrd_dir, dev):
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            ret = False
 
 
    for filename in rrd_filepath:
        if is_readable(filename) is False:
            return ""
 

src/k/a/karesansui-HEAD/karesansui/lib/rrd/users.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def create_users_graph(_, lang, graph_dir, rrd_dir, start, end, dev=None, type=None):
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            return ""
 

src/k/a/karesansui-HEAD/karesansui/lib/rrd/uptime.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def create_uptime_graph(_, lang, graph_dir, rrd_dir, start, end, dev=None, type=None):
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            return ""
 

src/k/a/karesansui-HEAD/karesansui/lib/rrd/memory.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def create_memory_graph(_, lang, graph_dir, rrd_dir, start, end, dev=None, type=None):
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            return ""
 

src/k/a/karesansui-HEAD/karesansui/lib/rrd/load.py   karesansui(Download)
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
from karesansui.lib.utils import is_readable, generate_phrase
 
def create_load_graph(_, lang, graph_dir, rrd_dir, start, end, dev=None, type=None):
 
    for filepath in rrd_filepath:
        if is_readable(filepath) is False:
            return ""
 

  1 | 2  Next