I want 1.py to call 2.py.
1.py takes an Ip address as a command line argument. I am trying a 'subprocess.call()' in 1.py to call 2.py.
I have defined addr= sys.argv before the main() of 1.py. I want the same address to be accessed in 2.py.
In short, 1.py should call 2.py, which in turn calls 3.py and so on, just by one command
python 1.py ipaddress and this address has to be passed on to all other scripts. how can this be done?
To add on...
i have used
subprocess.call(,shell=True) within the main of 1.py
also have defined addr=sys.argv before the main() of 2.py
I know I am wrong somewhere in taking that system argument, but not able to nail it.
it is giving me the error:
self.transportAddr = ( socket.gaierror:(11001,'getaddrinfo failed')
Thanks for the patient reading!
Edited by novice20: n/a