Xontrib-macro

Latest version: v0.4.2

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.4.2

DisableInterrupt API fix.

0.4.1

Added `signal.DisableInterrupt`. This macro allows disabling SIGINT (Ctrl+C) for group of commands.

xsh
from xontrib.macro.signal import DisableInterrupt

echo start
with! DisableInterrupt:
echo 'sleep start'
sleep 10
echo 'sleep end'
echo finish

start
sleep start
[Press Ctrl+C]
KeyboardInterrupt will be raised at the end of current transaction.
sleep end
Exception KeyboardInterrupt: KeyboardInterrupt was received during transaction.

0.3.5

Fix links.

0.3.4

Added `format` to `data.Write`:

xsh
from xontrib.macro.data import Write

with! Write('/tmp/t/hello.xsh', chmod=0o700, replace=True, makedir=True, format={'name': 'world'}, verbose=True):
echo {name}

Make directories: /tmp/t
Write to file: /tmp/t/hello.xsh
Set chmod: rw- --- ---
Set exec: rwx --- ---

/tmp/t/hello.xsh
world

0.3.3

Fix `Path.expanduser`.

0.3.2

Added `macro.data.XmlBlock`.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.