本文整理汇总了Python中supriya.tools.requesttools.Request.Request类的典型用法代码示例。如果您正苦于以下问题:Python Request类的具体用法?Python Request怎么用?Python Request使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Request类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(
self,
buffer_id=None,
completion_message=None,
file_path=None,
frame_count=None,
leave_open=None,
starting_frame_in_buffer=None,
starting_frame_in_file=None,
):
Request.__init__(self)
self._buffer_id = int(buffer_id)
self._completion_message = self._coerce_completion_message_input(
completion_message)
self._file_path = str(file_path)
if frame_count is not None:
frame_count = int(frame_count)
assert -1 <= frame_count
self._frame_count = frame_count
if leave_open is not None:
leave_open = bool(leave_open)
self._leave_open = leave_open
if starting_frame_in_buffer is not None:
starting_frame_in_buffer = int(starting_frame_in_buffer)
assert 0 <= starting_frame_in_buffer
self._starting_frame_in_buffer = starting_frame_in_buffer
if starting_frame_in_file is not None:
starting_frame_in_file = int(starting_frame_in_file)
assert 0 <= starting_frame_in_file
self._starting_frame_in_file = starting_frame_in_file
示例2: __init__
def __init__(
self,
buffer_ids=None,
):
Request.__init__(self)
if buffer_ids:
buffer_ids = tuple(int(buffer_id) for buffer_id in buffer_ids)
self._buffer_ids = buffer_ids
示例3: __init__
def __init__(
self,
node_id=None,
**kwargs
):
Request.__init__(self)
self._node_id = node_id
self._kwargs = kwargs
示例4: __init__
def __init__(
self,
completion_message=None,
synthdef_path=None,
):
Request.__init__(self)
self._completion_message = completion_message
self._synthdef_path = os.path.abspath(synthdef_path)
示例5: __init__
def __init__(
self,
include_controls=False,
node_id=None,
):
Request.__init__(self)
self._node_id = node_id
self._include_controls = bool(include_controls)
示例6: __init__
def __init__(
self,
buffer_id=None,
completion_message=None
):
Request.__init__(self)
self._buffer_id = int(buffer_id)
self._completion_message = self._coerce_completion_message_input(
completion_message)
示例7: __init__
def __init__(
self,
node_ids=None
):
Request.__init__(self)
if not isinstance(node_ids, collections.Sequence):
node_ids = (node_ids,)
node_ids = tuple(int(_) for _ in node_ids)
self._node_ids = node_ids
示例8: __init__
def __init__(
self,
add_action=None,
node_id=None,
target_node_id=None,
):
from supriya.tools import servertools
Request.__init__(self)
self._add_action = servertools.AddAction.from_expr(add_action)
self._node_id = node_id
self._target_node_id = target_node_id
示例9: __init__
def __init__(
self,
node_id=None,
**kwargs
):
Request.__init__(self)
self._node_id = node_id
self._kwargs = dict(
(name, int(value))
for name, value in kwargs.items()
)
示例10: __init__
def __init__(
self,
buffer_id=None,
index_count_value_triples=None,
):
Request.__init__(self)
self._buffer_id = int(buffer_id)
triples = []
for index, count, value in index_count_value_triples:
triple = (int(index), int(count), float(value))
triples.append(triple)
triples = tuple(triples)
self._index_count_value_triples = triples
示例11: __init__
def __init__(self, index_count_value_triples=None):
Request.__init__(self)
if index_count_value_triples:
triples = []
for index, count, value in index_count_value_triples:
index = int(index)
count = int(count)
value = float(value)
assert 0 <= index
assert 0 < count
triple = (index, count, value)
triples.append(triple)
index_count_value_triples = tuple(triples)
self._index_count_value_triples = index_count_value_triples
示例12: __init__
def __init__(self, index_values_pairs=None):
Request.__init__(self)
if index_values_pairs:
pairs = []
for index, values in index_values_pairs:
index = int(index)
values = tuple(float(value) for value in values)
assert 0 <= index
assert values
if not values:
continue
pair = (index, values)
pairs.append(pair)
index_values_pairs = tuple(pairs)
self._index_values_pairs = index_values_pairs
示例13: __init__
def __init__(
self,
completion_message=None,
synthdefs=None,
):
from supriya.tools import synthdeftools
Request.__init__(self)
self._completion_message = completion_message
if synthdefs:
prototype = synthdeftools.SynthDef
if isinstance(synthdefs, prototype):
synthdefs = (synthdefs,)
assert all(isinstance(x, prototype) for x in synthdefs)
synthdefs = tuple(synthdefs)
self._synthdefs = synthdefs
示例14: __init__
def __init__(
self,
index_value_pairs=None,
):
Request.__init__(self)
if index_value_pairs:
pairs = []
for index, value in index_value_pairs:
index = int(index)
value = float(value)
assert 0 <= index
pair = (index, value)
pairs.append(pair)
index_value_pairs = tuple(pairs)
self._index_value_pairs = index_value_pairs
示例15: __init__
def __init__(
self,
buffer_id=None,
index_value_pairs=None,
):
Request.__init__(self)
self._buffer_id = int(buffer_id)
if index_value_pairs:
pairs = []
for index, value in index_value_pairs:
index = int(index)
value = float(value)
pair = (index, value)
pairs.append(pair)
pairs = tuple(pairs)
self._index_value_pairs = index_value_pairs