The tablex Command
The
tablex
command is used to manage table file format handler extensions. The command has the following subcommands:
tablex defined
tablex defined format
Tablex.Defined(format)
A boolean check whether a specific table file format is supported by an I/O handler. If the format is not yet known, an attempt is made to locate and auto-load the I/O module. For an equivalent command without auto-loading, see
tablex exists
.
tablex exists
tablex exists format
tx.exists()
Tablex.Exists(format)
A boolean check whether a specific table file format is supported by an I/O handler. No attempt is made to auto-load a handler module if it is not already in memory. The name can be the primary name of the table file format, or any recognized alias. For an equivalent command with auto-loading, see
tablex defined
.
tablex get
tablex get format attribute
Tablex.Get(format,attribute)
tx.get(attribute)
tx.attribute
tx[attribute]
Query the value of an attribute of the table file format handler. The list of supported attributes is described in the section on the
tablex set
command.
If the format is not yet known, an attempt is made to auto-load it.
tablex list
tablex list ?pattern?
Tablex.List(?pattern=?)
Return a list of all currently supported table formats, including those handled by built-in format handlers. If desired, the list can be filtered by a string pattern.
tablex load
tablex load format ?objectfile?
tablex load all
Tablex.Load(format,?objectfile?)
Tablex.Load(“all”)
Explicitly load a table file format handler module. If the module is already loaded, the current version is unloaded first. If no specific object file (a shared library on Unix/Linux, a DLL on Windows, a bundle file for MacOSX) is specified, the standard name of the module file is automatically generated from the data type name, and then the file searched in the directories in the data type handler module path. The module search path can be customized in the control variable
::cactvs(tablexpath)
.
For
Tcl
, the return value of the command is the slot in the table file format module table the module has been loaded into. This corresponds to the value of the
slot
attribute which can be queried via
tablex get
. For
Python
, the return value is a module reference.
The second form of the command scans the currently set table format extension search path and loads all accessible modules which are not yet in memory. Modules which are already active in the running application are not unloaded, and only a single instance of each I/O module, even if present under various alias names in the module directories, is loaded. This form of the command does not return a value.
tablex modules
tablex modules ?pattern?
Tilex.Modules(?pattern=?)
This is an alias for
tablex list
.
tablex ref
Tablex.Ref(format)
Python
-only method to get a reference of the module, which allows terser attribute retrieval commands and other operations.
tablex reload
tablex reload format ?objectfile?
Tablex.Reload(format,?objectfile?,...)
A variant of the
tablex load
command which fails if the I/O module was not previously loaded. There is no all variant of this command.
tablex subcommands
tablex subcommands
dir(Tablex)
Return a list of all supported subcommands of the
tablex
command in the current interpreter.
tablex set
tablex set format ?attribute value?...
tablex set format dict
Tablex.Set(format,?attribute,value?,...)
Tablex.Set(format,dict)
Tablex.Set(format,attribute=value,...)
tx.set(?attribute,value?,...)
tx.set(dict)
tx.set(attribute=value,...)
tx.attribute = value
tx[attribute] = value
Set one or more attributes of the table file format handler. Some attributes are read-only. They are still listed here because the tablex get command refers to this section. The following attributes are recognized:
-
address_city
The city part of the author contact address.
-
address_country
The country part of the author contact address, following the ISO3166 standard.
-
address_state
The state part of the author contact address. Empty if not applicable.
-
address_street
The street address part of the author contact address. Includes floor, house number, etc.
-
address_zip
The
ZIP
code or other applicable postal code of the author contact address.
-
affiliation
The institution the author of the table extension definition works for.
-
affiliationduns
The
DUNS
registration ID of the affiliated institution. This is primarily useful for US government projects.
-
affiliationurl
The
URL
of the affiliated institution.
-
aliases
A list of alternative names that are recognized as alternative names for the table file format.
-
author
The author of the module, as free-form text.
-
authorurl
A
URL
with information on the author, or an empty string if unset.
-
builtin
A boolean flag indicating whether the format handler is built-in. This is a read-only attribute.
-
category
A category string to be used if the table extension is stored in a repository.
-
charset
The character set the file format uses.
-
classuuid
The base class
UUID
of this module.
-
comment
A free-form comment.
-
date
The date of the last change of the module source code.
-
doi
A digital object identifier for the module, if defined.
-
email
An email contact address of the author.
-
features
A list of the types of functions the module provides in its function table. Function types include
check
(auto-identify file format),
read
(read that format) and
write
(write that format).
-
infourl
A URL with information on the module, or an empty string if unset.
-
keywords
A list of keywords associated with the module.
-
license
The license class associated with this module. Setting the license to a standard type updates the associated
URL
with a standard location.
-
licenseurl
A
URL
with details about the module license.
-
literature
This is a free-form string for a literature reference describing the meaning and/or algorithm behind the module.
-
mimetype
The
MIME
type of the table file format, for example
application/ms-excel.
-
name
The primary name of the table file format. Because the format may have been specified via an alias name, this may not be the same as he command parameter.
-
objectfile
The full path name of the object file (shared library, DLL or bundle file) of the module. For built-in modules, this is an empty string.
-
orcid
The
ORCID
code of the author of the module (see www.orcid.org).
-
parameters
A keyword/value dictionary of format-specific I/O attributes with their default values which are not represented as general table object attributes. Upon file output with a specific format, parameters from this dictionary which have not been explicitly configured in the parameters attribute of the table object to be written are added from the table I/O module instance to it. Dictionary keys already set as a custom table parameters entry are not overwritten.
-
path
The repository path for displaying hierarchical repository trees. This attribute is independent of any file system paths.
-
phone
A contact phone number of the author.
-
references
Cross references of the module. This is a nested list of class
UUID
s and reference type tags.
-
regid
For registered modules, the registration ID. Unregistered modules report zero.
-
slot
The table file format handler table slot the module is loaded into. This attribute is read-only.
-
sourcefile
The source file of the module, if available.
-
suffixes
A list of file name suffixes associated with this format. This is a read-only attribute.
-
version
A version string.. This is a string in a 1.2.3 (or shortened) style.
-
versionuuid
The version
UUID
associated with this module version.
tablex unload
tablex unload ?format?...
tx.unload()
Tablex.Unload(?txref/format?,...)
Unload one or more table file format handler modules. It is an error to specify the name of a module which is not loaded. Built-in modules cannot be unloaded.
The return value is the number of unloaded modules.