Skip to content

Commit 1a2eba7

Browse files
committed
chore: enhance readme
1 parent 6d98d5a commit 1a2eba7

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

README.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,31 @@
1515
#### Instructions for run
1616

1717
1. Clone the **github repo** by `git clone https://github.com/nooobcoder/PythonPingTelnetStatus.git`
18+
1819
2. Check if **Python2** is installed
19-
`python --version`
20+
21+
`python --version`
22+
2023
3. Run the script using: `python python2port.py`
2124

2225
_After the script has run, check the newly created **output** folder where the resultant files are output_
2326

2427
---
28+
29+
## Running the script with arguments
30+
31+
#### Inputs:
32+
33+
- `-f, --file`: The file name to read from.
34+
35+
- `-pc, --packet_counts`: The number of packets.
36+
37+
- `-tr, --telnet_retries`: The number of telnet retries.
38+
39+
#### Example Usage:
40+
41+
```bash
42+
python python2port.py -f input.csv -pc 4 -tr 4
43+
```
44+
45+
---

python2port.py

+9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@
3232

3333

3434
def read_cmd_args():
35+
"""
36+
Read command line arguments
37+
Inputs:
38+
-f, --file: File name to read from
39+
-pc, --packet_counts: Number of packets
40+
-tr, --telnet_retries: Telnet retries
41+
Returns:
42+
args: Command line arguments
43+
"""
3544
# Read command line arguments with python2
3645
parser = argparse.ArgumentParser()
3746
parser.add_argument("-f", "--file", help="File name to read from")

0 commit comments

Comments
 (0)