File tree 2 files changed +31
-1
lines changed
2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 15
15
#### Instructions for run
16
16
17
17
1 . Clone the ** github repo** by ` git clone https://github.com/nooobcoder/PythonPingTelnetStatus.git `
18
+
18
19
2 . Check if ** Python2** is installed
19
- ` python --version `
20
+
21
+ ` python --version `
22
+
20
23
3 . Run the script using: ` python python2port.py `
21
24
22
25
_ After the script has run, check the newly created ** output** folder where the resultant files are output_
23
26
24
27
---
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
+ ---
Original file line number Diff line number Diff line change 32
32
33
33
34
34
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
+ """
35
44
# Read command line arguments with python2
36
45
parser = argparse .ArgumentParser ()
37
46
parser .add_argument ("-f" , "--file" , help = "File name to read from" )
You can’t perform that action at this time.
0 commit comments