Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

sniffer: use argparse to parse script arguments #37

Merged
merged 1 commit into from
Jul 13, 2018

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Jun 19, 2018

This is mainly a preparation step to make some arguments (namely
baudrate and the "serial/socket" argument) optional, to make it more
usable like the old rftest2pcap script for the econotag.

(it also makes the script code more readable)

help="Port of the TCP-based sniffer application")
p.add_argument("channel", type=int, help="Channel to sniff on")
p.add_argument("outfile", type=str, default=None, nargs="?",
help="PCAP file to output to")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an argparse.FileType in python.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will check it out ;-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested ack

@smlng
Copy link
Member

smlng commented Jul 13, 2018

please squash

This is mainly a preparation step to make some arguments (namely
baudrate and the "serial/socket" argument) optional, to make it more
usable like the old `rftest2pcap` script for the econotag.
@miri64 miri64 force-pushed the sniffer/enh/argparse branch from 5af8d96 to fb79b79 Compare July 13, 2018 14:02
@miri64
Copy link
Member Author

miri64 commented Jul 13, 2018

Squashed

@miri64 miri64 merged commit e7f8e3c into RIOT-OS:master Jul 13, 2018
@miri64 miri64 deleted the sniffer/enh/argparse branch July 13, 2018 14:02
chrysn pushed a commit to chrysn-pull-requests/RIOT that referenced this pull request Sep 20, 2022
…gparse

sniffer: use argparse to parse script arguments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants