The problem is that these scripts are run in the command line using argparse, so that's the issue. This is my first time using the subprocces library and I don't know if I'm calling these scripts right. San_cable_test.py: error: unrecognized arguments: -deviceIP 172.1.1.1 -deviceUsername myUsername -devicePassword myPassword San_cable_test.py: error: unrecognized arguments: 172.1.1.1 myUsername myPassword The name of this script is: San_cable_test.py I tried it two different ways and I'll show the tracebacks: usage: San_cable_test.py However, when I run the program and select one of the options and get the user arguments, I get a error: unrecognized arguments: So far I have created a top-level python file that is set up to call two python scripts to start with that the user can enter. It is important to note that my python scripts contain command-line argparse arguments for it to run, for example: python San_cable_test.py -deviceIP 172.1.1.1 -deviceUsername myUsername -devicePassword myPassword I have been advised to use the subprocess library and this seems to make the most sense for what I want to do. I want to create one top-level python file that can run other python scripts so the user can decide which scripts they want to run. So essentially I have 15 or so scripts that can connect to various networking devices using an SSH library.
0 Comments
Leave a Reply. |