argcapture.py 374 B

1234567891011121314151617
  1. #!/usr/bin/env python3
  2. # Copyright 2021 The Chromium Authors. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. """Writes arguments to a file."""
  6. import sys
  7. def main():
  8. with open(sys.argv[1], 'w') as f:
  9. f.write('\n'.join(sys.argv[2:]))
  10. f.write('\n')
  11. if __name__ == '__main__':
  12. main()