Created
January 15, 2026 16:06
-
-
Save ccoulombe/7378bfa20cb0024cc9e2ee3b4410b7b8 to your computer and use it in GitHub Desktop.
watch wrapper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import argparse, os | |
| # Preferred minimal interval | |
| DEFAULT_SECONDS = 601 | |
| which='/cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/bin/watch' | |
| parser = argparse.ArgumentParser(description="execute a program periodically, showing output fullscreen", add_help=False) | |
| parser.add_argument('-n', '--interval', type=float, default=DEFAULT_SECONDS) | |
| args, unknown = parser.parse_known_args() | |
| os.execl(which,which, '--interval',str(max(DEFAULT_SECONDS, args.interval)), *unknown) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment