epics-base compliant macro tools.
What?
Do you want epics-base compliant macro expansion, with all of its idiosyncracies?
No? I didn’t think so. This is a really boring project and you probably don’t need it.
Then why?
This will be the future of the macro and IOC shell splitting tools in whatrecord, removing its reliance on Cython and epicscorelibs.
Examples
macros_from_string
from epicsmacrolib import macros_from_string
macros_from_string("A=5, B=$(A=3)")
# -> {'A': '5', 'B': '$(A=3)'}
MacroContext
from epicsmacrolib import MacroContext
ctx = MacroContext(use_environment=True)
ctx.define(TEST="A")
print(ctx.expand("TEST=$(TEST) SHELL=$(SHELL)"))
# TEST=A SHELL=/bin/bash
ctx = MacroContext(use_environment=False)
ctx.define_from_string("A=5,B=6")
ctx.define(C="7")
print(ctx.expand("$(A) $(B) ${C} ${D=5} ${E}"))
# -> 5 6 7 5 $(E)
ctx = MacroContext(use_environment=False, show_warnings=True)
ctx.define_from_string("A=5,B=6")
ctx.define(C="7")
print(ctx.expand("$(A) $(B) ${C} ${D=5} ${E}"))
# -> 5 6 7 5 $(E,undefined)
ctx.define_from_string("A=5,B=$(B)")
print(ctx.expand("$(A) $(B)"))
# -> 5 $(B,recursive)
with ctx.scoped(A="10", B="0"):
print(ctx.expand("$(A)"))
# -> 10
with ctx.scoped(A="0"):
print(ctx.expand("$(A)"))
# -> 0
print(ctx.expand("$(A)"))
# -> 10
split_iocsh_line (like shlex.split)
from epicsmacrolib import split_iocsh_line
split_iocsh_line("dbLoadRecords > output_filename")
# -> IocshSplit(
# argv=["dbLoadRecords"],
# redirects={1: IocshRedirect(fileno=1, name="output_filename", mode="w")},
# error=None,
# )
License
The Python portions of this code is under a BSD-3 clause license (LicenseRef-BSD-3-Clause-SLAC, see LICENSE). Portions of epics-base have been vendored in src under its original license (see src/LICENSE).
Release files for epicsmacrolib 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| epicsmacrolib-0.6.1.tar.gz | 197.8 kB | Details |
Built distributions (wheels)
Total release size: 11.0 MB
Release files / epicsmacrolib-0.6.1.tar.gz
| Download URL | epicsmacrolib-0.6.1.tar.gz |
|---|---|
| Size | 197.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fce340c4e290824b9999118a7d1d9dfe58a334c71e9ae871266c51a235b46547
|
|
BLAKE2b-256 checksum How to use checksums |
2805f6dff9a4357410af0253c0fc378f493f7024f58398f97b99b7e2b1401f7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-pp39-pypy39_pp73-win_amd64.whl
| Download URL | epicsmacrolib-0.6.1-pp39-pypy39_pp73-win_amd64.whl |
|---|---|
| Size | 237.5 kB |
| Tags | PyPy 3.9 PyPy 3.9 7.3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3e923037acceb00929ca3ff5dd8b4a2e4805938b5c4e4a5da57d20422ccb301b
|
|
BLAKE2b-256 checksum How to use checksums |
8cfdce66a53094c116bcbdee60ae6e800cf4899419cd20e1203fc780669c110b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 251.1 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
d0bbb201fa9ac187406ca44afaeb56bf592a7b583136dab7b7579f05e3dd24aa
|
|
BLAKE2b-256 checksum How to use checksums |
9daf279a3ac9ba64668b3246abca0fee2db7745732072ca51c1c928d371585d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | epicsmacrolib-0.6.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 254.7 kB |
| Tags | Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
4784d2dd4dcaacb7041819bc116efe915ad74cf2e46f954b8510cc65cb368f70
|
|
BLAKE2b-256 checksum How to use checksums |
4924c1faff442170009528793df24372c63d01347345c7617f5cc9ab1172c1ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl |
|---|---|
| Size | 236.8 kB |
| Tags | PyPy 3.9 PyPy 3.9 7.3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
e71632b2dfa37d68d404f6a14f621fa2504a4dfeceac15db27c326bae39a68e6
|
|
BLAKE2b-256 checksum How to use checksums |
c53827fa383d1b2648304c3274c412da2105904cbd5d0b01dcf91a9ded5398eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp311-cp311-win_amd64.whl
| Download URL | epicsmacrolib-0.6.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 249.6 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
66d553b7056c2e2361317ae7576d1e6e8aafc39922d276c0b25ca7c5660b759a
|
|
BLAKE2b-256 checksum How to use checksums |
27aa299074022ec296be73559f6ef2eb73dcf702df9e876c839248a4487fe972
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp311-cp311-win32.whl
| Download URL | epicsmacrolib-0.6.1-cp311-cp311-win32.whl |
|---|---|
| Size | 239.4 kB |
| Tags | CPython 3.11 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
e63f4acff6a11908ca65a497a1ac95ef4c59c2488ea432eba4d172e0556e671f
|
|
BLAKE2b-256 checksum How to use checksums |
31c9e71017c75c9731496159765f45d91ec6301c25149053e951445ebde217a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp311-cp311-musllinux_1_1_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-cp311-cp311-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 670.7 kB |
| Tags | CPython 3.11 Linux musl 1.1+ x86-64 |
|
SHA-256 checksum How to use checksums |
496366b5efbad23b924a4a4b7d2167f9b40150c7fa923b7ab5dabbd178f5f027
|
|
BLAKE2b-256 checksum How to use checksums |
566d2af76022c7c4f64c87ae5467925b9af69ec409f1800809edfdc8bbea986d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp311-cp311-musllinux_1_1_i686.whl
| Download URL | epicsmacrolib-0.6.1-cp311-cp311-musllinux_1_1_i686.whl |
|---|---|
| Size | 647.6 kB |
| Tags | CPython 3.11 Linux musl 1.1+ x86-32 |
|
SHA-256 checksum How to use checksums |
bd93fb912256ab22cb1c3e96b1c5d36c5947fde589094aa0fe03222d6935894e
|
|
BLAKE2b-256 checksum How to use checksums |
37c26b279c3a0faad5d564ea22349a4c3c2227723516e5fb295624fb35628bea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 670.4 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
981d70a6ab47f7fdd3939972e2a7943ea1693cbd18cc51dc004146ba4b13a94b
|
|
BLAKE2b-256 checksum How to use checksums |
f4b6ff637219e0cc21624be07e05dbfa03b3e264269617a10dc05772172732aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | epicsmacrolib-0.6.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 648.0 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
77103a35178e7a1a6a5a80c9ea8505db76aea585cf677ff629624199c85b6834
|
|
BLAKE2b-256 checksum How to use checksums |
af05bc93a11339a7b1c70c741d3306e35008613d15cd03eb4133e8f768ae92bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 257.9 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
cb73224fe499860375962f15cb4d27b021b4ee101f58ac9ed3fbc35395e53c97
|
|
BLAKE2b-256 checksum How to use checksums |
00b1add04a8b15ff4fff8a363ec79e885d713c017fe1a6b959a2af7717291aef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp310-cp310-win_amd64.whl
| Download URL | epicsmacrolib-0.6.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 248.5 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
928508b8a0d7ec962251ace084b6e374bd2e588457d8d0443efcb83325cefc83
|
|
BLAKE2b-256 checksum How to use checksums |
6682328cf02865141f6e9b8dd3b230976e85380e5493b4d8b39fa39a40a9b96b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp310-cp310-win32.whl
| Download URL | epicsmacrolib-0.6.1-cp310-cp310-win32.whl |
|---|---|
| Size | 238.8 kB |
| Tags | CPython 3.10 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
3206af581db6f61e7dbc2c5f766cd0ba4df2a6bc6a3e1c47a7b80456c8be32ae
|
|
BLAKE2b-256 checksum How to use checksums |
c5e2daf590604dd3fb7a7d5dae854435f1f09cf56d03b18c4bdb8e39fe60d842
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp310-cp310-musllinux_1_1_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-cp310-cp310-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 633.2 kB |
| Tags | CPython 3.10 Linux musl 1.1+ x86-64 |
|
SHA-256 checksum How to use checksums |
ae682c97da5be3c24c4f0799187a6d0518eea414b1fedd450f5bfd66a4dd9818
|
|
BLAKE2b-256 checksum How to use checksums |
3dde7dd1863d69d3081c90b991bf3094ee266e456638a13a964a13cb3773a49c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp310-cp310-musllinux_1_1_i686.whl
| Download URL | epicsmacrolib-0.6.1-cp310-cp310-musllinux_1_1_i686.whl |
|---|---|
| Size | 611.0 kB |
| Tags | CPython 3.10 Linux musl 1.1+ x86-32 |
|
SHA-256 checksum How to use checksums |
e2bf47a2e751840bf06cdf6bd780866e8b5dfb7778ba60dd3b0bd27158cdd9cb
|
|
BLAKE2b-256 checksum How to use checksums |
f679c4190476b5ec29c45678b9d451eae58e7652771a745ff12a7f0e59370e0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 628.8 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
34dd7a65ddb0cdfb979075f95e28078fd79fd2d496a78e8dfcf1eeb588933d2a
|
|
BLAKE2b-256 checksum How to use checksums |
1a327ed61c84f5224418970235fc19bf4020e1e30a94b582449b029c585bbba1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | epicsmacrolib-0.6.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 611.3 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
a3f1aa1cbef8191f610b4b8d4d6e27fcec249cd36c153fb12adf9f879deeb92e
|
|
BLAKE2b-256 checksum How to use checksums |
bcc2bed057bf12c0b1feb2ea691ff01b3126089f46cb853ca4fc2a33284da897
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 256.5 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
df1d8834dcf1fde489caf61ea744cc2ce70247e130b6afc428d40755f188fc46
|
|
BLAKE2b-256 checksum How to use checksums |
0334c0f361db64ec23d77c675497817de11f9f32cd4ef10fe23866a2b4267c58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp39-cp39-win_amd64.whl
| Download URL | epicsmacrolib-0.6.1-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 248.5 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fdb98d4022c9908ee97a9c79d5761fc515647566332682a901fbad4fcf8e313d
|
|
BLAKE2b-256 checksum How to use checksums |
5d6648839fc387c5066b77ffb318cb82cbf337d5174a3500631d35cfb72dd461
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp39-cp39-win32.whl
| Download URL | epicsmacrolib-0.6.1-cp39-cp39-win32.whl |
|---|---|
| Size | 238.9 kB |
| Tags | CPython 3.9 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
513527fb147c5f083c06d2aa8024cf30db5d3ed6c2e521495d19a0e894278bc1
|
|
BLAKE2b-256 checksum How to use checksums |
a44a5969743c00094dc13c913e7db6d30076b0c44171b2a4da36654d224f8592
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp39-cp39-musllinux_1_1_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-cp39-cp39-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 631.1 kB |
| Tags | CPython 3.9 Linux musl 1.1+ x86-64 |
|
SHA-256 checksum How to use checksums |
9d869f58431efe292a8a3c9ac6aead1da3b25b77a5c567a363f8d041d8b857cf
|
|
BLAKE2b-256 checksum How to use checksums |
bed028fdb52df5596e77ba19f9b7f875cdb9e82e2a9a0ab109ff7d04deec7ed0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp39-cp39-musllinux_1_1_i686.whl
| Download URL | epicsmacrolib-0.6.1-cp39-cp39-musllinux_1_1_i686.whl |
|---|---|
| Size | 612.1 kB |
| Tags | CPython 3.9 Linux musl 1.1+ x86-32 |
|
SHA-256 checksum How to use checksums |
b67bee182c5ee78a2993c2c47a1ae3f74f010e5d416b96242faab50fa500b98b
|
|
BLAKE2b-256 checksum How to use checksums |
efa0c7efb9d8087c28df0dba40056965d22520a0f0431be2270b071b9d8145ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 628.1 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
bf18d4eaeafeedf878c4cc5cfd3dc6cd265aaf6bfbcfb58207897ad002522168
|
|
BLAKE2b-256 checksum How to use checksums |
c860c5ee123529ea2002237e157a16532bfb9af10be2252af807dd144d8b11f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | epicsmacrolib-0.6.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 610.4 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32 |
|
SHA-256 checksum How to use checksums |
7f9b49c34da1a01617b4a452aa25823a13a76a775c7040d3961a8dbb89baf32d
|
|
BLAKE2b-256 checksum How to use checksums |
9c7b90971f8d49e5a166d6f5383e7a21094bb27f1cbe26c60ea53151c82bb419
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / epicsmacrolib-0.6.1-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | epicsmacrolib-0.6.1-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 256.7 kB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
a5e638f402f1cdaf9b84ced17cd51a8bbbfd56025375584e82e9f90126358000
|
|
BLAKE2b-256 checksum How to use checksums |
2cc43131ea6340c4a8d6715b6303d7fa270d446d92366f2225ea3027643c31ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|