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

All Samples(7)  |  Call(4)  |  Derive(0)  |  Import(3)
<comment-ja>
???????????????????????????

@param min: ?????????
@param max: ?????????
@param exclude_numbers: ??????????????
@return: ??
@rtype: int
</comment-ja>
<comment-en>(more...)

        def next_number(min,max,exclude_numbers):
    """
    
    ???????????????????????????
    
    @param min: ?????????
    @param max: ?????????
    @param exclude_numbers: ??????????????
    @return: ??
    @rtype: int
    
    
    @param min: Minimum interger in specified range
    @param max: Maximum interger in specified range
    @param exclude_numbers: array that has the element of exclusive interger
    @return: Interger
    
    """
    for _x in range(min,max):
      if not _x in exclude_numbers:
        return _x
        


src/k/a/karesansui-HEAD/karesansui/lib/virt/virt.py   karesansui(Download)
from karesansui.lib.utils import string_from_uuid     as StrFromUUID
from karesansui.lib.utils import generate_uuid        as GenUUID
from karesansui.lib.utils import next_number          as NextNumber
from karesansui.lib.utils import create_disk_img      as MakeDiskImage
from karesansui.lib.utils import copy_file            as CopyFile
        if graphics is None:
            used_ports = self.list_used_graphics_port()
            graphics = NextNumber(GRAPHICS_PORT_MIN_NUMBER,PORT_MAX_NUMBER,used_ports)
 
#        if os.path.exists(disk):
        if graphics is None:
            used_ports = self.list_used_graphics_port()
            graphics = NextNumber(GRAPHICS_PORT_MIN_NUMBER,PORT_MAX_NUMBER,used_ports)
 
        old_disks = param.disks

src/k/a/karesansui-HEAD/karesansui/gadget/guest.py   karesansui(Download)
from karesansui.lib.const import XEN_KEYMAP_DIR, KVM_KEYMAP_DIR, KVM_BRIDGE_PREFIX
 
from karesansui.lib.utils import comma_split, \
     generate_mac_address, is_param, \
     next_number, generate_uuid, string_from_uuid, uniq_sort, \
                    exclude_ports = sorted(exclude_ports)
                    exclude_ports = [p for p, q in zip(exclude_ports, exclude_ports[1:] + [None]) if p != q]
                self.view.graphics_port = next_number(GRAPHICS_PORT_MIN_NUMBER,
                                                 PORT_MAX_NUMBER,
                                                 exclude_ports)

src/k/a/karesansui-HEAD/karesansui/gadget/guestreplicate.py   karesansui(Download)
    ID_MIN_LENGTH, ID_MAX_LENGTH, MACHINE_ATTRIBUTE
 
from karesansui.lib.utils import comma_split, generate_uuid, \
    string_from_uuid, is_param, uni_force, \
    next_number, generate_mac_address, chk_create_disk, get_partition_info
            self.view.domain_src_name = virt.get_domain_name()
            used_ports = kvc.list_used_graphics_port()
            self.view.graphics_port = next_number(GRAPHICS_PORT_MIN_NUMBER,PORT_MAX_NUMBER,used_ports)
        finally:
            kvc.close()