Search is not available for this dataset
text stringlengths 75 104k |
|---|
def get_storage(self, script_hash, key, **kwargs):
""" Returns the value stored in the storage of a contract script hash for a given key.
:param script_hash: contract script hash
:param key: key to look up in the storage
:type script_hash: str
:type key: str
:return: val... |
def get_tx_out(self, tx_hash, index, **kwargs):
""" Returns the transaction output information corresponding to a hash and index.
:param tx_hash: transaction hash
:param index:
index of the transaction output to be obtained in the transaction (starts from 0)
:type tx_hash: s... |
def invoke(self, script_hash, params, **kwargs):
""" Invokes a contract with given parameters and returns the result.
It should be noted that the name of the function invoked in the contract should be part of
paramaters.
:param script_hash: contract script hash
:param params: l... |
def invoke_function(self, script_hash, operation, params, **kwargs):
""" Invokes a contract's function with given parameters and returns the result.
:param script_hash: contract script hash
:param operation: name of the operation to invoke
:param params: list of paramaters to be passed ... |
def invoke_script(self, script, **kwargs):
""" Invokes a script on the VM and returns the result.
:param script: script runnable by the VM
:type script: str
:return: result of the invocation
:rtype: dictionary
"""
raw_result = self._call(JSONRPCMethods.INVOKE_SC... |
def send_raw_transaction(self, hextx, **kwargs):
""" Broadcasts a transaction over the NEO network and returns the result.
:param hextx: hexadecimal string that has been serialized
:type hextx: str
:return: result of the transaction
:rtype: bool
"""
return self.... |
def validate_address(self, addr, **kwargs):
""" Validates if the considered string is a valid NEO address.
:param hex: string containing a potential NEO address
:type hex: str
:return: dictionary containing the result of the verification
:rtype: dictionary
"""
r... |
def _call(self, method, params=None, request_id=None):
""" Calls the JSON-RPC endpoint. """
params = params or []
# Determines which 'id' value to use and increment the counter associated with the current
# client instance if applicable.
rid = request_id or self._id_counter
... |
def is_hash256(s):
""" Returns True if the considered string is a valid SHA256 hash. """
if not s or not isinstance(s, str):
return False
return re.match('^[0-9A-F]{64}$', s.strip(), re.IGNORECASE) |
def is_hash160(s):
""" Returns True if the considered string is a valid RIPEMD160 hash. """
if not s or not isinstance(s, str):
return False
if not len(s) == 40:
return False
for c in s:
if (c < '0' or c > '9') and (c < 'A' or c > 'F') and (c < 'a' or c > 'f'):
return... |
def encode_invocation_params(params):
""" Returns a list of paramaters meant to be passed to JSON-RPC endpoints. """
final_params = []
for p in params:
if isinstance(p, bool):
final_params.append({'type': ContractParameterTypes.BOOLEAN.value, 'value': p})
elif isinstance(p, int):... |
def decode_invocation_result(result):
""" Tries to decode the values embedded in an invocation result dictionary. """
if 'stack' not in result:
return result
result = copy.deepcopy(result)
result['stack'] = _decode_invocation_result_stack(result['stack'])
return result |
def first_kwonly_arg(name):
""" Emulates keyword-only arguments under python2. Works with both python2 and python3.
With this decorator you can convert all or some of the default arguments of your function
into kwonly arguments. Use ``KWONLY_REQUIRED`` as the default value of required kwonly args.
:par... |
def devpiserver_on_upload(stage, project, version, link):
""" called when a file is uploaded to a private stage for
a projectname/version. link.entry.file_exists() may be false because
a more recent revision deleted the file (and files are not revisioned).
NOTE that this hook is currently NOT called fo... |
def snap(dttm, instruction):
"""
Args:
instruction (string): a string that encodes 0 to n transformations of a time, i.e. "-1h@h", "@mon+2d+4h", ...
dttm (datetime):
Returns:
datetime: The datetime resulting from applying all transformations to the input datetime.
Example:
... |
def snap_tz(dttm, instruction, timezone):
"""This function handles timezone aware datetimes.
Sometimes it is necessary to keep daylight saving time switches in mind.
Args:
instruction (string): a string that encodes 0 to n transformations of a time, i.e. "-1h@h", "@mon+2d+4h", ...
dttm (dat... |
def apply_to_with_tz(self, dttm, timezone):
"""We make sure that after truncating we use the correct timezone,
even if we 'jump' over a daylight saving time switch.
I.e. if we apply "@d" to `Sun Oct 30 04:30:00 CET 2016` (1477798200)
we want to have `Sun Oct 30 00:00:00 CEST 2016` (1477... |
def save(self, filename, options=None):
"""Renders the barcode and saves it in `filename`.
:parameters:
filename : String
Filename to save the barcode in (without filename
extension).
options : Dict
The same as in `self.render`.
... |
def render(self, writer_options=None):
"""Renders the barcode using `self.writer`.
:parameters:
writer_options : Dict
Options for `self.writer`, see writer docs for details.
:returns: Output of the writers render method.
"""
options = Barcode.default... |
def calculate_checksum(self):
"""Calculates the checksum for EAN13-Code.
:returns: The checksum for `self.ean`.
:rtype: Integer
"""
def sum_(x, y):
return int(x) + int(y)
evensum = reduce(sum_, self.ean[::2])
oddsum = reduce(sum_, self.ean[1::2])
... |
def render(self, code):
"""Renders the barcode to whatever the inheriting writer provides,
using the registered callbacks.
:parameters:
code : List
List of strings matching the writer spec
(only contain 0 or 1).
"""
if self._callbacks[... |
def to_df(self, **kwargs):
"""[pandas.read_sql]
Arguments:
Query {[type]} -- [description]
Returns:
[pd.DataFrame or generate] -- [description]
"""
return pd.read_sql(sql=self.statement, con=self.session.bind, **kwargs) |
def connect(cls, settings):
""" Call that method in the pyramid configuration phase.
"""
server = serializer('json').loads(settings['kvs.perlsess'])
server.setdefault('key_prefix', 'perlsess::')
server.setdefault('codec', 'storable')
cls.cookie_name = server.pop('cookie_n... |
def main(ctx, edit, create):
"""
Simple command line tool to help manage environment variables stored in a S3-like system. Facilitates editing text
files remotely stored, as well as downloading and uploading files.
"""
# configs this module logger to behave properly
# logger messages will go to ... |
def env(section, map_files, phusion, phusion_path, quiet, edit, create):
"""
Reads the file defined by the S3CONF variable and output its contents to stdout. Logs are printed to stderr.
See options for added functionality: editing file, mapping files, dumping in the phusion-baseimage format, etc.
"""
... |
def exec_command(ctx, section, command, map_files):
"""
Sets the process environemnt and executes the [COMMAND] in the same context. Does not modify the current shell
environment.
If the [COMMAND] has option-like arguments, use the standard POSIX pattern "--" to separate options
from arguments. Con... |
def download(remote_path, local_path):
"""
Download a file or folder from the S3-like service.
If REMOTE_PATH has a trailing slash it is considered to be a folder, e.g.: "s3://my-bucket/my-folder/". In this
case, LOCAL_PATH must be a folder as well. The files and subfolder structure in REMOTE_PATH are ... |
def upload(remote_path, local_path):
"""
Upload a file or folder to the S3-like service.
If LOCAL_PATH is a folder, the files and subfolder structure in LOCAL_PATH are copied to REMOTE_PATH.
If LOCAL_PATH is a file, the REMOTE_PATH file is created with the same contents.
"""
storage = STORAGES... |
def downsync(section, map_files):
"""
For each section defined in the local config file, creates a folder inside the local config folder
named after the section. Downloads the environemnt file defined by the S3CONF variable for this section
to this folder.
"""
try:
settings = config.Sett... |
def diff(section):
"""
For each section defined in the local config file, look up for a folder inside the local config folder
named after the section. Uploads the environemnt file named as in the S3CONF variable for this section
to the remote S3CONF path.
"""
try:
settings = config.Setti... |
def set_variable(section, value, create):
"""
Set value of a variable in an environment file for the given section.
If the variable is already defined, its value is replaced, otherwise, it is added to the end of the file.
The value is given as "ENV_VAR_NAME=env_var_value", e.g.:
s3conf set test ENV... |
def unset_variable(section, value):
"""
Unset a variable in an environment file for the given section.
The value is given is the variable name, e.g.:
s3conf unset test ENV_VAR_NAME
"""
if not value:
value = section
section = None
try:
logger.debug('Running env comman... |
def init(section, remote_file):
"""
Creates the .s3conf config folder and .s3conf/config config file
with the provided section name and configuration file. It is a very
basic config file. Manually edit it in order to add credentials. E.g.:
s3conf init development s3://my-project/development.env
... |
def update(self, t_obj):
"""[update table]
Arguments:
t_obj {[objs of DeclarativeMeta]} -- [update the table]
"""
if isinstance(t_obj, Iterable):
self._session.add_all(t_obj)
else:
self._session.add(t_obj) |
def insert(self, table, insert_obj, ignore=True):
"""[insert bulk data]
Arguments:
table {[DeclarativeMeta cls]} -- [reflection of table]
insert_obj {[pd.DataFrame or list of dicts]} -- [insert_obj]
Keyword Arguments:
ignore {bool} -- [wether ignore exceptio... |
def parse_env_var(value):
"""
Split a env var text like
ENV_VAR_NAME=env_var_value
into a tuple ('ENV_VAR_NAME', 'env_var_value')
"""
k, _, v = value.partition('=')
# Remove any leading and trailing spaces in key, value
k, v = k.strip(), v.strip().encode('unicode-escape').decode('asci... |
def basic(username, password):
"""Add basic authentication to the requests of the clients."""
none()
_config.username = username
_config.password = password |
def api_key(api_key):
"""Authenticate via an api key."""
none()
_config.api_key_prefix["Authorization"] = "api-key"
_config.api_key["Authorization"] = "key=" + b64encode(api_key.encode()).decode() |
def _get_json_content_from_folder(folder):
"""yield objects from json files in the folder and subfolders."""
for dirpath, dirnames, filenames in os.walk(folder):
for filename in filenames:
if filename.lower().endswith(".json"):
filepath = os.path.join(dirpath, filename)
... |
def get_schemas():
"""Return a dict of schema names mapping to a Schema.
The schema is of type schul_cloud_resources_api_v1.schema.Schema
"""
schemas = {}
for name in os.listdir(JSON_PATH):
if name not in NO_SCHEMA:
schemas[name] = Schema(name)
return schemas |
def get_schema(self):
"""Return the schema."""
path = os.path.join(self._get_schema_folder(), self._name + ".json")
with open(path, "rb") as file:
schema = json.loads(file.read().decode("UTF-8"))
return schema |
def get_resolver(self):
"""Return a jsonschema.RefResolver for the schemas.
All schemas returned be get_schemas() are resolved locally.
"""
store = {}
for schema in get_schemas().values():
store[schema.get_uri()] = schema.get_schema()
schema = self.get_schema... |
def validate(self, object):
"""Validate an object against the schema.
This function just passes if the schema matches the object.
If the object does not match the schema, a ValidationException is raised.
This error allows debugging.
"""
resolver=self.get_resolver()
... |
def get_valid_examples(self):
"""Return a list of valid examples for the given schema."""
path = os.path.join(self._get_schema_folder(), "examples", "valid")
return list(_get_json_content_from_folder(path)) |
def get_invalid_examples(self):
"""Return a list of examples which violate the schema."""
path = os.path.join(self._get_schema_folder(), "examples", "invalid")
return list(_get_json_content_from_folder(path)) |
def request( self, url, method='get', data=None, files=None,
raw=False, raw_all=False, headers=dict(), raise_for=dict(), session=None ):
'''Make synchronous HTTP request.
Can be overidden to use different http module (e.g. urllib2, twisted, etc).'''
try: import requests # import here to avoid dependency on t... |
def auth_user_get_url(self, scope=None):
'Build authorization URL for User Agent.'
if not self.client_id: raise AuthMissingError('No client_id specified')
return '{}?{}'.format(self.auth_url_user, urllib.urlencode(dict(
client_id=self.client_id, scope=' '.join(scope or self.auth_scope),
response_type='code'... |
def auth_user_process_url(self, url):
'Process tokens and errors from redirect_uri.'
url = urlparse.urlparse(url)
url_qs = dict(it.chain.from_iterable(
urlparse.parse_qsl(v) for v in [url.query, url.fragment] ))
if url_qs.get('error'):
raise APIAuthError(
'{} :: {}'.format(url_qs['error'], url_qs.get(... |
def auth_get_token(self, check_scope=True):
'Refresh or acquire access_token.'
res = self.auth_access_data_raw = self._auth_token_request()
return self._auth_token_process(res, check_scope=check_scope) |
def get_user_id(self):
'Returns "id" of a OneDrive user.'
if self._user_id is None:
self._user_id = self.get_user_data()['id']
return self._user_id |
def listdir(self, folder_id='me/skydrive', limit=None, offset=None):
'Get OneDrive object representing list of objects in a folder.'
return self(self._api_url_join(folder_id, 'files'), dict(limit=limit, offset=offset)) |
def get(self, obj_id, byte_range=None):
'''Download and return a file object or a specified byte_range from it.
See HTTP Range header (rfc2616) for possible byte_range formats,
Examples: "0-499" - byte offsets 0-499 (inclusive), "-500" - final 500 bytes.'''
kwz = dict()
if byte_range: kwz['headers'] = dict(... |
def put( self, path_or_tuple, folder_id='me/skydrive',
overwrite=None, downsize=None, bits_api_fallback=True ):
'''Upload a file (object), possibly overwriting (default behavior)
a file with the same "name" attribute, if it exists.
First argument can be either path to a local file or tuple
of "(name, f... |
def put_bits( self, path_or_tuple,
folder_id=None, folder_path=None, frag_bytes=None,
raw_id=False, chunk_callback=None ):
'''Upload a file (object) using BITS API (via several http requests), possibly
overwriting (default behavior) a file with the same "name" attribute, if it exists.
Unlike "put" metho... |
def mkdir(self, name=None, folder_id='me/skydrive', metadata=dict()):
'''Create a folder with a specified "name" attribute.
folder_id allows to specify a parent folder.
metadata mapping may contain additional folder properties to pass to an API.'''
metadata = metadata.copy()
if name: metadata['name'] = na... |
def info_update(self, obj_id, data):
'''Update metadata with of a specified object.
See http://msdn.microsoft.com/en-us/library/live/hh243648.aspx
for the list of RW keys for each object type.'''
return self(obj_id, method='put', data=data, auth_header=True) |
def link(self, obj_id, link_type='shared_read_link'):
'''Return a preauthenticated (usable by anyone) link to a
specified object. Object will be considered "shared" by OneDrive,
even if link is never actually used.
link_type can be either "embed" (returns html), "shared_read_link" or "shared_edit_link".'''... |
def copy(self, obj_id, folder_id, move=False):
'''Copy specified file (object) to a folder with a given ID.
Well-known folder names (like "me/skydrive")
don't seem to work here.
Folders cannot be copied; this is an API limitation.'''
return self( obj_id,
method='copy' if not move else 'move',
data=... |
def move(self, obj_id, folder_id):
'''Move specified file (object) to a folder.
Note that folders cannot be moved, this is an API limitation.'''
return self.copy(obj_id, folder_id, move=True) |
def comment_add(self, obj_id, message):
'Add comment message to a specified object.'
return self( self._api_url_join(obj_id, 'comments'),
method='post', data=dict(message=message), auth_header=True ) |
def resolve_path(self, path, root_id='me/skydrive', objects=False, listdir_limit=500):
'''Return id (or metadata) of an object, specified by chain
(iterable or fs-style path string) of "name" attributes
of its ancestors, or raises DoesNotExists error.
Requires many calls to resolve each name in path, so u... |
def listdir(self, folder_id='me/skydrive', type_filter=None, limit=None, offset=None):
'''Return a list of objects in the specified folder_id.
limit is passed to the API, so might be used as optimization.
type_filter can be set to type (str) or sequence
of object types to return, post-api-call processing.''... |
def copy(self, obj_id, folder_id, move=False):
'''Copy specified file (object) to a folder.
Note that folders cannot be copied, this is an API limitation.'''
if folder_id.startswith('me/skydrive'):
log.info( 'Special folder names (like "me/skydrive") dont'
' seem to work with copy/move operations, resolvi... |
def from_conf(cls, path=None, **overrides):
'''Initialize instance from YAML configuration file,
writing updates (only to keys, specified by "conf_update_keys") back to it.'''
from onedrive import portalocker
import yaml
if path is None:
path = cls.conf_path_default
log.debug('Using default state-file... |
def decode_obj(obj, force=False):
'Convert or dump object to unicode.'
if isinstance(obj, unicode): return obj
elif isinstance(obj, bytes):
if force_encoding is not None: return obj.decode(force_encoding)
if chardet:
enc_guess = chardet.detect(obj)
if enc_guess['confidence'] > 0.7:
return obj.decode(en... |
def set_drop_target(obj, root, designer, inspector):
"Recursively create and set the drop target for obj and childs"
if obj._meta.container:
dt = ToolBoxDropTarget(obj, root, designer=designer,
inspector=inspector)
obj.drop_target = dt
for child in ... |
def tool_click(self, evt):
"Event handler tool selection (just add to default handler)"
# get the control
ctrl = self.menu_ctrl_map[evt.GetId()]
# create the control on the parent:
if self.inspector.selected_obj:
# find the first parent drop target
pa... |
def start_drag_opperation(self, evt):
"Event handler for drag&drop functionality"
# get the control
ctrl = self.menu_ctrl_map[evt.GetToolId()]
# create our own data format and use it in a custom data object
ldata = wx.CustomDataObject("gui")
ldata.SetData(ctrl._meta... |
def set_default_tlw(self, tlw, designer, inspector):
"track default top level window for toolbox menu default action"
self.designer = designer
self.inspector = inspector |
def copy(self):
"Return a copy of the drop target (to avoid wx problems on rebuild)"
return ToolBoxDropTarget(self.dv, self.root,
self.designer, self.inspector) |
def inspect(obj):
"Open the inspector windows for a given object"
from gui.tools.inspector import InspectorTool
inspector = InspectorTool()
inspector.show(obj)
return inspector |
def shell():
"Open a shell"
from gui.tools.debug import Shell
shell = Shell()
shell.show()
return shell |
def migrate_window(bg):
"Take a pythoncard background resource and convert to a gui2py window"
ret = {}
for k, v in bg.items():
if k == 'type':
v = WIN_MAP[v]._meta.name
elif k == 'menubar':
menus = v['menus']
v = [migrate_control(menu) for menu in menus]
... |
def migrate_control(comp):
"Take a pythoncard background resource and convert to a gui2py window"
ret = {}
for k, v in comp.items():
if k == 'type':
v = CTRL_MAP[v]._meta.name
elif k == 'menubar':
pass
elif k == 'components':
v = [migrate_control(c... |
def migrate_font(font):
"Convert PythonCard font description to gui2py style"
if 'faceName' in font:
font['face'] = font.pop('faceName')
if 'family' in font and font['family'] == 'sansSerif':
font['family'] = 'sans serif'
return font |
def load_page(self, location):
"Loads HTML page from location and then displays it"
if not location:
self.wx_obj.SetPage("")
else:
self.wx_obj.LoadPage(location) |
def edit(self, name=""):
"Programatically select a (default) property to start editing it"
# for more info see DoSelectAndEdit in propgrid.cpp
for name in (name, "label", "value", "text", "title", "filename",
"name"):
prop = self.pg.GetPropertyByName(name)... |
def select(self, name, flags=0):
"Select a property (and start the editor)"
# do not call this directly from another window, use edit() instead
# // wxPropertyGrid::DoSelectProperty flags (selFlags) -see propgrid.h-
wxPG_SEL_FOCUS=0x0001 # Focuses to created editor
wxPG_SEL_FORC... |
def GetParam(tag, param, default=__SENTINEL):
""" Convenience function for accessing tag parameters"""
if tag.HasParam(param):
return tag.GetParam(param)
else:
if default == __SENTINEL:
raise KeyError
else:
return default |
def send(evt):
"Process an outgoing communication"
# get the text written by the user (input textbox control)
msg = ctrl_input.value
# send the message (replace with socket/queue/etc.)
gui.alert(msg, "Message")
# record the message (update the UI)
log(msg)
ctrl_input.value = ""
ctrl_... |
def save(evt, designer):
"Basic save functionality: just replaces the gui code"
# ask the user if we should save the changes:
ok = gui.confirm("Save the changes?", "GUI2PY Designer",
cancel=True, default=True)
if ok:
wx_obj = evt.GetEventObject()
w = wx_obj.obj
... |
def wellcome_tip(wx_obj):
"Show a tip message"
msg = ("Close the main window to exit & save.\n"
"Drag & Drop / Click the controls from the ToolBox to create new ones.\n"
"Left click on the created controls to select them.\n"
"Double click to edit the default property.\n"
... |
def mouse_down(self, evt):
"Get the selected object and store start position"
if DEBUG: print "down!"
if (not evt.ControlDown() and not evt.ShiftDown()) or evt.AltDown():
for obj in self.selection:
# clear marker
if obj.sel_marker:
... |
def mouse_move(self, evt):
"Move the selected object"
if DEBUG: print "move!"
if self.current and not self.overlay:
wx_obj = self.current
sx, sy = self.start
x, y = wx.GetMousePosition()
# calculate the new position (this will overwrite relative di... |
def do_resize(self, evt, wx_obj, (n, w, s, e)):
"Called by SelectionTag"
# calculate the pos (minus the offset, not in a panel like rw!)
pos = wx_obj.ScreenToClient(wx.GetMousePosition())
x, y = pos
if evt.ShiftDown(): # snap to grid:
x = x / GRID_SIZE[0] * GRID_S... |
def mouse_up(self, evt, wx_obj=None):
"Release the selected object (pass a wx_obj if the event was captured)"
self.resizing = False
if self.current:
wx_obj = self.current
if self.parent.wx_obj.HasCapture():
self.parent.wx_obj.ReleaseMouse()
se... |
def key_press(self, event):
"support cursor keys to move components one pixel at a time"
key = event.GetKeyCode()
if key in (wx.WXK_LEFT, wx.WXK_UP, wx.WXK_RIGHT, wx.WXK_DOWN):
for obj in self.selection:
x, y = obj.pos
if event.ShiftDown(): # snap ... |
def delete(self, event):
"delete all of the selected objects"
# get the selected objects (if any)
for obj in self.selection:
if obj:
if DEBUG: print "deleting", obj.name
obj.destroy()
self.selection = [] # clean selectio... |
def duplicate(self, event):
"create a copy of each selected object"
# duplicate the selected objects (if any)
new_selection = []
for obj in self.selection:
if obj:
if DEBUG: print "duplicating", obj.name
obj.sel_marker.destroy()
... |
def update(self):
"Adjust facade with the dimensions of the original object (and repaint)"
x, y = self.obj.wx_obj.GetPosition()
w, h = self.obj.wx_obj.GetSize()
self.Hide()
self.Move((x, y))
self.SetSize((w, h))
# allow original control to repaint before taking th... |
def refresh(self):
"Capture the new control superficial image after an update"
self.bmp = self.obj.snapshot()
# change z-order to overlap controls (windows) and show the image:
self.Raise()
self.Show()
self.Refresh() |
def CalculateBestPosition(self,widget):
"When dealing with a Top-Level window position it absolute lower-right"
if isinstance(widget, wx.Frame):
screen = wx.ClientDisplayRect()[2:]
left,top = widget.ClientToScreenXY(0,0)
right,bottom = widget.ClientToScreenXY(*widget.... |
def GetPyData(self, item):
"Returns the pyth item data associated with the item"
wx_data = self.GetItemData(item)
py_data = self._py_data_map.get(wx_data)
return py_data |
def SetPyData(self, item, py_data):
"Set the python item data associated wit the wx item"
wx_data = wx.NewId() # create a suitable key
self.SetItemData(item, wx_data) # store it in wx
self._py_data_map[wx_data] = py_data # map it internally
... |
def FindPyData(self, start, py_data):
"Do a reverse look up for an item containing the requested data"
# first, look at our internal dict:
wx_data = self._wx_data_map[py_data]
# do the real search at the wx control:
if wx.VERSION < (3, 0, 0) or 'classic' in wx.version():
... |
def DeleteItem(self, item):
"Remove the item from the list and unset the related data"
wx_data = self.GetItemData(item)
py_data = self._py_data_map[wx_data]
del self._py_data_map[wx_data]
del self._wx_data_map[py_data]
wx.ListCtrl.DeleteItem(self, item) |
def DeleteAllItems(self):
"Remove all the item from the list and unset the related data"
self._py_data_map.clear()
self._wx_data_map.clear()
wx.ListCtrl.DeleteAllItems(self) |
def set_count(self, value):
"Set item (row) count -useful only in virtual mode-"
if self.view == "report" and self.virtual and value is not None:
self.wx_obj.SetItemCount(value) |
def delete(self, a_position):
"Deletes the item at the zero-based index 'n' from the control."
key = self.wx_obj.GetPyData(a_position)
del self._items[key] |
def clear_all(self):
"Remove all items and column headings"
self.clear()
for ch in reversed(self.columns):
del self[ch.name] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.