Extra utility functions for X-Midas.
Project description
xmextras
Extra helper functionality for X-Midas.
XMSessionContext
Wraps an XMSession in with a context manager to ensure it gets ended correctly when exiting.
import xmextras as xmx
with xmx.XMSessionContext() as session:
session.xm('res answer 42')
# or
from pymidas.xmidas import xm
xm.res('answer', 42)
answer = session.xmpy.res['answer']
info
Returns a dictionary of information about the X-Midas instance, which can be useful for tagging metrics and benchmarks for comparison.
import xmextras as xmx
with xmx.XMSessionContext() as session:
info = xmx.info(session) # also works with a normal XMSession instance
J1950
Conversion functions for dealing with J1950 times (seconds since January 1, 1950).
dt = j1950_to_datetime(2191001400.0)
j = datetime_to_j1950(dt)
e = j1950_to_epoch(2191001400.0)
j = epoch_to_to_j1950(1559849400.0)
power2
Calculates the next power of two greater than or equal to x.
power2(3) # returns 4
bluefile
xmextras locates the system installation of bluefile.py so it can be imported outside of an X-Midas environment.
from xmextras import bluefile
header = bluefile.readheader('some_bluefile.tmp')
mcrlint
The mcrlint command is also included as part of xmextras. It can be used for linting X-Midas macro code. Use mcrlint --help for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xmextras-2026.135.1294.tar.gz.
File metadata
- Download URL: xmextras-2026.135.1294.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b2951477d5618f7c592280ed8042158db5c51d77283989601a4707c98147e67
|
|
| MD5 |
8d5836bd8dce6ae9433f44abb4d8f94f
|
|
| BLAKE2b-256 |
2f0aa0e5d9b7d617acfc7ffe7a5063344460140ae82215f5150bf454423be74c
|
Provenance
The following attestation bundles were made for xmextras-2026.135.1294.tar.gz:
Publisher:
CI.yml on spectriclabs/xmextras
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xmextras-2026.135.1294.tar.gz -
Subject digest:
5b2951477d5618f7c592280ed8042158db5c51d77283989601a4707c98147e67 - Sigstore transparency entry: 1550760471
- Sigstore integration time:
-
Permalink:
spectriclabs/xmextras@51ef40198c3de18e003a835c7981511145a5929d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/spectriclabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@51ef40198c3de18e003a835c7981511145a5929d -
Trigger Event:
push
-
Statement type:
File details
Details for the file xmextras-2026.135.1294-py3-none-any.whl.
File metadata
- Download URL: xmextras-2026.135.1294-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cc7da60eecce588e5176a2a04f1b1d0116576d390f105c71de0b8a9780c5982
|
|
| MD5 |
a2e949c741972d9656b5c32f2350fdf2
|
|
| BLAKE2b-256 |
cf5164c05b84d7111053a6075905577c767c70bac8b0ecb5cdf821911c063a78
|
Provenance
The following attestation bundles were made for xmextras-2026.135.1294-py3-none-any.whl:
Publisher:
CI.yml on spectriclabs/xmextras
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xmextras-2026.135.1294-py3-none-any.whl -
Subject digest:
0cc7da60eecce588e5176a2a04f1b1d0116576d390f105c71de0b8a9780c5982 - Sigstore transparency entry: 1550760613
- Sigstore integration time:
-
Permalink:
spectriclabs/xmextras@51ef40198c3de18e003a835c7981511145a5929d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/spectriclabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@51ef40198c3de18e003a835c7981511145a5929d -
Trigger Event:
push
-
Statement type: