Python Forum
Capturing inputs values from internal python script
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capturing inputs values from internal python script
#1
Hi there Rolleyes ,

I am using python 3.6 version. I have main python script which calls other python scripts, those internal scripts prompts for several user inputs. I wish to run those and then send the user input to the parent process and also send the result.
Note that the internal script has a lot of output, I don't want to take it all, but only the user input. Till now I wrote this info to a file and read it in the parent. But I am searching for a better elegant way which will allow me using any script as a black box and capturing its input and result without changing the inside script).
(At first I used os.system, check_output, call, popen also used PIPE, but could not capture it in a way the internal script continues, being completed and return all input to the user, it has several inputs in each script, till now it froze after the first or did not print the output, did not understand why).
I will appreciate if you can add code example of this and explains how can I implement that.

Please advice,
Thank you Smile ,
Limor
Reply


Messages In This Thread
Capturing inputs values from internal python script - by limors11 - Jun-16-2019, 05:35 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Capturing BS4 values into DF and writing to CSV cubangt 18 2,002 Sep-05-2023, 01:57 PM
Last Post: cubangt
  capturing multiline output for number of parameters jss 3 834 Sep-01-2023, 05:42 PM
Last Post: jss
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,362 Jun-29-2023, 11:57 AM
Last Post: gologica
  Json filter is not capturing desired key/element mrapple2020 1 1,164 Nov-24-2022, 09:22 AM
Last Post: ibreeden
  Trying to use 2 values from excel in my script but getting error.. cubangt 3 1,703 May-11-2022, 07:12 AM
Last Post: normanwolf
  web socket server handle onnection closed abnormally [internal]) korenron 0 2,169 Sep-23-2021, 09:26 AM
Last Post: korenron
  500 internal server error Nitil 1 2,914 May-01-2021, 06:16 PM
Last Post: snippsat
  How to kill a bash script running as root from a python script? jc_lafleur 4 5,964 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur
  Removing internal brackets from a string Astrikor 4 2,708 Jun-04-2020, 07:54 PM
Last Post: Astrikor
  crontab on RHEL7 not calling python script wrapped in shell script benthomson 1 2,324 May-28-2020, 05:27 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020