repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.get_room_id | def get_room_id(self, room_alias):
"""Get room id from its alias.
Args:
room_alias (str): The room alias name.
Returns:
Wanted room's id.
"""
content = self._send("GET", "/directory/room/{}".format(quote(room_alias)))
return content.get("room_id"... | python | def get_room_id(self, room_alias):
"""Get room id from its alias.
Args:
room_alias (str): The room alias name.
Returns:
Wanted room's id.
"""
content = self._send("GET", "/directory/room/{}".format(quote(room_alias)))
return content.get("room_id"... | [
"def",
"get_room_id",
"(",
"self",
",",
"room_alias",
")",
":",
"content",
"=",
"self",
".",
"_send",
"(",
"\"GET\"",
",",
"\"/directory/room/{}\"",
".",
"format",
"(",
"quote",
"(",
"room_alias",
")",
")",
")",
"return",
"content",
".",
"get",
"(",
"\"r... | Get room id from its alias.
Args:
room_alias (str): The room alias name.
Returns:
Wanted room's id. | [
"Get",
"room",
"id",
"from",
"its",
"alias",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L870-L880 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.set_room_alias | def set_room_alias(self, room_id, room_alias):
"""Set alias to room id
Args:
room_id (str): The room id.
room_alias (str): The room wanted alias name.
"""
data = {
"room_id": room_id
}
return self._send("PUT", "/directory/room/{}".for... | python | def set_room_alias(self, room_id, room_alias):
"""Set alias to room id
Args:
room_id (str): The room id.
room_alias (str): The room wanted alias name.
"""
data = {
"room_id": room_id
}
return self._send("PUT", "/directory/room/{}".for... | [
"def",
"set_room_alias",
"(",
"self",
",",
"room_id",
",",
"room_alias",
")",
":",
"data",
"=",
"{",
"\"room_id\"",
":",
"room_id",
"}",
"return",
"self",
".",
"_send",
"(",
"\"PUT\"",
",",
"\"/directory/room/{}\"",
".",
"format",
"(",
"quote",
"(",
"room_... | Set alias to room id
Args:
room_id (str): The room id.
room_alias (str): The room wanted alias name. | [
"Set",
"alias",
"to",
"room",
"id"
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L882-L894 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.set_join_rule | def set_join_rule(self, room_id, join_rule):
"""Set the rule for users wishing to join the room.
Args:
room_id(str): The room to set the rules for.
join_rule(str): The chosen rule. One of: ["public", "knock",
"invite", "private"]
"""
content = {
... | python | def set_join_rule(self, room_id, join_rule):
"""Set the rule for users wishing to join the room.
Args:
room_id(str): The room to set the rules for.
join_rule(str): The chosen rule. One of: ["public", "knock",
"invite", "private"]
"""
content = {
... | [
"def",
"set_join_rule",
"(",
"self",
",",
"room_id",
",",
"join_rule",
")",
":",
"content",
"=",
"{",
"\"join_rule\"",
":",
"join_rule",
"}",
"return",
"self",
".",
"send_state_event",
"(",
"room_id",
",",
"\"m.room.join_rules\"",
",",
"content",
")"
] | Set the rule for users wishing to join the room.
Args:
room_id(str): The room to set the rules for.
join_rule(str): The chosen rule. One of: ["public", "knock",
"invite", "private"] | [
"Set",
"the",
"rule",
"for",
"users",
"wishing",
"to",
"join",
"the",
"room",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L915-L926 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.set_guest_access | def set_guest_access(self, room_id, guest_access):
"""Set the guest access policy of the room.
Args:
room_id(str): The room to set the rules for.
guest_access(str): Wether guests can join. One of: ["can_join",
"forbidden"]
"""
content = {
... | python | def set_guest_access(self, room_id, guest_access):
"""Set the guest access policy of the room.
Args:
room_id(str): The room to set the rules for.
guest_access(str): Wether guests can join. One of: ["can_join",
"forbidden"]
"""
content = {
... | [
"def",
"set_guest_access",
"(",
"self",
",",
"room_id",
",",
"guest_access",
")",
":",
"content",
"=",
"{",
"\"guest_access\"",
":",
"guest_access",
"}",
"return",
"self",
".",
"send_state_event",
"(",
"room_id",
",",
"\"m.room.guest_access\"",
",",
"content",
"... | Set the guest access policy of the room.
Args:
room_id(str): The room to set the rules for.
guest_access(str): Wether guests can join. One of: ["can_join",
"forbidden"] | [
"Set",
"the",
"guest",
"access",
"policy",
"of",
"the",
"room",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L928-L939 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.update_device_info | def update_device_info(self, device_id, display_name):
"""Update the display name of a device.
Args:
device_id (str): The device ID of the device to update.
display_name (str): New display name for the device.
"""
content = {
"display_name": display_n... | python | def update_device_info(self, device_id, display_name):
"""Update the display name of a device.
Args:
device_id (str): The device ID of the device to update.
display_name (str): New display name for the device.
"""
content = {
"display_name": display_n... | [
"def",
"update_device_info",
"(",
"self",
",",
"device_id",
",",
"display_name",
")",
":",
"content",
"=",
"{",
"\"display_name\"",
":",
"display_name",
"}",
"return",
"self",
".",
"_send",
"(",
"\"PUT\"",
",",
"\"/devices/%s\"",
"%",
"device_id",
",",
"conten... | Update the display name of a device.
Args:
device_id (str): The device ID of the device to update.
display_name (str): New display name for the device. | [
"Update",
"the",
"display",
"name",
"of",
"a",
"device",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L949-L959 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.delete_device | def delete_device(self, auth_body, device_id):
"""Deletes the given device, and invalidates any access token associated with it.
NOTE: This endpoint uses the User-Interactive Authentication API.
Args:
auth_body (dict): Authentication params.
device_id (str): The device ... | python | def delete_device(self, auth_body, device_id):
"""Deletes the given device, and invalidates any access token associated with it.
NOTE: This endpoint uses the User-Interactive Authentication API.
Args:
auth_body (dict): Authentication params.
device_id (str): The device ... | [
"def",
"delete_device",
"(",
"self",
",",
"auth_body",
",",
"device_id",
")",
":",
"content",
"=",
"{",
"\"auth\"",
":",
"auth_body",
"}",
"return",
"self",
".",
"_send",
"(",
"\"DELETE\"",
",",
"\"/devices/%s\"",
"%",
"device_id",
",",
"content",
"=",
"co... | Deletes the given device, and invalidates any access token associated with it.
NOTE: This endpoint uses the User-Interactive Authentication API.
Args:
auth_body (dict): Authentication params.
device_id (str): The device ID of the device to delete. | [
"Deletes",
"the",
"given",
"device",
"and",
"invalidates",
"any",
"access",
"token",
"associated",
"with",
"it",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L961-L973 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.delete_devices | def delete_devices(self, auth_body, devices):
"""Bulk deletion of devices.
NOTE: This endpoint uses the User-Interactive Authentication API.
Args:
auth_body (dict): Authentication params.
devices (list): List of device ID"s to delete.
"""
content = {
... | python | def delete_devices(self, auth_body, devices):
"""Bulk deletion of devices.
NOTE: This endpoint uses the User-Interactive Authentication API.
Args:
auth_body (dict): Authentication params.
devices (list): List of device ID"s to delete.
"""
content = {
... | [
"def",
"delete_devices",
"(",
"self",
",",
"auth_body",
",",
"devices",
")",
":",
"content",
"=",
"{",
"\"auth\"",
":",
"auth_body",
",",
"\"devices\"",
":",
"devices",
"}",
"return",
"self",
".",
"_send",
"(",
"\"POST\"",
",",
"\"/delete_devices\"",
",",
... | Bulk deletion of devices.
NOTE: This endpoint uses the User-Interactive Authentication API.
Args:
auth_body (dict): Authentication params.
devices (list): List of device ID"s to delete. | [
"Bulk",
"deletion",
"of",
"devices",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L975-L988 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.upload_keys | def upload_keys(self, device_keys=None, one_time_keys=None):
"""Publishes end-to-end encryption keys for the device.
Said device must be the one used when logging in.
Args:
device_keys (dict): Optional. Identity keys for the device. The required
keys are:
... | python | def upload_keys(self, device_keys=None, one_time_keys=None):
"""Publishes end-to-end encryption keys for the device.
Said device must be the one used when logging in.
Args:
device_keys (dict): Optional. Identity keys for the device. The required
keys are:
... | [
"def",
"upload_keys",
"(",
"self",
",",
"device_keys",
"=",
"None",
",",
"one_time_keys",
"=",
"None",
")",
":",
"content",
"=",
"{",
"}",
"if",
"device_keys",
":",
"content",
"[",
"\"device_keys\"",
"]",
"=",
"device_keys",
"if",
"one_time_keys",
":",
"co... | Publishes end-to-end encryption keys for the device.
Said device must be the one used when logging in.
Args:
device_keys (dict): Optional. Identity keys for the device. The required
keys are:
| user_id (str): The ID of the user the device belongs to. Must m... | [
"Publishes",
"end",
"-",
"to",
"-",
"end",
"encryption",
"keys",
"for",
"the",
"device",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L990-L1019 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.query_keys | def query_keys(self, user_devices, timeout=None, token=None):
"""Query HS for public keys by user and optionally device.
Args:
user_devices (dict): The devices whose keys to download. Should be
formatted as <user_id>: [<device_ids>]. No device_ids indicates
a... | python | def query_keys(self, user_devices, timeout=None, token=None):
"""Query HS for public keys by user and optionally device.
Args:
user_devices (dict): The devices whose keys to download. Should be
formatted as <user_id>: [<device_ids>]. No device_ids indicates
a... | [
"def",
"query_keys",
"(",
"self",
",",
"user_devices",
",",
"timeout",
"=",
"None",
",",
"token",
"=",
"None",
")",
":",
"content",
"=",
"{",
"\"device_keys\"",
":",
"user_devices",
"}",
"if",
"timeout",
":",
"content",
"[",
"\"timeout\"",
"]",
"=",
"tim... | Query HS for public keys by user and optionally device.
Args:
user_devices (dict): The devices whose keys to download. Should be
formatted as <user_id>: [<device_ids>]. No device_ids indicates
all devices for the corresponding user.
timeout (int): Optiona... | [
"Query",
"HS",
"for",
"public",
"keys",
"by",
"user",
"and",
"optionally",
"device",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L1021-L1039 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.claim_keys | def claim_keys(self, key_request, timeout=None):
"""Claims one-time keys for use in pre-key messages.
Args:
key_request (dict): The keys to be claimed. Format should be
<user_id>: { <device_id>: <algorithm> }.
timeout (int): Optional. The time (in milliseconds) t... | python | def claim_keys(self, key_request, timeout=None):
"""Claims one-time keys for use in pre-key messages.
Args:
key_request (dict): The keys to be claimed. Format should be
<user_id>: { <device_id>: <algorithm> }.
timeout (int): Optional. The time (in milliseconds) t... | [
"def",
"claim_keys",
"(",
"self",
",",
"key_request",
",",
"timeout",
"=",
"None",
")",
":",
"content",
"=",
"{",
"\"one_time_keys\"",
":",
"key_request",
"}",
"if",
"timeout",
":",
"content",
"[",
"\"timeout\"",
"]",
"=",
"timeout",
"return",
"self",
".",... | Claims one-time keys for use in pre-key messages.
Args:
key_request (dict): The keys to be claimed. Format should be
<user_id>: { <device_id>: <algorithm> }.
timeout (int): Optional. The time (in milliseconds) to wait when
downloading keys from remote ser... | [
"Claims",
"one",
"-",
"time",
"keys",
"for",
"use",
"in",
"pre",
"-",
"key",
"messages",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L1041-L1053 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.key_changes | def key_changes(self, from_token, to_token):
"""Gets a list of users who have updated their device identity keys.
Args:
from_token (str): The desired start point of the list. Should be the
next_batch field from a response to an earlier call to /sync.
to_token (st... | python | def key_changes(self, from_token, to_token):
"""Gets a list of users who have updated their device identity keys.
Args:
from_token (str): The desired start point of the list. Should be the
next_batch field from a response to an earlier call to /sync.
to_token (st... | [
"def",
"key_changes",
"(",
"self",
",",
"from_token",
",",
"to_token",
")",
":",
"params",
"=",
"{",
"\"from\"",
":",
"from_token",
",",
"\"to\"",
":",
"to_token",
"}",
"return",
"self",
".",
"_send",
"(",
"\"GET\"",
",",
"\"/keys/changes\"",
",",
"query_p... | Gets a list of users who have updated their device identity keys.
Args:
from_token (str): The desired start point of the list. Should be the
next_batch field from a response to an earlier call to /sync.
to_token (str): The desired end point of the list. Should be the nex... | [
"Gets",
"a",
"list",
"of",
"users",
"who",
"have",
"updated",
"their",
"device",
"identity",
"keys",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L1055-L1065 | train |
matrix-org/matrix-python-sdk | matrix_client/api.py | MatrixHttpApi.send_to_device | def send_to_device(self, event_type, messages, txn_id=None):
"""Sends send-to-device events to a set of client devices.
Args:
event_type (str): The type of event to send.
messages (dict): The messages to send. Format should be
<user_id>: {<device_id>: <event_cont... | python | def send_to_device(self, event_type, messages, txn_id=None):
"""Sends send-to-device events to a set of client devices.
Args:
event_type (str): The type of event to send.
messages (dict): The messages to send. Format should be
<user_id>: {<device_id>: <event_cont... | [
"def",
"send_to_device",
"(",
"self",
",",
"event_type",
",",
"messages",
",",
"txn_id",
"=",
"None",
")",
":",
"txn_id",
"=",
"txn_id",
"if",
"txn_id",
"else",
"self",
".",
"_make_txn_id",
"(",
")",
"return",
"self",
".",
"_send",
"(",
"\"PUT\"",
",",
... | Sends send-to-device events to a set of client devices.
Args:
event_type (str): The type of event to send.
messages (dict): The messages to send. Format should be
<user_id>: {<device_id>: <event_content>}.
The device ID may also be '*', meaning all known ... | [
"Sends",
"send",
"-",
"to",
"-",
"device",
"events",
"to",
"a",
"set",
"of",
"client",
"devices",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/api.py#L1067-L1083 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.register_with_password | def register_with_password(self, username, password):
""" Register for a new account on this HS.
Args:
username (str): Account username
password (str): Account password
Returns:
str: Access Token
Raises:
MatrixRequestError
"""
... | python | def register_with_password(self, username, password):
""" Register for a new account on this HS.
Args:
username (str): Account username
password (str): Account password
Returns:
str: Access Token
Raises:
MatrixRequestError
"""
... | [
"def",
"register_with_password",
"(",
"self",
",",
"username",
",",
"password",
")",
":",
"response",
"=",
"self",
".",
"api",
".",
"register",
"(",
"auth_body",
"=",
"{",
"\"type\"",
":",
"\"m.login.dummy\"",
"}",
",",
"kind",
"=",
"'user'",
",",
"usernam... | Register for a new account on this HS.
Args:
username (str): Account username
password (str): Account password
Returns:
str: Access Token
Raises:
MatrixRequestError | [
"Register",
"for",
"a",
"new",
"account",
"on",
"this",
"HS",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L190-L209 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.login_with_password_no_sync | def login_with_password_no_sync(self, username, password):
"""Deprecated. Use ``login`` with ``sync=False``.
Login to the homeserver.
Args:
username (str): Account username
password (str): Account password
Returns:
str: Access token
Raises:... | python | def login_with_password_no_sync(self, username, password):
"""Deprecated. Use ``login`` with ``sync=False``.
Login to the homeserver.
Args:
username (str): Account username
password (str): Account password
Returns:
str: Access token
Raises:... | [
"def",
"login_with_password_no_sync",
"(",
"self",
",",
"username",
",",
"password",
")",
":",
"warn",
"(",
"\"login_with_password_no_sync is deprecated. Use login with sync=False.\"",
",",
"DeprecationWarning",
")",
"return",
"self",
".",
"login",
"(",
"username",
",",
... | Deprecated. Use ``login`` with ``sync=False``.
Login to the homeserver.
Args:
username (str): Account username
password (str): Account password
Returns:
str: Access token
Raises:
MatrixRequestError | [
"Deprecated",
".",
"Use",
"login",
"with",
"sync",
"=",
"False",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L219-L236 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.login_with_password | def login_with_password(self, username, password, limit=10):
"""Deprecated. Use ``login`` with ``sync=True``.
Login to the homeserver.
Args:
username (str): Account username
password (str): Account password
limit (int): Deprecated. How many messages to retur... | python | def login_with_password(self, username, password, limit=10):
"""Deprecated. Use ``login`` with ``sync=True``.
Login to the homeserver.
Args:
username (str): Account username
password (str): Account password
limit (int): Deprecated. How many messages to retur... | [
"def",
"login_with_password",
"(",
"self",
",",
"username",
",",
"password",
",",
"limit",
"=",
"10",
")",
":",
"warn",
"(",
"\"login_with_password is deprecated. Use login with sync=True.\"",
",",
"DeprecationWarning",
")",
"return",
"self",
".",
"login",
"(",
"use... | Deprecated. Use ``login`` with ``sync=True``.
Login to the homeserver.
Args:
username (str): Account username
password (str): Account password
limit (int): Deprecated. How many messages to return when syncing.
This will be replaced by a filter API in... | [
"Deprecated",
".",
"Use",
"login",
"with",
"sync",
"=",
"True",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L238-L257 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.login | def login(self, username, password, limit=10, sync=True, device_id=None):
"""Login to the homeserver.
Args:
username (str): Account username
password (str): Account password
limit (int): Deprecated. How many messages to return when syncing.
This will ... | python | def login(self, username, password, limit=10, sync=True, device_id=None):
"""Login to the homeserver.
Args:
username (str): Account username
password (str): Account password
limit (int): Deprecated. How many messages to return when syncing.
This will ... | [
"def",
"login",
"(",
"self",
",",
"username",
",",
"password",
",",
"limit",
"=",
"10",
",",
"sync",
"=",
"True",
",",
"device_id",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"api",
".",
"login",
"(",
"\"m.login.password\"",
",",
"user",
"=... | Login to the homeserver.
Args:
username (str): Account username
password (str): Account password
limit (int): Deprecated. How many messages to return when syncing.
This will be replaced by a filter API in a later release.
sync (bool): Optional. Wh... | [
"Login",
"to",
"the",
"homeserver",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L259-L296 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.create_room | def create_room(self, alias=None, is_public=False, invitees=None):
""" Create a new room on the homeserver.
Args:
alias (str): The canonical_alias of the room.
is_public (bool): The public/private visibility of the room.
invitees (str[]): A set of user ids to invite... | python | def create_room(self, alias=None, is_public=False, invitees=None):
""" Create a new room on the homeserver.
Args:
alias (str): The canonical_alias of the room.
is_public (bool): The public/private visibility of the room.
invitees (str[]): A set of user ids to invite... | [
"def",
"create_room",
"(",
"self",
",",
"alias",
"=",
"None",
",",
"is_public",
"=",
"False",
",",
"invitees",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"api",
".",
"create_room",
"(",
"alias",
"=",
"alias",
",",
"is_public",
"=",
"is_public... | Create a new room on the homeserver.
Args:
alias (str): The canonical_alias of the room.
is_public (bool): The public/private visibility of the room.
invitees (str[]): A set of user ids to invite into the room.
Returns:
Room
Raises:
... | [
"Create",
"a",
"new",
"room",
"on",
"the",
"homeserver",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L306-L323 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.add_listener | def add_listener(self, callback, event_type=None):
""" Add a listener that will send a callback when the client recieves
an event.
Args:
callback (func(roomchunk)): Callback called when an event arrives.
event_type (str): The event_type to filter for.
Returns:
... | python | def add_listener(self, callback, event_type=None):
""" Add a listener that will send a callback when the client recieves
an event.
Args:
callback (func(roomchunk)): Callback called when an event arrives.
event_type (str): The event_type to filter for.
Returns:
... | [
"def",
"add_listener",
"(",
"self",
",",
"callback",
",",
"event_type",
"=",
"None",
")",
":",
"listener_uid",
"=",
"uuid4",
"(",
")",
"self",
".",
"listeners",
".",
"append",
"(",
"{",
"'uid'",
":",
"listener_uid",
",",
"'callback'",
":",
"callback",
",... | Add a listener that will send a callback when the client recieves
an event.
Args:
callback (func(roomchunk)): Callback called when an event arrives.
event_type (str): The event_type to filter for.
Returns:
uuid.UUID: Unique id of the listener, can be used to... | [
"Add",
"a",
"listener",
"that",
"will",
"send",
"a",
"callback",
"when",
"the",
"client",
"recieves",
"an",
"event",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L355-L377 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.add_presence_listener | def add_presence_listener(self, callback):
""" Add a presence listener that will send a callback when the client receives
a presence update.
Args:
callback (func(roomchunk)): Callback called when a presence update arrives.
Returns:
uuid.UUID: Unique id of the li... | python | def add_presence_listener(self, callback):
""" Add a presence listener that will send a callback when the client receives
a presence update.
Args:
callback (func(roomchunk)): Callback called when a presence update arrives.
Returns:
uuid.UUID: Unique id of the li... | [
"def",
"add_presence_listener",
"(",
"self",
",",
"callback",
")",
":",
"listener_uid",
"=",
"uuid4",
"(",
")",
"self",
".",
"presence_listeners",
"[",
"listener_uid",
"]",
"=",
"callback",
"return",
"listener_uid"
] | Add a presence listener that will send a callback when the client receives
a presence update.
Args:
callback (func(roomchunk)): Callback called when a presence update arrives.
Returns:
uuid.UUID: Unique id of the listener, can be used to identify the listener. | [
"Add",
"a",
"presence",
"listener",
"that",
"will",
"send",
"a",
"callback",
"when",
"the",
"client",
"receives",
"a",
"presence",
"update",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L388-L400 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.listen_forever | def listen_forever(self, timeout_ms=30000, exception_handler=None,
bad_sync_timeout=5):
""" Keep listening for events forever.
Args:
timeout_ms (int): How long to poll the Home Server for before
retrying.
exception_handler (func(exception)):... | python | def listen_forever(self, timeout_ms=30000, exception_handler=None,
bad_sync_timeout=5):
""" Keep listening for events forever.
Args:
timeout_ms (int): How long to poll the Home Server for before
retrying.
exception_handler (func(exception)):... | [
"def",
"listen_forever",
"(",
"self",
",",
"timeout_ms",
"=",
"30000",
",",
"exception_handler",
"=",
"None",
",",
"bad_sync_timeout",
"=",
"5",
")",
":",
"_bad_sync_timeout",
"=",
"bad_sync_timeout",
"self",
".",
"should_listen",
"=",
"True",
"while",
"(",
"s... | Keep listening for events forever.
Args:
timeout_ms (int): How long to poll the Home Server for before
retrying.
exception_handler (func(exception)): Optional exception handler
function which can be used to handle exceptions in the caller
thr... | [
"Keep",
"listening",
"for",
"events",
"forever",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L473-L510 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.start_listener_thread | def start_listener_thread(self, timeout_ms=30000, exception_handler=None):
""" Start a listener thread to listen for events in the background.
Args:
timeout (int): How long to poll the Home Server for before
retrying.
exception_handler (func(exception)): Optional ... | python | def start_listener_thread(self, timeout_ms=30000, exception_handler=None):
""" Start a listener thread to listen for events in the background.
Args:
timeout (int): How long to poll the Home Server for before
retrying.
exception_handler (func(exception)): Optional ... | [
"def",
"start_listener_thread",
"(",
"self",
",",
"timeout_ms",
"=",
"30000",
",",
"exception_handler",
"=",
"None",
")",
":",
"try",
":",
"thread",
"=",
"Thread",
"(",
"target",
"=",
"self",
".",
"listen_forever",
",",
"args",
"=",
"(",
"timeout_ms",
",",... | Start a listener thread to listen for events in the background.
Args:
timeout (int): How long to poll the Home Server for before
retrying.
exception_handler (func(exception)): Optional exception handler
function which can be used to handle exceptions in the... | [
"Start",
"a",
"listener",
"thread",
"to",
"listen",
"for",
"events",
"in",
"the",
"background",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L512-L531 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.stop_listener_thread | def stop_listener_thread(self):
""" Stop listener thread running in the background
"""
if self.sync_thread:
self.should_listen = False
self.sync_thread.join()
self.sync_thread = None | python | def stop_listener_thread(self):
""" Stop listener thread running in the background
"""
if self.sync_thread:
self.should_listen = False
self.sync_thread.join()
self.sync_thread = None | [
"def",
"stop_listener_thread",
"(",
"self",
")",
":",
"if",
"self",
".",
"sync_thread",
":",
"self",
".",
"should_listen",
"=",
"False",
"self",
".",
"sync_thread",
".",
"join",
"(",
")",
"self",
".",
"sync_thread",
"=",
"None"
] | Stop listener thread running in the background | [
"Stop",
"listener",
"thread",
"running",
"in",
"the",
"background"
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L533-L539 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.upload | def upload(self, content, content_type, filename=None):
""" Upload content to the home server and recieve a MXC url.
Args:
content (bytes): The data of the content.
content_type (str): The mimetype of the content.
filename (str): Optional. Filename of the content.
... | python | def upload(self, content, content_type, filename=None):
""" Upload content to the home server and recieve a MXC url.
Args:
content (bytes): The data of the content.
content_type (str): The mimetype of the content.
filename (str): Optional. Filename of the content.
... | [
"def",
"upload",
"(",
"self",
",",
"content",
",",
"content_type",
",",
"filename",
"=",
"None",
")",
":",
"try",
":",
"response",
"=",
"self",
".",
"api",
".",
"media_upload",
"(",
"content",
",",
"content_type",
",",
"filename",
")",
"if",
"\"content_u... | Upload content to the home server and recieve a MXC url.
Args:
content (bytes): The data of the content.
content_type (str): The mimetype of the content.
filename (str): Optional. Filename of the content.
Raises:
MatrixUnexpectedResponse: If the homeserv... | [
"Upload",
"content",
"to",
"the",
"home",
"server",
"and",
"recieve",
"a",
"MXC",
"url",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L542-L566 | train |
matrix-org/matrix-python-sdk | matrix_client/client.py | MatrixClient.remove_room_alias | def remove_room_alias(self, room_alias):
"""Remove mapping of an alias
Args:
room_alias(str): The alias to be removed.
Returns:
bool: True if the alias is removed, False otherwise.
"""
try:
self.api.remove_room_alias(room_alias)
r... | python | def remove_room_alias(self, room_alias):
"""Remove mapping of an alias
Args:
room_alias(str): The alias to be removed.
Returns:
bool: True if the alias is removed, False otherwise.
"""
try:
self.api.remove_room_alias(room_alias)
r... | [
"def",
"remove_room_alias",
"(",
"self",
",",
"room_alias",
")",
":",
"try",
":",
"self",
".",
"api",
".",
"remove_room_alias",
"(",
"room_alias",
")",
"return",
"True",
"except",
"MatrixRequestError",
":",
"return",
"False"
] | Remove mapping of an alias
Args:
room_alias(str): The alias to be removed.
Returns:
bool: True if the alias is removed, False otherwise. | [
"Remove",
"mapping",
"of",
"an",
"alias"
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/client.py#L656-L669 | train |
matrix-org/matrix-python-sdk | matrix_client/crypto/olm_device.py | OlmDevice.upload_identity_keys | def upload_identity_keys(self):
"""Uploads this device's identity keys to HS.
This device must be the one used when logging in.
"""
device_keys = {
'user_id': self.user_id,
'device_id': self.device_id,
'algorithms': self._algorithms,
'keys... | python | def upload_identity_keys(self):
"""Uploads this device's identity keys to HS.
This device must be the one used when logging in.
"""
device_keys = {
'user_id': self.user_id,
'device_id': self.device_id,
'algorithms': self._algorithms,
'keys... | [
"def",
"upload_identity_keys",
"(",
"self",
")",
":",
"device_keys",
"=",
"{",
"'user_id'",
":",
"self",
".",
"user_id",
",",
"'device_id'",
":",
"self",
".",
"device_id",
",",
"'algorithms'",
":",
"self",
".",
"_algorithms",
",",
"'keys'",
":",
"{",
"'{}:... | Uploads this device's identity keys to HS.
This device must be the one used when logging in. | [
"Uploads",
"this",
"device",
"s",
"identity",
"keys",
"to",
"HS",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/crypto/olm_device.py#L63-L78 | train |
matrix-org/matrix-python-sdk | matrix_client/crypto/olm_device.py | OlmDevice.upload_one_time_keys | def upload_one_time_keys(self, force_update=False):
"""Uploads new one-time keys to the HS, if needed.
Args:
force_update (bool): Fetch the number of one-time keys currently on the HS
before uploading, even if we already know one. In most cases this should
no... | python | def upload_one_time_keys(self, force_update=False):
"""Uploads new one-time keys to the HS, if needed.
Args:
force_update (bool): Fetch the number of one-time keys currently on the HS
before uploading, even if we already know one. In most cases this should
no... | [
"def",
"upload_one_time_keys",
"(",
"self",
",",
"force_update",
"=",
"False",
")",
":",
"if",
"force_update",
"or",
"not",
"self",
".",
"one_time_keys_manager",
".",
"server_counts",
":",
"counts",
"=",
"self",
".",
"api",
".",
"upload_keys",
"(",
")",
"[",... | Uploads new one-time keys to the HS, if needed.
Args:
force_update (bool): Fetch the number of one-time keys currently on the HS
before uploading, even if we already know one. In most cases this should
not be necessary, as we get this value from sync responses.
... | [
"Uploads",
"new",
"one",
"-",
"time",
"keys",
"to",
"the",
"HS",
"if",
"needed",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/crypto/olm_device.py#L80-L126 | train |
matrix-org/matrix-python-sdk | matrix_client/crypto/olm_device.py | OlmDevice.update_one_time_key_counts | def update_one_time_key_counts(self, counts):
"""Update data on one-time keys count and upload new ones if necessary.
Args:
counts (dict): Counts of keys currently on the HS for each key type.
"""
self.one_time_keys_manager.server_counts = counts
if self.one_time_key... | python | def update_one_time_key_counts(self, counts):
"""Update data on one-time keys count and upload new ones if necessary.
Args:
counts (dict): Counts of keys currently on the HS for each key type.
"""
self.one_time_keys_manager.server_counts = counts
if self.one_time_key... | [
"def",
"update_one_time_key_counts",
"(",
"self",
",",
"counts",
")",
":",
"self",
".",
"one_time_keys_manager",
".",
"server_counts",
"=",
"counts",
"if",
"self",
".",
"one_time_keys_manager",
".",
"should_upload",
"(",
")",
":",
"logger",
".",
"info",
"(",
"... | Update data on one-time keys count and upload new ones if necessary.
Args:
counts (dict): Counts of keys currently on the HS for each key type. | [
"Update",
"data",
"on",
"one",
"-",
"time",
"keys",
"count",
"and",
"upload",
"new",
"ones",
"if",
"necessary",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/crypto/olm_device.py#L128-L137 | train |
matrix-org/matrix-python-sdk | matrix_client/crypto/olm_device.py | OlmDevice.sign_json | def sign_json(self, json):
"""Signs a JSON object.
NOTE: The object is modified in-place and the return value can be ignored.
As specified, this is done by encoding the JSON object without ``signatures`` or
keys grouped as ``unsigned``, using canonical encoding.
Args:
... | python | def sign_json(self, json):
"""Signs a JSON object.
NOTE: The object is modified in-place and the return value can be ignored.
As specified, this is done by encoding the JSON object without ``signatures`` or
keys grouped as ``unsigned``, using canonical encoding.
Args:
... | [
"def",
"sign_json",
"(",
"self",
",",
"json",
")",
":",
"signatures",
"=",
"json",
".",
"pop",
"(",
"'signatures'",
",",
"{",
"}",
")",
"unsigned",
"=",
"json",
".",
"pop",
"(",
"'unsigned'",
",",
"None",
")",
"signature_base64",
"=",
"self",
".",
"o... | Signs a JSON object.
NOTE: The object is modified in-place and the return value can be ignored.
As specified, this is done by encoding the JSON object without ``signatures`` or
keys grouped as ``unsigned``, using canonical encoding.
Args:
json (dict): The JSON object to si... | [
"Signs",
"a",
"JSON",
"object",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/crypto/olm_device.py#L139-L166 | train |
matrix-org/matrix-python-sdk | matrix_client/crypto/olm_device.py | OlmDevice.verify_json | def verify_json(self, json, user_key, user_id, device_id):
"""Verifies a signed key object's signature.
The object must have a 'signatures' key associated with an object of the form
`user_id: {key_id: signature}`.
Args:
json (dict): The JSON object to verify.
us... | python | def verify_json(self, json, user_key, user_id, device_id):
"""Verifies a signed key object's signature.
The object must have a 'signatures' key associated with an object of the form
`user_id: {key_id: signature}`.
Args:
json (dict): The JSON object to verify.
us... | [
"def",
"verify_json",
"(",
"self",
",",
"json",
",",
"user_key",
",",
"user_id",
",",
"device_id",
")",
":",
"try",
":",
"signatures",
"=",
"json",
".",
"pop",
"(",
"'signatures'",
")",
"except",
"KeyError",
":",
"return",
"False",
"key_id",
"=",
"'ed255... | Verifies a signed key object's signature.
The object must have a 'signatures' key associated with an object of the form
`user_id: {key_id: signature}`.
Args:
json (dict): The JSON object to verify.
user_key (str): The public ed25519 key which was used to sign the object... | [
"Verifies",
"a",
"signed",
"key",
"object",
"s",
"signature",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/crypto/olm_device.py#L168-L207 | train |
matrix-org/matrix-python-sdk | matrix_client/user.py | User.get_display_name | def get_display_name(self, room=None):
"""Get this user's display name.
Args:
room (Room): Optional. When specified, return the display name of the user
in this room.
Returns:
The display name. Defaults to the user ID if not set.
"""
if r... | python | def get_display_name(self, room=None):
"""Get this user's display name.
Args:
room (Room): Optional. When specified, return the display name of the user
in this room.
Returns:
The display name. Defaults to the user ID if not set.
"""
if r... | [
"def",
"get_display_name",
"(",
"self",
",",
"room",
"=",
"None",
")",
":",
"if",
"room",
":",
"try",
":",
"return",
"room",
".",
"members_displaynames",
"[",
"self",
".",
"user_id",
"]",
"except",
"KeyError",
":",
"return",
"self",
".",
"user_id",
"if",... | Get this user's display name.
Args:
room (Room): Optional. When specified, return the display name of the user
in this room.
Returns:
The display name. Defaults to the user ID if not set. | [
"Get",
"this",
"user",
"s",
"display",
"name",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/user.py#L30-L47 | train |
matrix-org/matrix-python-sdk | matrix_client/user.py | User.set_display_name | def set_display_name(self, display_name):
""" Set this users display name.
Args:
display_name (str): Display Name
"""
self.displayname = display_name
return self.api.set_display_name(self.user_id, display_name) | python | def set_display_name(self, display_name):
""" Set this users display name.
Args:
display_name (str): Display Name
"""
self.displayname = display_name
return self.api.set_display_name(self.user_id, display_name) | [
"def",
"set_display_name",
"(",
"self",
",",
"display_name",
")",
":",
"self",
".",
"displayname",
"=",
"display_name",
"return",
"self",
".",
"api",
".",
"set_display_name",
"(",
"self",
".",
"user_id",
",",
"display_name",
")"
] | Set this users display name.
Args:
display_name (str): Display Name | [
"Set",
"this",
"users",
"display",
"name",
"."
] | e734cce3ccd35f2d355c6a19a7a701033472498a | https://github.com/matrix-org/matrix-python-sdk/blob/e734cce3ccd35f2d355c6a19a7a701033472498a/matrix_client/user.py#L55-L62 | train |
diyan/pywinrm | winrm/encryption.py | Encryption.prepare_encrypted_request | def prepare_encrypted_request(self, session, endpoint, message):
"""
Creates a prepared request to send to the server with an encrypted message
and correct headers
:param session: The handle of the session to prepare requests with
:param endpoint: The endpoint/server to prepare ... | python | def prepare_encrypted_request(self, session, endpoint, message):
"""
Creates a prepared request to send to the server with an encrypted message
and correct headers
:param session: The handle of the session to prepare requests with
:param endpoint: The endpoint/server to prepare ... | [
"def",
"prepare_encrypted_request",
"(",
"self",
",",
"session",
",",
"endpoint",
",",
"message",
")",
":",
"host",
"=",
"urlsplit",
"(",
"endpoint",
")",
".",
"hostname",
"if",
"self",
".",
"protocol",
"==",
"'credssp'",
"and",
"len",
"(",
"message",
")",... | Creates a prepared request to send to the server with an encrypted message
and correct headers
:param session: The handle of the session to prepare requests with
:param endpoint: The endpoint/server to prepare requests to
:param message: The unencrypted message to send to the server
... | [
"Creates",
"a",
"prepared",
"request",
"to",
"send",
"to",
"the",
"server",
"with",
"an",
"encrypted",
"message",
"and",
"correct",
"headers"
] | ed4c2d991d9d0fe921dfc958c475c4c6a570519e | https://github.com/diyan/pywinrm/blob/ed4c2d991d9d0fe921dfc958c475c4c6a570519e/winrm/encryption.py#L58-L88 | train |
diyan/pywinrm | winrm/encryption.py | Encryption.parse_encrypted_response | def parse_encrypted_response(self, response):
"""
Takes in the encrypted response from the server and decrypts it
:param response: The response that needs to be decrytped
:return: The unencrypted message from the server
"""
content_type = response.headers['Content-Type']... | python | def parse_encrypted_response(self, response):
"""
Takes in the encrypted response from the server and decrypts it
:param response: The response that needs to be decrytped
:return: The unencrypted message from the server
"""
content_type = response.headers['Content-Type']... | [
"def",
"parse_encrypted_response",
"(",
"self",
",",
"response",
")",
":",
"content_type",
"=",
"response",
".",
"headers",
"[",
"'Content-Type'",
"]",
"if",
"'protocol=\"{0}\"'",
".",
"format",
"(",
"self",
".",
"protocol_string",
".",
"decode",
"(",
")",
")"... | Takes in the encrypted response from the server and decrypts it
:param response: The response that needs to be decrytped
:return: The unencrypted message from the server | [
"Takes",
"in",
"the",
"encrypted",
"response",
"from",
"the",
"server",
"and",
"decrypts",
"it"
] | ed4c2d991d9d0fe921dfc958c475c4c6a570519e | https://github.com/diyan/pywinrm/blob/ed4c2d991d9d0fe921dfc958c475c4c6a570519e/winrm/encryption.py#L90-L104 | train |
diyan/pywinrm | winrm/protocol.py | Protocol.open_shell | def open_shell(self, i_stream='stdin', o_stream='stdout stderr',
working_directory=None, env_vars=None, noprofile=False,
codepage=437, lifetime=None, idle_timeout=None):
"""
Create a Shell on the destination host
@param string i_stream: Which input stream to... | python | def open_shell(self, i_stream='stdin', o_stream='stdout stderr',
working_directory=None, env_vars=None, noprofile=False,
codepage=437, lifetime=None, idle_timeout=None):
"""
Create a Shell on the destination host
@param string i_stream: Which input stream to... | [
"def",
"open_shell",
"(",
"self",
",",
"i_stream",
"=",
"'stdin'",
",",
"o_stream",
"=",
"'stdout stderr'",
",",
"working_directory",
"=",
"None",
",",
"env_vars",
"=",
"None",
",",
"noprofile",
"=",
"False",
",",
"codepage",
"=",
"437",
",",
"lifetime",
"... | Create a Shell on the destination host
@param string i_stream: Which input stream to open. Leave this alone
unless you know what you're doing (default: stdin)
@param string o_stream: Which output stream to open. Leave this alone
unless you know what you're doing (default: stdout stderr... | [
"Create",
"a",
"Shell",
"on",
"the",
"destination",
"host"
] | ed4c2d991d9d0fe921dfc958c475c4c6a570519e | https://github.com/diyan/pywinrm/blob/ed4c2d991d9d0fe921dfc958c475c4c6a570519e/winrm/protocol.py#L104-L164 | train |
diyan/pywinrm | winrm/protocol.py | Protocol.close_shell | def close_shell(self, shell_id):
"""
Close the shell
@param string shell_id: The shell id on the remote machine.
See #open_shell
@returns This should have more error checking but it just returns true
for now.
@rtype bool
"""
message_id = uuid.uui... | python | def close_shell(self, shell_id):
"""
Close the shell
@param string shell_id: The shell id on the remote machine.
See #open_shell
@returns This should have more error checking but it just returns true
for now.
@rtype bool
"""
message_id = uuid.uui... | [
"def",
"close_shell",
"(",
"self",
",",
"shell_id",
")",
":",
"message_id",
"=",
"uuid",
".",
"uuid4",
"(",
")",
"req",
"=",
"{",
"'env:Envelope'",
":",
"self",
".",
"_get_soap_header",
"(",
"resource_uri",
"=",
"'http://schemas.microsoft.com/wbem/wsman/1/windows/... | Close the shell
@param string shell_id: The shell id on the remote machine.
See #open_shell
@returns This should have more error checking but it just returns true
for now.
@rtype bool | [
"Close",
"the",
"shell"
] | ed4c2d991d9d0fe921dfc958c475c4c6a570519e | https://github.com/diyan/pywinrm/blob/ed4c2d991d9d0fe921dfc958c475c4c6a570519e/winrm/protocol.py#L274-L299 | train |
diyan/pywinrm | winrm/protocol.py | Protocol.run_command | def run_command(
self, shell_id, command, arguments=(), console_mode_stdin=True,
skip_cmd_shell=False):
"""
Run a command on a machine with an open shell
@param string shell_id: The shell id on the remote machine.
See #open_shell
@param string command: Th... | python | def run_command(
self, shell_id, command, arguments=(), console_mode_stdin=True,
skip_cmd_shell=False):
"""
Run a command on a machine with an open shell
@param string shell_id: The shell id on the remote machine.
See #open_shell
@param string command: Th... | [
"def",
"run_command",
"(",
"self",
",",
"shell_id",
",",
"command",
",",
"arguments",
"=",
"(",
")",
",",
"console_mode_stdin",
"=",
"True",
",",
"skip_cmd_shell",
"=",
"False",
")",
":",
"req",
"=",
"{",
"'env:Envelope'",
":",
"self",
".",
"_get_soap_head... | Run a command on a machine with an open shell
@param string shell_id: The shell id on the remote machine.
See #open_shell
@param string command: The command to run on the remote machine
@param iterable of string arguments: An array of arguments for this
command
@param b... | [
"Run",
"a",
"command",
"on",
"a",
"machine",
"with",
"an",
"open",
"shell"
] | ed4c2d991d9d0fe921dfc958c475c4c6a570519e | https://github.com/diyan/pywinrm/blob/ed4c2d991d9d0fe921dfc958c475c4c6a570519e/winrm/protocol.py#L301-L346 | train |
diyan/pywinrm | winrm/protocol.py | Protocol.get_command_output | def get_command_output(self, shell_id, command_id):
"""
Get the Output of the given shell and command
@param string shell_id: The shell id on the remote machine.
See #open_shell
@param string command_id: The command id on the remote machine.
See #run_command
#@r... | python | def get_command_output(self, shell_id, command_id):
"""
Get the Output of the given shell and command
@param string shell_id: The shell id on the remote machine.
See #open_shell
@param string command_id: The command id on the remote machine.
See #run_command
#@r... | [
"def",
"get_command_output",
"(",
"self",
",",
"shell_id",
",",
"command_id",
")",
":",
"stdout_buffer",
",",
"stderr_buffer",
"=",
"[",
"]",
",",
"[",
"]",
"command_done",
"=",
"False",
"while",
"not",
"command_done",
":",
"try",
":",
"stdout",
",",
"stde... | Get the Output of the given shell and command
@param string shell_id: The shell id on the remote machine.
See #open_shell
@param string command_id: The command id on the remote machine.
See #run_command
#@return [Hash] Returns a Hash with a key :exitcode and :data.
Dat... | [
"Get",
"the",
"Output",
"of",
"the",
"given",
"shell",
"and",
"command"
] | ed4c2d991d9d0fe921dfc958c475c4c6a570519e | https://github.com/diyan/pywinrm/blob/ed4c2d991d9d0fe921dfc958c475c4c6a570519e/winrm/protocol.py#L380-L404 | train |
diyan/pywinrm | winrm/__init__.py | Session.run_ps | def run_ps(self, script):
"""base64 encodes a Powershell script and executes the powershell
encoded script command
"""
# must use utf16 little endian on windows
encoded_ps = b64encode(script.encode('utf_16_le')).decode('ascii')
rs = self.run_cmd('powershell -encodedcomman... | python | def run_ps(self, script):
"""base64 encodes a Powershell script and executes the powershell
encoded script command
"""
# must use utf16 little endian on windows
encoded_ps = b64encode(script.encode('utf_16_le')).decode('ascii')
rs = self.run_cmd('powershell -encodedcomman... | [
"def",
"run_ps",
"(",
"self",
",",
"script",
")",
":",
"encoded_ps",
"=",
"b64encode",
"(",
"script",
".",
"encode",
"(",
"'utf_16_le'",
")",
")",
".",
"decode",
"(",
"'ascii'",
")",
"rs",
"=",
"self",
".",
"run_cmd",
"(",
"'powershell -encodedcommand {0}'... | base64 encodes a Powershell script and executes the powershell
encoded script command | [
"base64",
"encodes",
"a",
"Powershell",
"script",
"and",
"executes",
"the",
"powershell",
"encoded",
"script",
"command"
] | ed4c2d991d9d0fe921dfc958c475c4c6a570519e | https://github.com/diyan/pywinrm/blob/ed4c2d991d9d0fe921dfc958c475c4c6a570519e/winrm/__init__.py#L44-L55 | train |
diyan/pywinrm | winrm/__init__.py | Session._clean_error_msg | def _clean_error_msg(self, msg):
"""converts a Powershell CLIXML message to a more human readable string
"""
# TODO prepare unit test, beautify code
# if the msg does not start with this, return it as is
if msg.startswith(b"#< CLIXML\r\n"):
# for proper xml, we need t... | python | def _clean_error_msg(self, msg):
"""converts a Powershell CLIXML message to a more human readable string
"""
# TODO prepare unit test, beautify code
# if the msg does not start with this, return it as is
if msg.startswith(b"#< CLIXML\r\n"):
# for proper xml, we need t... | [
"def",
"_clean_error_msg",
"(",
"self",
",",
"msg",
")",
":",
"if",
"msg",
".",
"startswith",
"(",
"b\"#< CLIXML\\r\\n\"",
")",
":",
"msg_xml",
"=",
"msg",
"[",
"11",
":",
"]",
"try",
":",
"msg_xml",
"=",
"self",
".",
"_strip_namespace",
"(",
"msg_xml",
... | converts a Powershell CLIXML message to a more human readable string | [
"converts",
"a",
"Powershell",
"CLIXML",
"message",
"to",
"a",
"more",
"human",
"readable",
"string"
] | ed4c2d991d9d0fe921dfc958c475c4c6a570519e | https://github.com/diyan/pywinrm/blob/ed4c2d991d9d0fe921dfc958c475c4c6a570519e/winrm/__init__.py#L57-L92 | train |
diyan/pywinrm | winrm/__init__.py | Session._strip_namespace | def _strip_namespace(self, xml):
"""strips any namespaces from an xml string"""
p = re.compile(b"xmlns=*[\"\"][^\"\"]*[\"\"]")
allmatches = p.finditer(xml)
for match in allmatches:
xml = xml.replace(match.group(), b"")
return xml | python | def _strip_namespace(self, xml):
"""strips any namespaces from an xml string"""
p = re.compile(b"xmlns=*[\"\"][^\"\"]*[\"\"]")
allmatches = p.finditer(xml)
for match in allmatches:
xml = xml.replace(match.group(), b"")
return xml | [
"def",
"_strip_namespace",
"(",
"self",
",",
"xml",
")",
":",
"p",
"=",
"re",
".",
"compile",
"(",
"b\"xmlns=*[\\\"\\\"][^\\\"\\\"]*[\\\"\\\"]\"",
")",
"allmatches",
"=",
"p",
".",
"finditer",
"(",
"xml",
")",
"for",
"match",
"in",
"allmatches",
":",
"xml",
... | strips any namespaces from an xml string | [
"strips",
"any",
"namespaces",
"from",
"an",
"xml",
"string"
] | ed4c2d991d9d0fe921dfc958c475c4c6a570519e | https://github.com/diyan/pywinrm/blob/ed4c2d991d9d0fe921dfc958c475c4c6a570519e/winrm/__init__.py#L94-L100 | train |
pyvisa/pyvisa | pyvisa/errors.py | return_handler | def return_handler(module_logger, first_is_session=True):
"""Decorator for VISA library classes.
"""
def _outer(visa_library_method):
def _inner(self, session, *args, **kwargs):
ret_value = visa_library_method(*args, **kwargs)
module_logger.debug('%s%s -> %r',
... | python | def return_handler(module_logger, first_is_session=True):
"""Decorator for VISA library classes.
"""
def _outer(visa_library_method):
def _inner(self, session, *args, **kwargs):
ret_value = visa_library_method(*args, **kwargs)
module_logger.debug('%s%s -> %r',
... | [
"def",
"return_handler",
"(",
"module_logger",
",",
"first_is_session",
"=",
"True",
")",
":",
"def",
"_outer",
"(",
"visa_library_method",
")",
":",
"def",
"_inner",
"(",
"self",
",",
"session",
",",
"*",
"args",
",",
"**",
"kwargs",
")",
":",
"ret_value"... | Decorator for VISA library classes. | [
"Decorator",
"for",
"VISA",
"library",
"classes",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/errors.py#L501-L535 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | list_backends | def list_backends():
"""Return installed backends.
Backends are installed python packages named pyvisa-<something> where <something>
is the name of the backend.
:rtype: list
"""
return ['ni'] + [name for (loader, name, ispkg) in pkgutil.iter_modules()
if name.startswith('p... | python | def list_backends():
"""Return installed backends.
Backends are installed python packages named pyvisa-<something> where <something>
is the name of the backend.
:rtype: list
"""
return ['ni'] + [name for (loader, name, ispkg) in pkgutil.iter_modules()
if name.startswith('p... | [
"def",
"list_backends",
"(",
")",
":",
"return",
"[",
"'ni'",
"]",
"+",
"[",
"name",
"for",
"(",
"loader",
",",
"name",
",",
"ispkg",
")",
"in",
"pkgutil",
".",
"iter_modules",
"(",
")",
"if",
"name",
".",
"startswith",
"(",
"'pyvisa-'",
")",
"and",
... | Return installed backends.
Backends are installed python packages named pyvisa-<something> where <something>
is the name of the backend.
:rtype: list | [
"Return",
"installed",
"backends",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L1412-L1421 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | get_wrapper_class | def get_wrapper_class(backend_name):
"""Return the WRAPPER_CLASS for a given backend.
:rtype: pyvisa.highlevel.VisaLibraryBase
"""
try:
return _WRAPPERS[backend_name]
except KeyError:
if backend_name == 'ni':
from .ctwrapper import NIVisaLibrary
_WRAPPERS['ni... | python | def get_wrapper_class(backend_name):
"""Return the WRAPPER_CLASS for a given backend.
:rtype: pyvisa.highlevel.VisaLibraryBase
"""
try:
return _WRAPPERS[backend_name]
except KeyError:
if backend_name == 'ni':
from .ctwrapper import NIVisaLibrary
_WRAPPERS['ni... | [
"def",
"get_wrapper_class",
"(",
"backend_name",
")",
":",
"try",
":",
"return",
"_WRAPPERS",
"[",
"backend_name",
"]",
"except",
"KeyError",
":",
"if",
"backend_name",
"==",
"'ni'",
":",
"from",
".",
"ctwrapper",
"import",
"NIVisaLibrary",
"_WRAPPERS",
"[",
"... | Return the WRAPPER_CLASS for a given backend.
:rtype: pyvisa.highlevel.VisaLibraryBase | [
"Return",
"the",
"WRAPPER_CLASS",
"for",
"a",
"given",
"backend",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L1429-L1447 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | open_visa_library | def open_visa_library(specification):
"""Helper function to create a VISA library wrapper.
In general, you should not use the function directly. The VISA library
wrapper will be created automatically when you create a ResourceManager object.
"""
if not specification:
logger.debug('No visa ... | python | def open_visa_library(specification):
"""Helper function to create a VISA library wrapper.
In general, you should not use the function directly. The VISA library
wrapper will be created automatically when you create a ResourceManager object.
"""
if not specification:
logger.debug('No visa ... | [
"def",
"open_visa_library",
"(",
"specification",
")",
":",
"if",
"not",
"specification",
":",
"logger",
".",
"debug",
"(",
"'No visa library specified, trying to find alternatives.'",
")",
"try",
":",
"specification",
"=",
"os",
".",
"environ",
"[",
"'PYVISA_LIBRARY'... | Helper function to create a VISA library wrapper.
In general, you should not use the function directly. The VISA library
wrapper will be created automatically when you create a ResourceManager object. | [
"Helper",
"function",
"to",
"create",
"a",
"VISA",
"library",
"wrapper",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L1474-L1505 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | VisaLibraryBase.get_last_status_in_session | def get_last_status_in_session(self, session):
"""Last status in session.
Helper function to be called by resources properties.
"""
try:
return self._last_status_in_session[session]
except KeyError:
raise errors.Error('The session %r does not seem to be v... | python | def get_last_status_in_session(self, session):
"""Last status in session.
Helper function to be called by resources properties.
"""
try:
return self._last_status_in_session[session]
except KeyError:
raise errors.Error('The session %r does not seem to be v... | [
"def",
"get_last_status_in_session",
"(",
"self",
",",
"session",
")",
":",
"try",
":",
"return",
"self",
".",
"_last_status_in_session",
"[",
"session",
"]",
"except",
"KeyError",
":",
"raise",
"errors",
".",
"Error",
"(",
"'The session %r does not seem to be valid... | Last status in session.
Helper function to be called by resources properties. | [
"Last",
"status",
"in",
"session",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L154-L162 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | VisaLibraryBase.ignore_warning | def ignore_warning(self, session, *warnings_constants):
"""A session dependent context for ignoring warnings
:param session: Unique logical identifier to a session.
:param warnings_constants: constants identifying the warnings to ignore.
"""
self._ignore_warning_in_session[sessi... | python | def ignore_warning(self, session, *warnings_constants):
"""A session dependent context for ignoring warnings
:param session: Unique logical identifier to a session.
:param warnings_constants: constants identifying the warnings to ignore.
"""
self._ignore_warning_in_session[sessi... | [
"def",
"ignore_warning",
"(",
"self",
",",
"session",
",",
"*",
"warnings_constants",
")",
":",
"self",
".",
"_ignore_warning_in_session",
"[",
"session",
"]",
".",
"update",
"(",
"warnings_constants",
")",
"yield",
"self",
".",
"_ignore_warning_in_session",
"[",
... | A session dependent context for ignoring warnings
:param session: Unique logical identifier to a session.
:param warnings_constants: constants identifying the warnings to ignore. | [
"A",
"session",
"dependent",
"context",
"for",
"ignoring",
"warnings"
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L165-L173 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | VisaLibraryBase.uninstall_all_visa_handlers | def uninstall_all_visa_handlers(self, session):
"""Uninstalls all previously installed handlers for a particular session.
:param session: Unique logical identifier to a session. If None, operates on all sessions.
"""
if session is not None:
self.__uninstall_all_handlers_hel... | python | def uninstall_all_visa_handlers(self, session):
"""Uninstalls all previously installed handlers for a particular session.
:param session: Unique logical identifier to a session. If None, operates on all sessions.
"""
if session is not None:
self.__uninstall_all_handlers_hel... | [
"def",
"uninstall_all_visa_handlers",
"(",
"self",
",",
"session",
")",
":",
"if",
"session",
"is",
"not",
"None",
":",
"self",
".",
"__uninstall_all_handlers_helper",
"(",
"session",
")",
"else",
":",
"for",
"session",
"in",
"list",
"(",
"self",
".",
"handl... | Uninstalls all previously installed handlers for a particular session.
:param session: Unique logical identifier to a session. If None, operates on all sessions. | [
"Uninstalls",
"all",
"previously",
"installed",
"handlers",
"for",
"a",
"particular",
"session",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L214-L224 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | VisaLibraryBase.write_memory | def write_memory(self, session, space, offset, data, width, extended=False):
"""Write in an 8-bit, 16-bit, 32-bit, 64-bit value to the specified memory space and offset.
Corresponds to viOut* functions of the VISA library.
:param session: Unique logical identifier to a session.
:param ... | python | def write_memory(self, session, space, offset, data, width, extended=False):
"""Write in an 8-bit, 16-bit, 32-bit, 64-bit value to the specified memory space and offset.
Corresponds to viOut* functions of the VISA library.
:param session: Unique logical identifier to a session.
:param ... | [
"def",
"write_memory",
"(",
"self",
",",
"session",
",",
"space",
",",
"offset",
",",
"data",
",",
"width",
",",
"extended",
"=",
"False",
")",
":",
"if",
"width",
"==",
"8",
":",
"return",
"self",
".",
"out_8",
"(",
"session",
",",
"space",
",",
"... | Write in an 8-bit, 16-bit, 32-bit, 64-bit value to the specified memory space and offset.
Corresponds to viOut* functions of the VISA library.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (Constants.*SPACE*)
:param offset: Offset (i... | [
"Write",
"in",
"an",
"8",
"-",
"bit",
"16",
"-",
"bit",
"32",
"-",
"bit",
"64",
"-",
"bit",
"value",
"to",
"the",
"specified",
"memory",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L250-L273 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | VisaLibraryBase.peek | def peek(self, session, address, width):
"""Read an 8, 16, 32, or 64-bit value from the specified address.
Corresponds to viPeek* functions of the VISA library.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:param widt... | python | def peek(self, session, address, width):
"""Read an 8, 16, 32, or 64-bit value from the specified address.
Corresponds to viPeek* functions of the VISA library.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:param widt... | [
"def",
"peek",
"(",
"self",
",",
"session",
",",
"address",
",",
"width",
")",
":",
"if",
"width",
"==",
"8",
":",
"return",
"self",
".",
"peek_8",
"(",
"session",
",",
"address",
")",
"elif",
"width",
"==",
"16",
":",
"return",
"self",
".",
"peek_... | Read an 8, 16, 32, or 64-bit value from the specified address.
Corresponds to viPeek* functions of the VISA library.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:param width: Number of bits to read.
:return: Data rea... | [
"Read",
"an",
"8",
"16",
"32",
"or",
"64",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L328-L349 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | VisaLibraryBase.poke | def poke(self, session, address, width, data):
"""Writes an 8, 16, 32, or 64-bit value from the specified address.
Corresponds to viPoke* functions of the VISA library.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:pa... | python | def poke(self, session, address, width, data):
"""Writes an 8, 16, 32, or 64-bit value from the specified address.
Corresponds to viPoke* functions of the VISA library.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:pa... | [
"def",
"poke",
"(",
"self",
",",
"session",
",",
"address",
",",
"width",
",",
"data",
")",
":",
"if",
"width",
"==",
"8",
":",
"return",
"self",
".",
"poke_8",
"(",
"session",
",",
"address",
",",
"data",
")",
"elif",
"width",
"==",
"16",
":",
"... | Writes an 8, 16, 32, or 64-bit value from the specified address.
Corresponds to viPoke* functions of the VISA library.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:param width: Number of bits to read.
:param data: Da... | [
"Writes",
"an",
"8",
"16",
"32",
"or",
"64",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L351-L373 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | ResourceManager.close | def close(self):
"""Close the resource manager session.
"""
try:
logger.debug('Closing ResourceManager (session: %s)', self.session)
# Cleanly close all resources when closing the manager.
for resource in self._created_resources:
resource.close... | python | def close(self):
"""Close the resource manager session.
"""
try:
logger.debug('Closing ResourceManager (session: %s)', self.session)
# Cleanly close all resources when closing the manager.
for resource in self._created_resources:
resource.close... | [
"def",
"close",
"(",
"self",
")",
":",
"try",
":",
"logger",
".",
"debug",
"(",
"'Closing ResourceManager (session: %s)'",
",",
"self",
".",
"session",
")",
"for",
"resource",
"in",
"self",
".",
"_created_resources",
":",
"resource",
".",
"close",
"(",
")",
... | Close the resource manager session. | [
"Close",
"the",
"resource",
"manager",
"session",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L1586-L1598 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | ResourceManager.list_resources_info | def list_resources_info(self, query='?*::INSTR'):
"""Returns a dictionary mapping resource names to resource extended
information of all connected devices matching query.
For details of the VISA Resource Regular Expression syntax used in query,
refer to list_resources().
:param... | python | def list_resources_info(self, query='?*::INSTR'):
"""Returns a dictionary mapping resource names to resource extended
information of all connected devices matching query.
For details of the VISA Resource Regular Expression syntax used in query,
refer to list_resources().
:param... | [
"def",
"list_resources_info",
"(",
"self",
",",
"query",
"=",
"'?*::INSTR'",
")",
":",
"return",
"dict",
"(",
"(",
"resource",
",",
"self",
".",
"resource_info",
"(",
"resource",
")",
")",
"for",
"resource",
"in",
"self",
".",
"list_resources",
"(",
"query... | Returns a dictionary mapping resource names to resource extended
information of all connected devices matching query.
For details of the VISA Resource Regular Expression syntax used in query,
refer to list_resources().
:param query: a VISA Resource Regular Expression used to match devi... | [
"Returns",
"a",
"dictionary",
"mapping",
"resource",
"names",
"to",
"resource",
"extended",
"information",
"of",
"all",
"connected",
"devices",
"matching",
"query",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L1647-L1660 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | ResourceManager.open_bare_resource | def open_bare_resource(self, resource_name,
access_mode=constants.AccessModes.no_lock,
open_timeout=constants.VI_TMO_IMMEDIATE):
"""Open the specified resource without wrapping into a class
:param resource_name: name or alias of the resource to open.
... | python | def open_bare_resource(self, resource_name,
access_mode=constants.AccessModes.no_lock,
open_timeout=constants.VI_TMO_IMMEDIATE):
"""Open the specified resource without wrapping into a class
:param resource_name: name or alias of the resource to open.
... | [
"def",
"open_bare_resource",
"(",
"self",
",",
"resource_name",
",",
"access_mode",
"=",
"constants",
".",
"AccessModes",
".",
"no_lock",
",",
"open_timeout",
"=",
"constants",
".",
"VI_TMO_IMMEDIATE",
")",
":",
"return",
"self",
".",
"visalib",
".",
"open",
"... | Open the specified resource without wrapping into a class
:param resource_name: name or alias of the resource to open.
:param access_mode: access mode.
:type access_mode: :class:`pyvisa.constants.AccessModes`
:param open_timeout: time out to open.
:return: Unique logical identi... | [
"Open",
"the",
"specified",
"resource",
"without",
"wrapping",
"into",
"a",
"class"
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L1677-L1689 | train |
pyvisa/pyvisa | pyvisa/highlevel.py | ResourceManager.open_resource | def open_resource(self, resource_name,
access_mode=constants.AccessModes.no_lock,
open_timeout=constants.VI_TMO_IMMEDIATE,
resource_pyclass=None,
**kwargs):
"""Return an instrument for the resource name.
:param reso... | python | def open_resource(self, resource_name,
access_mode=constants.AccessModes.no_lock,
open_timeout=constants.VI_TMO_IMMEDIATE,
resource_pyclass=None,
**kwargs):
"""Return an instrument for the resource name.
:param reso... | [
"def",
"open_resource",
"(",
"self",
",",
"resource_name",
",",
"access_mode",
"=",
"constants",
".",
"AccessModes",
".",
"no_lock",
",",
"open_timeout",
"=",
"constants",
".",
"VI_TMO_IMMEDIATE",
",",
"resource_pyclass",
"=",
"None",
",",
"**",
"kwargs",
")",
... | Return an instrument for the resource name.
:param resource_name: name or alias of the resource to open.
:param access_mode: access mode.
:type access_mode: :class:`pyvisa.constants.AccessModes`
:param open_timeout: time out to open.
:param resource_pyclass: resource python clas... | [
"Return",
"an",
"instrument",
"for",
"the",
"resource",
"name",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/highlevel.py#L1691-L1739 | train |
pyvisa/pyvisa | pyvisa/rname.py | register_subclass | def register_subclass(cls):
"""Register a subclass for a given interface type and resource class.
"""
key = cls.interface_type, cls.resource_class
if key in _SUBCLASSES:
raise ValueError('Class already registered for %s and %s' % key)
_SUBCLASSES[(cls.interface_type, cls.resource_class)] ... | python | def register_subclass(cls):
"""Register a subclass for a given interface type and resource class.
"""
key = cls.interface_type, cls.resource_class
if key in _SUBCLASSES:
raise ValueError('Class already registered for %s and %s' % key)
_SUBCLASSES[(cls.interface_type, cls.resource_class)] ... | [
"def",
"register_subclass",
"(",
"cls",
")",
":",
"key",
"=",
"cls",
".",
"interface_type",
",",
"cls",
".",
"resource_class",
"if",
"key",
"in",
"_SUBCLASSES",
":",
"raise",
"ValueError",
"(",
"'Class already registered for %s and %s'",
"%",
"key",
")",
"_SUBCL... | Register a subclass for a given interface type and resource class. | [
"Register",
"a",
"subclass",
"for",
"a",
"given",
"interface",
"type",
"and",
"resource",
"class",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/rname.py#L86-L106 | train |
pyvisa/pyvisa | pyvisa/rname.py | InvalidResourceName.bad_syntax | def bad_syntax(cls, syntax, resource_name, ex=None):
"""Exception used when the resource name cannot be parsed.
"""
if ex:
msg = "The syntax is '%s' (%s)." % (syntax, ex)
else:
msg = "The syntax is '%s'." % syntax
msg = "Could not parse '%s'. %s" % (reso... | python | def bad_syntax(cls, syntax, resource_name, ex=None):
"""Exception used when the resource name cannot be parsed.
"""
if ex:
msg = "The syntax is '%s' (%s)." % (syntax, ex)
else:
msg = "The syntax is '%s'." % syntax
msg = "Could not parse '%s'. %s" % (reso... | [
"def",
"bad_syntax",
"(",
"cls",
",",
"syntax",
",",
"resource_name",
",",
"ex",
"=",
"None",
")",
":",
"if",
"ex",
":",
"msg",
"=",
"\"The syntax is '%s' (%s).\"",
"%",
"(",
"syntax",
",",
"ex",
")",
"else",
":",
"msg",
"=",
"\"The syntax is '%s'.\"",
"... | Exception used when the resource name cannot be parsed. | [
"Exception",
"used",
"when",
"the",
"resource",
"name",
"cannot",
"be",
"parsed",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/rname.py#L43-L54 | train |
pyvisa/pyvisa | pyvisa/rname.py | InvalidResourceName.rc_notfound | def rc_notfound(cls, interface_type, resource_name=None):
"""Exception used when no resource class is provided and no default is found.
"""
msg = "Resource class for %s not provided and default not found." % interface_type
if resource_name:
msg = "Could not parse '%s'. %s" ... | python | def rc_notfound(cls, interface_type, resource_name=None):
"""Exception used when no resource class is provided and no default is found.
"""
msg = "Resource class for %s not provided and default not found." % interface_type
if resource_name:
msg = "Could not parse '%s'. %s" ... | [
"def",
"rc_notfound",
"(",
"cls",
",",
"interface_type",
",",
"resource_name",
"=",
"None",
")",
":",
"msg",
"=",
"\"Resource class for %s not provided and default not found.\"",
"%",
"interface_type",
"if",
"resource_name",
":",
"msg",
"=",
"\"Could not parse '%s'. %s\""... | Exception used when no resource class is provided and no default is found. | [
"Exception",
"used",
"when",
"no",
"resource",
"class",
"is",
"provided",
"and",
"no",
"default",
"is",
"found",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/rname.py#L71-L80 | train |
pyvisa/pyvisa | pyvisa/rname.py | ResourceName.from_string | def from_string(cls, resource_name):
"""Parse a resource name and return a ResourceName
:type resource_name: str
:rtype: ResourceName
:raises InvalidResourceName: if the resource name is invalid.
"""
# TODO Remote VISA
uname = resource_name.upper()
for... | python | def from_string(cls, resource_name):
"""Parse a resource name and return a ResourceName
:type resource_name: str
:rtype: ResourceName
:raises InvalidResourceName: if the resource name is invalid.
"""
# TODO Remote VISA
uname = resource_name.upper()
for... | [
"def",
"from_string",
"(",
"cls",
",",
"resource_name",
")",
":",
"uname",
"=",
"resource_name",
".",
"upper",
"(",
")",
"for",
"interface_type",
"in",
"_INTERFACE_TYPES",
":",
"if",
"not",
"uname",
".",
"startswith",
"(",
"interface_type",
")",
":",
"contin... | Parse a resource name and return a ResourceName
:type resource_name: str
:rtype: ResourceName
:raises InvalidResourceName: if the resource name is invalid. | [
"Parse",
"a",
"resource",
"name",
"and",
"return",
"a",
"ResourceName"
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/rname.py#L139-L193 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | set_user_handle_type | def set_user_handle_type(library, user_handle):
"""Set the type of the user handle to install and uninstall handler signature.
:param library: the visa library wrapped by ctypes.
:param user_handle: use None for a void_p
"""
# Actually, it's not necessary to change ViHndlr *globally*. However,
... | python | def set_user_handle_type(library, user_handle):
"""Set the type of the user handle to install and uninstall handler signature.
:param library: the visa library wrapped by ctypes.
:param user_handle: use None for a void_p
"""
# Actually, it's not necessary to change ViHndlr *globally*. However,
... | [
"def",
"set_user_handle_type",
"(",
"library",
",",
"user_handle",
")",
":",
"global",
"ViHndlr",
"if",
"user_handle",
"is",
"None",
":",
"user_handle_p",
"=",
"c_void_p",
"else",
":",
"user_handle_p",
"=",
"POINTER",
"(",
"type",
"(",
"user_handle",
")",
")",... | Set the type of the user handle to install and uninstall handler signature.
:param library: the visa library wrapped by ctypes.
:param user_handle: use None for a void_p | [
"Set",
"the",
"type",
"of",
"the",
"user",
"handle",
"to",
"install",
"and",
"uninstall",
"handler",
"signature",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L52-L71 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | set_signature | def set_signature(library, function_name, argtypes, restype, errcheck):
"""Set the signature of single function in a library.
:param library: ctypes wrapped library.
:type library: ctypes.WinDLL or ctypes.CDLL
:param function_name: name of the function as appears in the header file.
:type function_... | python | def set_signature(library, function_name, argtypes, restype, errcheck):
"""Set the signature of single function in a library.
:param library: ctypes wrapped library.
:type library: ctypes.WinDLL or ctypes.CDLL
:param function_name: name of the function as appears in the header file.
:type function_... | [
"def",
"set_signature",
"(",
"library",
",",
"function_name",
",",
"argtypes",
",",
"restype",
",",
"errcheck",
")",
":",
"func",
"=",
"getattr",
"(",
"library",
",",
"function_name",
")",
"func",
".",
"argtypes",
"=",
"argtypes",
"if",
"restype",
"is",
"n... | Set the signature of single function in a library.
:param library: ctypes wrapped library.
:type library: ctypes.WinDLL or ctypes.CDLL
:param function_name: name of the function as appears in the header file.
:type function_name: str
:param argtypes: a tuple of ctypes types to specify the argument ... | [
"Set",
"the",
"signature",
"of",
"single",
"function",
"in",
"a",
"library",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L226-L246 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | assert_interrupt_signal | def assert_interrupt_signal(library, session, mode, status_id):
"""Asserts the specified interrupt or signal.
Corresponds to viAssertIntrSignal function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param mode: How... | python | def assert_interrupt_signal(library, session, mode, status_id):
"""Asserts the specified interrupt or signal.
Corresponds to viAssertIntrSignal function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param mode: How... | [
"def",
"assert_interrupt_signal",
"(",
"library",
",",
"session",
",",
"mode",
",",
"status_id",
")",
":",
"return",
"library",
".",
"viAssertIntrSignal",
"(",
"session",
",",
"mode",
",",
"status_id",
")"
] | Asserts the specified interrupt or signal.
Corresponds to viAssertIntrSignal function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param mode: How to assert the interrupt. (Constants.ASSERT*)
:param status_id: Thi... | [
"Asserts",
"the",
"specified",
"interrupt",
"or",
"signal",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L292-L304 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | discard_events | def discard_events(library, session, event_type, mechanism):
"""Discards event occurrences for specified event types and mechanisms in a session.
Corresponds to viDiscardEvents function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier t... | python | def discard_events(library, session, event_type, mechanism):
"""Discards event occurrences for specified event types and mechanisms in a session.
Corresponds to viDiscardEvents function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier t... | [
"def",
"discard_events",
"(",
"library",
",",
"session",
",",
"event_type",
",",
"mechanism",
")",
":",
"return",
"library",
".",
"viDiscardEvents",
"(",
"session",
",",
"event_type",
",",
"mechanism",
")"
] | Discards event occurrences for specified event types and mechanisms in a session.
Corresponds to viDiscardEvents function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param event_type: Logical event identifier.
:p... | [
"Discards",
"event",
"occurrences",
"for",
"specified",
"event",
"types",
"and",
"mechanisms",
"in",
"a",
"session",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L413-L426 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | enable_event | def enable_event(library, session, event_type, mechanism, context=None):
"""Enable event occurrences for specified event types and mechanisms in a session.
Corresponds to viEnableEvent function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical iden... | python | def enable_event(library, session, event_type, mechanism, context=None):
"""Enable event occurrences for specified event types and mechanisms in a session.
Corresponds to viEnableEvent function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical iden... | [
"def",
"enable_event",
"(",
"library",
",",
"session",
",",
"event_type",
",",
"mechanism",
",",
"context",
"=",
"None",
")",
":",
"if",
"context",
"is",
"None",
":",
"context",
"=",
"constants",
".",
"VI_NULL",
"elif",
"context",
"!=",
"constants",
".",
... | Enable event occurrences for specified event types and mechanisms in a session.
Corresponds to viEnableEvent function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param event_type: Logical event identifier.
:param... | [
"Enable",
"event",
"occurrences",
"for",
"specified",
"event",
"types",
"and",
"mechanisms",
"in",
"a",
"session",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L429-L448 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | find_resources | def find_resources(library, session, query):
"""Queries a VISA system to locate the resources associated with a specified interface.
Corresponds to viFindRsrc function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session (unuse... | python | def find_resources(library, session, query):
"""Queries a VISA system to locate the resources associated with a specified interface.
Corresponds to viFindRsrc function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session (unuse... | [
"def",
"find_resources",
"(",
"library",
",",
"session",
",",
"query",
")",
":",
"find_list",
"=",
"ViFindList",
"(",
")",
"return_counter",
"=",
"ViUInt32",
"(",
")",
"instrument_description",
"=",
"create_string_buffer",
"(",
"constants",
".",
"VI_FIND_BUFLEN",
... | Queries a VISA system to locate the resources associated with a specified interface.
Corresponds to viFindRsrc function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session (unused, just to uniform signatures).
:param query: A ... | [
"Queries",
"a",
"VISA",
"system",
"to",
"locate",
"the",
"resources",
"associated",
"with",
"a",
"specified",
"interface",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L466-L486 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | gpib_command | def gpib_command(library, session, data):
"""Write GPIB command bytes on the bus.
Corresponds to viGpibCommand function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param data: data tor write.
:type data: byte... | python | def gpib_command(library, session, data):
"""Write GPIB command bytes on the bus.
Corresponds to viGpibCommand function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param data: data tor write.
:type data: byte... | [
"def",
"gpib_command",
"(",
"library",
",",
"session",
",",
"data",
")",
":",
"return_count",
"=",
"ViUInt32",
"(",
")",
"ret",
"=",
"library",
".",
"viGpibCommand",
"(",
"session",
",",
"data",
",",
"len",
"(",
"data",
")",
",",
"byref",
"(",
"return_... | Write GPIB command bytes on the bus.
Corresponds to viGpibCommand function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param data: data tor write.
:type data: bytes
:return: Number of written bytes, return va... | [
"Write",
"GPIB",
"command",
"bytes",
"on",
"the",
"bus",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L534-L550 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | in_8 | def in_8(library, session, space, offset, extended=False):
"""Reads in an 8-bit value from the specified memory space and offset.
Corresponds to viIn8* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param s... | python | def in_8(library, session, space, offset, extended=False):
"""Reads in an 8-bit value from the specified memory space and offset.
Corresponds to viIn8* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param s... | [
"def",
"in_8",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"extended",
"=",
"False",
")",
":",
"value_8",
"=",
"ViUInt8",
"(",
")",
"if",
"extended",
":",
"ret",
"=",
"library",
".",
"viIn8Ex",
"(",
"session",
",",
"space",
",",... | Reads in an 8-bit value from the specified memory space and offset.
Corresponds to viIn8* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (Constants.*SPACE*)
:param ... | [
"Reads",
"in",
"an",
"8",
"-",
"bit",
"value",
"from",
"the",
"specified",
"memory",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L640-L658 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | in_16 | def in_16(library, session, space, offset, extended=False):
"""Reads in an 16-bit value from the specified memory space and offset.
Corresponds to viIn16* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:para... | python | def in_16(library, session, space, offset, extended=False):
"""Reads in an 16-bit value from the specified memory space and offset.
Corresponds to viIn16* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:para... | [
"def",
"in_16",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"extended",
"=",
"False",
")",
":",
"value_16",
"=",
"ViUInt16",
"(",
")",
"if",
"extended",
":",
"ret",
"=",
"library",
".",
"viIn16Ex",
"(",
"session",
",",
"space",
... | Reads in an 16-bit value from the specified memory space and offset.
Corresponds to viIn16* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (Constants.*SPACE*)
:para... | [
"Reads",
"in",
"an",
"16",
"-",
"bit",
"value",
"from",
"the",
"specified",
"memory",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L661-L679 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | in_32 | def in_32(library, session, space, offset, extended=False):
"""Reads in an 32-bit value from the specified memory space and offset.
Corresponds to viIn32* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:para... | python | def in_32(library, session, space, offset, extended=False):
"""Reads in an 32-bit value from the specified memory space and offset.
Corresponds to viIn32* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:para... | [
"def",
"in_32",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"extended",
"=",
"False",
")",
":",
"value_32",
"=",
"ViUInt32",
"(",
")",
"if",
"extended",
":",
"ret",
"=",
"library",
".",
"viIn32Ex",
"(",
"session",
",",
"space",
... | Reads in an 32-bit value from the specified memory space and offset.
Corresponds to viIn32* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (Constants.*SPACE*)
:para... | [
"Reads",
"in",
"an",
"32",
"-",
"bit",
"value",
"from",
"the",
"specified",
"memory",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L682-L700 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | in_64 | def in_64(library, session, space, offset, extended=False):
"""Reads in an 64-bit value from the specified memory space and offset.
Corresponds to viIn64* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:para... | python | def in_64(library, session, space, offset, extended=False):
"""Reads in an 64-bit value from the specified memory space and offset.
Corresponds to viIn64* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:para... | [
"def",
"in_64",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"extended",
"=",
"False",
")",
":",
"value_64",
"=",
"ViUInt64",
"(",
")",
"if",
"extended",
":",
"ret",
"=",
"library",
".",
"viIn64Ex",
"(",
"session",
",",
"space",
... | Reads in an 64-bit value from the specified memory space and offset.
Corresponds to viIn64* function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (Constants.*SPACE*)
:para... | [
"Reads",
"in",
"an",
"64",
"-",
"bit",
"value",
"from",
"the",
"specified",
"memory",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L703-L721 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | map_trigger | def map_trigger(library, session, trigger_source, trigger_destination, mode):
"""Map the specified trigger source line to the specified destination line.
Corresponds to viMapTrigger function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identif... | python | def map_trigger(library, session, trigger_source, trigger_destination, mode):
"""Map the specified trigger source line to the specified destination line.
Corresponds to viMapTrigger function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identif... | [
"def",
"map_trigger",
"(",
"library",
",",
"session",
",",
"trigger_source",
",",
"trigger_destination",
",",
"mode",
")",
":",
"return",
"library",
".",
"viMapTrigger",
"(",
"session",
",",
"trigger_source",
",",
"trigger_destination",
",",
"mode",
")"
] | Map the specified trigger source line to the specified destination line.
Corresponds to viMapTrigger function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param trigger_source: Source line from which to map. (Constant... | [
"Map",
"the",
"specified",
"trigger",
"source",
"line",
"to",
"the",
"specified",
"destination",
"line",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L838-L851 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | memory_allocation | def memory_allocation(library, session, size, extended=False):
"""Allocates memory from a resource's memory region.
Corresponds to viMemAlloc* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param size: Spe... | python | def memory_allocation(library, session, size, extended=False):
"""Allocates memory from a resource's memory region.
Corresponds to viMemAlloc* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param size: Spe... | [
"def",
"memory_allocation",
"(",
"library",
",",
"session",
",",
"size",
",",
"extended",
"=",
"False",
")",
":",
"offset",
"=",
"ViBusAddress",
"(",
")",
"if",
"extended",
":",
"ret",
"=",
"library",
".",
"viMemAllocEx",
"(",
"session",
",",
"size",
","... | Allocates memory from a resource's memory region.
Corresponds to viMemAlloc* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param size: Specifies the size of the allocation.
:param extended: Use 64 bits of... | [
"Allocates",
"memory",
"from",
"a",
"resource",
"s",
"memory",
"region",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L854-L871 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | move_asynchronously | def move_asynchronously(library, session, source_space, source_offset, source_width,
destination_space, destination_offset,
destination_width, length):
"""Moves a block of data asynchronously.
Corresponds to viMoveAsync function of the VISA library.
:param l... | python | def move_asynchronously(library, session, source_space, source_offset, source_width,
destination_space, destination_offset,
destination_width, length):
"""Moves a block of data asynchronously.
Corresponds to viMoveAsync function of the VISA library.
:param l... | [
"def",
"move_asynchronously",
"(",
"library",
",",
"session",
",",
"source_space",
",",
"source_offset",
",",
"source_width",
",",
"destination_space",
",",
"destination_offset",
",",
"destination_width",
",",
"length",
")",
":",
"job_id",
"=",
"ViJobId",
"(",
")"... | Moves a block of data asynchronously.
Corresponds to viMoveAsync function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param source_space: Specifies the address space of the source.
:param source_offset: Offset of... | [
"Moves",
"a",
"block",
"of",
"data",
"asynchronously",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L916-L940 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | move_in_8 | def move_in_8(library, session, space, offset, length, extended=False):
"""Moves an 8-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn8* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logic... | python | def move_in_8(library, session, space, offset, length, extended=False):
"""Moves an 8-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn8* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logic... | [
"def",
"move_in_8",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"length",
",",
"extended",
"=",
"False",
")",
":",
"buffer_8",
"=",
"(",
"ViUInt8",
"*",
"length",
")",
"(",
")",
"if",
"extended",
":",
"ret",
"=",
"library",
".",... | Moves an 8-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn8* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (Con... | [
"Moves",
"an",
"8",
"-",
"bit",
"block",
"of",
"data",
"from",
"the",
"specified",
"address",
"space",
"and",
"offset",
"to",
"local",
"memory",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L971-L991 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | move_in_16 | def move_in_16(library, session, space, offset, length, extended=False):
"""Moves an 16-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn16* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique lo... | python | def move_in_16(library, session, space, offset, length, extended=False):
"""Moves an 16-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn16* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique lo... | [
"def",
"move_in_16",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"length",
",",
"extended",
"=",
"False",
")",
":",
"buffer_16",
"=",
"(",
"ViUInt16",
"*",
"length",
")",
"(",
")",
"if",
"extended",
":",
"ret",
"=",
"library",
"... | Moves an 16-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn16* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (C... | [
"Moves",
"an",
"16",
"-",
"bit",
"block",
"of",
"data",
"from",
"the",
"specified",
"address",
"space",
"and",
"offset",
"to",
"local",
"memory",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L994-L1015 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | move_in_32 | def move_in_32(library, session, space, offset, length, extended=False):
"""Moves an 32-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn32* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique lo... | python | def move_in_32(library, session, space, offset, length, extended=False):
"""Moves an 32-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn32* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique lo... | [
"def",
"move_in_32",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"length",
",",
"extended",
"=",
"False",
")",
":",
"buffer_32",
"=",
"(",
"ViUInt32",
"*",
"length",
")",
"(",
")",
"if",
"extended",
":",
"ret",
"=",
"library",
"... | Moves an 32-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn32* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (C... | [
"Moves",
"an",
"32",
"-",
"bit",
"block",
"of",
"data",
"from",
"the",
"specified",
"address",
"space",
"and",
"offset",
"to",
"local",
"memory",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1018-L1039 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | move_in_64 | def move_in_64(library, session, space, offset, length, extended=False):
"""Moves an 64-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn64* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique lo... | python | def move_in_64(library, session, space, offset, length, extended=False):
"""Moves an 64-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn64* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique lo... | [
"def",
"move_in_64",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"length",
",",
"extended",
"=",
"False",
")",
":",
"buffer_64",
"=",
"(",
"ViUInt64",
"*",
"length",
")",
"(",
")",
"if",
"extended",
":",
"ret",
"=",
"library",
"... | Moves an 64-bit block of data from the specified address space and offset to local memory.
Corresponds to viMoveIn64* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (C... | [
"Moves",
"an",
"64",
"-",
"bit",
"block",
"of",
"data",
"from",
"the",
"specified",
"address",
"space",
"and",
"offset",
"to",
"local",
"memory",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1042-L1063 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | move_out_16 | def move_out_16(library, session, space, offset, length, data, extended=False):
"""Moves an 16-bit block of data from local memory to the specified address space and offset.
Corresponds to viMoveOut16* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: U... | python | def move_out_16(library, session, space, offset, length, data, extended=False):
"""Moves an 16-bit block of data from local memory to the specified address space and offset.
Corresponds to viMoveOut16* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: U... | [
"def",
"move_out_16",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"length",
",",
"data",
",",
"extended",
"=",
"False",
")",
":",
"converted_buffer",
"=",
"(",
"ViUInt16",
"*",
"length",
")",
"(",
"*",
"tuple",
"(",
"data",
")",
... | Moves an 16-bit block of data from local memory to the specified address space and offset.
Corresponds to viMoveOut16* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (... | [
"Moves",
"an",
"16",
"-",
"bit",
"block",
"of",
"data",
"from",
"local",
"memory",
"to",
"the",
"specified",
"address",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1120-L1140 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | move_out_32 | def move_out_32(library, session, space, offset, length, data, extended=False):
"""Moves an 32-bit block of data from local memory to the specified address space and offset.
Corresponds to viMoveOut32* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: U... | python | def move_out_32(library, session, space, offset, length, data, extended=False):
"""Moves an 32-bit block of data from local memory to the specified address space and offset.
Corresponds to viMoveOut32* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: U... | [
"def",
"move_out_32",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"length",
",",
"data",
",",
"extended",
"=",
"False",
")",
":",
"converted_buffer",
"=",
"(",
"ViUInt32",
"*",
"length",
")",
"(",
"*",
"tuple",
"(",
"data",
")",
... | Moves an 32-bit block of data from local memory to the specified address space and offset.
Corresponds to viMoveOut32* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (... | [
"Moves",
"an",
"32",
"-",
"bit",
"block",
"of",
"data",
"from",
"local",
"memory",
"to",
"the",
"specified",
"address",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1143-L1163 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | move_out_64 | def move_out_64(library, session, space, offset, length, data, extended=False):
"""Moves an 64-bit block of data from local memory to the specified address space and offset.
Corresponds to viMoveOut64* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: U... | python | def move_out_64(library, session, space, offset, length, data, extended=False):
"""Moves an 64-bit block of data from local memory to the specified address space and offset.
Corresponds to viMoveOut64* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: U... | [
"def",
"move_out_64",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"length",
",",
"data",
",",
"extended",
"=",
"False",
")",
":",
"converted_buffer",
"=",
"(",
"ViUInt64",
"*",
"length",
")",
"(",
"*",
"tuple",
"(",
"data",
")",
... | Moves an 64-bit block of data from local memory to the specified address space and offset.
Corresponds to viMoveOut64* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (... | [
"Moves",
"an",
"64",
"-",
"bit",
"block",
"of",
"data",
"from",
"local",
"memory",
"to",
"the",
"specified",
"address",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1166-L1186 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | open_default_resource_manager | def open_default_resource_manager(library):
"""This function returns a session to the Default Resource Manager resource.
Corresponds to viOpenDefaultRM function of the VISA library.
:param library: the visa library wrapped by ctypes.
:return: Unique logical identifier to a Default Resource Manager ses... | python | def open_default_resource_manager(library):
"""This function returns a session to the Default Resource Manager resource.
Corresponds to viOpenDefaultRM function of the VISA library.
:param library: the visa library wrapped by ctypes.
:return: Unique logical identifier to a Default Resource Manager ses... | [
"def",
"open_default_resource_manager",
"(",
"library",
")",
":",
"session",
"=",
"ViSession",
"(",
")",
"ret",
"=",
"library",
".",
"viOpenDefaultRM",
"(",
"byref",
"(",
"session",
")",
")",
"return",
"session",
".",
"value",
",",
"ret"
] | This function returns a session to the Default Resource Manager resource.
Corresponds to viOpenDefaultRM function of the VISA library.
:param library: the visa library wrapped by ctypes.
:return: Unique logical identifier to a Default Resource Manager session, return value of the library call.
:rtype:... | [
"This",
"function",
"returns",
"a",
"session",
"to",
"the",
"Default",
"Resource",
"Manager",
"resource",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1217-L1228 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | out_8 | def out_8(library, session, space, offset, data, extended=False):
"""Write in an 8-bit value from the specified memory space and offset.
Corresponds to viOut8* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
... | python | def out_8(library, session, space, offset, data, extended=False):
"""Write in an 8-bit value from the specified memory space and offset.
Corresponds to viOut8* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
... | [
"def",
"out_8",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"data",
",",
"extended",
"=",
"False",
")",
":",
"if",
"extended",
":",
"return",
"library",
".",
"viOut8Ex",
"(",
"session",
",",
"space",
",",
"offset",
",",
"data",
... | Write in an 8-bit value from the specified memory space and offset.
Corresponds to viOut8* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (Constants.*SPACE*)
:para... | [
"Write",
"in",
"an",
"8",
"-",
"bit",
"value",
"from",
"the",
"specified",
"memory",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1256-L1273 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | out_16 | def out_16(library, session, space, offset, data, extended=False):
"""Write in an 16-bit value from the specified memory space and offset.
Corresponds to viOut16* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
... | python | def out_16(library, session, space, offset, data, extended=False):
"""Write in an 16-bit value from the specified memory space and offset.
Corresponds to viOut16* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
... | [
"def",
"out_16",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"data",
",",
"extended",
"=",
"False",
")",
":",
"if",
"extended",
":",
"return",
"library",
".",
"viOut16Ex",
"(",
"session",
",",
"space",
",",
"offset",
",",
"data",
... | Write in an 16-bit value from the specified memory space and offset.
Corresponds to viOut16* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (Constants.*SPACE*)
:pa... | [
"Write",
"in",
"an",
"16",
"-",
"bit",
"value",
"from",
"the",
"specified",
"memory",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1276-L1293 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | out_32 | def out_32(library, session, space, offset, data, extended=False):
"""Write in an 32-bit value from the specified memory space and offset.
Corresponds to viOut32* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
... | python | def out_32(library, session, space, offset, data, extended=False):
"""Write in an 32-bit value from the specified memory space and offset.
Corresponds to viOut32* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
... | [
"def",
"out_32",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"data",
",",
"extended",
"=",
"False",
")",
":",
"if",
"extended",
":",
"return",
"library",
".",
"viOut32Ex",
"(",
"session",
",",
"space",
",",
"offset",
",",
"data",
... | Write in an 32-bit value from the specified memory space and offset.
Corresponds to viOut32* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (Constants.*SPACE*)
:pa... | [
"Write",
"in",
"an",
"32",
"-",
"bit",
"value",
"from",
"the",
"specified",
"memory",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1296-L1313 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | out_64 | def out_64(library, session, space, offset, data, extended=False):
"""Write in an 64-bit value from the specified memory space and offset.
Corresponds to viOut64* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
... | python | def out_64(library, session, space, offset, data, extended=False):
"""Write in an 64-bit value from the specified memory space and offset.
Corresponds to viOut64* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
... | [
"def",
"out_64",
"(",
"library",
",",
"session",
",",
"space",
",",
"offset",
",",
"data",
",",
"extended",
"=",
"False",
")",
":",
"if",
"extended",
":",
"return",
"library",
".",
"viOut64Ex",
"(",
"session",
",",
"space",
",",
"offset",
",",
"data",
... | Write in an 64-bit value from the specified memory space and offset.
Corresponds to viOut64* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param space: Specifies the address space. (Constants.*SPACE*)
:pa... | [
"Write",
"in",
"an",
"64",
"-",
"bit",
"value",
"from",
"the",
"specified",
"memory",
"space",
"and",
"offset",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1316-L1333 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | parse_resource | def parse_resource(library, session, resource_name):
"""Parse a resource string to get the interface information.
Corresponds to viParseRsrc function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Resource Manager session (should always be the Default Resource... | python | def parse_resource(library, session, resource_name):
"""Parse a resource string to get the interface information.
Corresponds to viParseRsrc function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Resource Manager session (should always be the Default Resource... | [
"def",
"parse_resource",
"(",
"library",
",",
"session",
",",
"resource_name",
")",
":",
"interface_type",
"=",
"ViUInt16",
"(",
")",
"interface_board_number",
"=",
"ViUInt16",
"(",
")",
"ret",
"=",
"library",
".",
"viParseRsrc",
"(",
"session",
",",
"resource... | Parse a resource string to get the interface information.
Corresponds to viParseRsrc function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Resource Manager session (should always be the Default Resource Manager for VISA
returned from open_def... | [
"Parse",
"a",
"resource",
"string",
"to",
"get",
"the",
"interface",
"information",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1336-L1357 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | peek | def peek(library, session, address, width):
"""Read an 8, 16 or 32-bit value from the specified address.
Corresponds to viPeek* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address ... | python | def peek(library, session, address, width):
"""Read an 8, 16 or 32-bit value from the specified address.
Corresponds to viPeek* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address ... | [
"def",
"peek",
"(",
"library",
",",
"session",
",",
"address",
",",
"width",
")",
":",
"if",
"width",
"==",
"8",
":",
"return",
"peek_8",
"(",
"library",
",",
"session",
",",
"address",
")",
"elif",
"width",
"==",
"16",
":",
"return",
"peek_16",
"(",... | Read an 8, 16 or 32-bit value from the specified address.
Corresponds to viPeek* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:param width: Number of bits... | [
"Read",
"an",
"8",
"16",
"or",
"32",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1397-L1419 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | peek_8 | def peek_8(library, session, address):
"""Read an 8-bit value from the specified address.
Corresponds to viPeek8 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the valu... | python | def peek_8(library, session, address):
"""Read an 8-bit value from the specified address.
Corresponds to viPeek8 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the valu... | [
"def",
"peek_8",
"(",
"library",
",",
"session",
",",
"address",
")",
":",
"value_8",
"=",
"ViUInt8",
"(",
")",
"ret",
"=",
"library",
".",
"viPeek8",
"(",
"session",
",",
"address",
",",
"byref",
"(",
"value_8",
")",
")",
"return",
"value_8",
".",
"... | Read an 8-bit value from the specified address.
Corresponds to viPeek8 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:return: Data read from bus, return val... | [
"Read",
"an",
"8",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1422-L1435 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | peek_16 | def peek_16(library, session, address):
"""Read an 16-bit value from the specified address.
Corresponds to viPeek16 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the v... | python | def peek_16(library, session, address):
"""Read an 16-bit value from the specified address.
Corresponds to viPeek16 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the v... | [
"def",
"peek_16",
"(",
"library",
",",
"session",
",",
"address",
")",
":",
"value_16",
"=",
"ViUInt16",
"(",
")",
"ret",
"=",
"library",
".",
"viPeek16",
"(",
"session",
",",
"address",
",",
"byref",
"(",
"value_16",
")",
")",
"return",
"value_16",
".... | Read an 16-bit value from the specified address.
Corresponds to viPeek16 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:return: Data read from bus, return v... | [
"Read",
"an",
"16",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1438-L1451 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | peek_32 | def peek_32(library, session, address):
"""Read an 32-bit value from the specified address.
Corresponds to viPeek32 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the v... | python | def peek_32(library, session, address):
"""Read an 32-bit value from the specified address.
Corresponds to viPeek32 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the v... | [
"def",
"peek_32",
"(",
"library",
",",
"session",
",",
"address",
")",
":",
"value_32",
"=",
"ViUInt32",
"(",
")",
"ret",
"=",
"library",
".",
"viPeek32",
"(",
"session",
",",
"address",
",",
"byref",
"(",
"value_32",
")",
")",
"return",
"value_32",
".... | Read an 32-bit value from the specified address.
Corresponds to viPeek32 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:return: Data read from bus, return v... | [
"Read",
"an",
"32",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1454-L1467 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | peek_64 | def peek_64(library, session, address):
"""Read an 64-bit value from the specified address.
Corresponds to viPeek64 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the v... | python | def peek_64(library, session, address):
"""Read an 64-bit value from the specified address.
Corresponds to viPeek64 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the v... | [
"def",
"peek_64",
"(",
"library",
",",
"session",
",",
"address",
")",
":",
"value_64",
"=",
"ViUInt64",
"(",
")",
"ret",
"=",
"library",
".",
"viPeek64",
"(",
"session",
",",
"address",
",",
"byref",
"(",
"value_64",
")",
")",
"return",
"value_64",
".... | Read an 64-bit value from the specified address.
Corresponds to viPeek64 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:return: Data read from bus, return v... | [
"Read",
"an",
"64",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1470-L1483 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | poke | def poke(library, session, address, width, data):
"""Writes an 8, 16 or 32-bit value from the specified address.
Corresponds to viPoke* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source ... | python | def poke(library, session, address, width, data):
"""Writes an 8, 16 or 32-bit value from the specified address.
Corresponds to viPoke* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source ... | [
"def",
"poke",
"(",
"library",
",",
"session",
",",
"address",
",",
"width",
",",
"data",
")",
":",
"if",
"width",
"==",
"8",
":",
"return",
"poke_8",
"(",
"library",
",",
"session",
",",
"address",
",",
"data",
")",
"elif",
"width",
"==",
"16",
":... | Writes an 8, 16 or 32-bit value from the specified address.
Corresponds to viPoke* functions of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:param width: Number of bi... | [
"Writes",
"an",
"8",
"16",
"or",
"32",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1486-L1507 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | poke_8 | def poke_8(library, session, address, data):
"""Write an 8-bit value from the specified address.
Corresponds to viPoke8 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read t... | python | def poke_8(library, session, address, data):
"""Write an 8-bit value from the specified address.
Corresponds to viPoke8 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read t... | [
"def",
"poke_8",
"(",
"library",
",",
"session",
",",
"address",
",",
"data",
")",
":",
"return",
"library",
".",
"viPoke8",
"(",
"session",
",",
"address",
",",
"data",
")"
] | Write an 8-bit value from the specified address.
Corresponds to viPoke8 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:param data: value to be written to th... | [
"Write",
"an",
"8",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1510-L1523 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | poke_16 | def poke_16(library, session, address, data):
"""Write an 16-bit value from the specified address.
Corresponds to viPoke16 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to rea... | python | def poke_16(library, session, address, data):
"""Write an 16-bit value from the specified address.
Corresponds to viPoke16 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to rea... | [
"def",
"poke_16",
"(",
"library",
",",
"session",
",",
"address",
",",
"data",
")",
":",
"return",
"library",
".",
"viPoke16",
"(",
"session",
",",
"address",
",",
"data",
")"
] | Write an 16-bit value from the specified address.
Corresponds to viPoke16 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:param data: value to be written to ... | [
"Write",
"an",
"16",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1526-L1538 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | poke_32 | def poke_32(library, session, address, data):
"""Write an 32-bit value from the specified address.
Corresponds to viPoke32 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to rea... | python | def poke_32(library, session, address, data):
"""Write an 32-bit value from the specified address.
Corresponds to viPoke32 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to rea... | [
"def",
"poke_32",
"(",
"library",
",",
"session",
",",
"address",
",",
"data",
")",
":",
"return",
"library",
".",
"viPoke32",
"(",
"session",
",",
"address",
",",
"data",
")"
] | Write an 32-bit value from the specified address.
Corresponds to viPoke32 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:param data: value to be written to ... | [
"Write",
"an",
"32",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1541-L1553 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | poke_64 | def poke_64(library, session, address, data):
"""Write an 64-bit value from the specified address.
Corresponds to viPoke64 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to rea... | python | def poke_64(library, session, address, data):
"""Write an 64-bit value from the specified address.
Corresponds to viPoke64 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to rea... | [
"def",
"poke_64",
"(",
"library",
",",
"session",
",",
"address",
",",
"data",
")",
":",
"return",
"library",
".",
"viPoke64",
"(",
"session",
",",
"address",
",",
"data",
")"
] | Write an 64-bit value from the specified address.
Corresponds to viPoke64 function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param address: Source address to read the value.
:param data: value to be written to ... | [
"Write",
"an",
"64",
"-",
"bit",
"value",
"from",
"the",
"specified",
"address",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1556-L1568 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | read_asynchronously | def read_asynchronously(library, session, count):
"""Reads data from device or interface asynchronously.
Corresponds to viReadAsync function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param count: Number of byte... | python | def read_asynchronously(library, session, count):
"""Reads data from device or interface asynchronously.
Corresponds to viReadAsync function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param count: Number of byte... | [
"def",
"read_asynchronously",
"(",
"library",
",",
"session",
",",
"count",
")",
":",
"buffer",
"=",
"create_string_buffer",
"(",
"count",
")",
"job_id",
"=",
"ViJobId",
"(",
")",
"ret",
"=",
"library",
".",
"viReadAsync",
"(",
"session",
",",
"buffer",
",... | Reads data from device or interface asynchronously.
Corresponds to viReadAsync function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param count: Number of bytes to be read.
:return: result, jobid, return value of... | [
"Reads",
"data",
"from",
"device",
"or",
"interface",
"asynchronously",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1588-L1602 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | read_stb | def read_stb(library, session):
"""Reads a status byte of the service request.
Corresponds to viReadSTB function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:return: Service request status byte, return value of th... | python | def read_stb(library, session):
"""Reads a status byte of the service request.
Corresponds to viReadSTB function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:return: Service request status byte, return value of th... | [
"def",
"read_stb",
"(",
"library",
",",
"session",
")",
":",
"status",
"=",
"ViUInt16",
"(",
")",
"ret",
"=",
"library",
".",
"viReadSTB",
"(",
"session",
",",
"byref",
"(",
"status",
")",
")",
"return",
"status",
".",
"value",
",",
"ret"
] | Reads a status byte of the service request.
Corresponds to viReadSTB function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:return: Service request status byte, return value of the library call.
:rtype: int, :class... | [
"Reads",
"a",
"status",
"byte",
"of",
"the",
"service",
"request",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1605-L1617 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | read_to_file | def read_to_file(library, session, filename, count):
"""Read data synchronously, and store the transferred data in a file.
Corresponds to viReadToFile function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param fi... | python | def read_to_file(library, session, filename, count):
"""Read data synchronously, and store the transferred data in a file.
Corresponds to viReadToFile function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param fi... | [
"def",
"read_to_file",
"(",
"library",
",",
"session",
",",
"filename",
",",
"count",
")",
":",
"return_count",
"=",
"ViUInt32",
"(",
")",
"ret",
"=",
"library",
".",
"viReadToFile",
"(",
"session",
",",
"filename",
",",
"count",
",",
"return_count",
")",
... | Read data synchronously, and store the transferred data in a file.
Corresponds to viReadToFile function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param filename: Name of file to which data will be written.
:par... | [
"Read",
"data",
"synchronously",
"and",
"store",
"the",
"transferred",
"data",
"in",
"a",
"file",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1620-L1634 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | status_description | def status_description(library, session, status):
"""Returns a user-readable description of the status code passed to the operation.
Corresponds to viStatusDesc function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
... | python | def status_description(library, session, status):
"""Returns a user-readable description of the status code passed to the operation.
Corresponds to viStatusDesc function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
... | [
"def",
"status_description",
"(",
"library",
",",
"session",
",",
"status",
")",
":",
"description",
"=",
"create_string_buffer",
"(",
"256",
")",
"ret",
"=",
"library",
".",
"viStatusDesc",
"(",
"session",
",",
"status",
",",
"description",
")",
"return",
"... | Returns a user-readable description of the status code passed to the operation.
Corresponds to viStatusDesc function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param status: Status code to interpret.
:return: - ... | [
"Returns",
"a",
"user",
"-",
"readable",
"description",
"of",
"the",
"status",
"code",
"passed",
"to",
"the",
"operation",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1667-L1682 | train |
pyvisa/pyvisa | pyvisa/ctwrapper/functions.py | terminate | def terminate(library, session, degree, job_id):
"""Requests a VISA session to terminate normal execution of an operation.
Corresponds to viTerminate function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param deg... | python | def terminate(library, session, degree, job_id):
"""Requests a VISA session to terminate normal execution of an operation.
Corresponds to viTerminate function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param deg... | [
"def",
"terminate",
"(",
"library",
",",
"session",
",",
"degree",
",",
"job_id",
")",
":",
"return",
"library",
".",
"viTerminate",
"(",
"session",
",",
"degree",
",",
"job_id",
")"
] | Requests a VISA session to terminate normal execution of an operation.
Corresponds to viTerminate function of the VISA library.
:param library: the visa library wrapped by ctypes.
:param session: Unique logical identifier to a session.
:param degree: Constants.NULL
:param job_id: Specifies an oper... | [
"Requests",
"a",
"VISA",
"session",
"to",
"terminate",
"normal",
"execution",
"of",
"an",
"operation",
"."
] | b8b2d4371e1f00782856aa9176ff1ced6bcb3798 | https://github.com/pyvisa/pyvisa/blob/b8b2d4371e1f00782856aa9176ff1ced6bcb3798/pyvisa/ctwrapper/functions.py#L1685-L1697 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.