mirror of
https://github.com/romanz/amodem.git
synced 2026-02-06 00:36:20 +08:00
23 lines
457 B
Python
Executable File
23 lines
457 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
"""Script that exposes the amodem.resample() function
|
|
to the command line, taking parameters via standard
|
|
inputs and returning results via standard outputs.
|
|
"""
|
|
|
|
from amodem.sampling import resample
|
|
import argparse
|
|
import sys
|
|
|
|
|
|
def main():
|
|
p = argparse.ArgumentParser()
|
|
p.add_argument('df', type=float)
|
|
args = p.parse_args()
|
|
|
|
resample(src=sys.stdin, dst=sys.stdout, df=args.df)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|