0

I have 2 scripts working together, one script receives the IP and port to connect to a server (more than one) and calls an client script, passing the ip and port to the main(ip,port) function on the client script but how can I call the client script AND pass the ip and port?

FEEDBACK:

#'pushd' dosn't work with os.system, you can use:

os.chdir('directory path')
os.system('python YourScriptName.py argument1 argument2')
3
  • Please use the search feature for this: stackoverflow.com/questions/14892355/… Commented Nov 22, 2017 at 16:39
  • Possible duplicate of How to make a call to an executable from Python script? Commented Nov 22, 2017 at 16:39
  • Not exactly working, I need to run the commands on cmd like this: 1) pushd C:\\MyScripts\\ 2)python userClient.py 127.0.0.1 1002 , how can I tell subproces.Popen or os.system to give an 'enter' before 2 and execute the second command? Commented Nov 22, 2017 at 17:16

1 Answer 1

0

FEEDBACK and Answer:

#'pushd' dosn't work with os.system, you can use:

os.chdir('directory path')
os.system('python YourScriptName.py argument1 argument2')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.