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
#11
Thank you for your reply, already managed
Reply
#12
If I try to describe my situation, this will be a longer article :-D

Sometimes it's handy to start a second interpreter with Popen.
In this case I burned already my fingers, because one time he has taken two different Python Interpreters in different environments.
So if you want to start the same interpreter with the same environment, use sys.executable. Otherwise
you will shoot you in your own foot.

Using the rest like stdin, stdout, stderr is not amazing. It's low level stuff we normally don't want to do by hand.
I have tried one time asyncio and there the handling was much easier, because on network side I had two streams (reader, writer)
and reading from subprocess.stdout was also safer.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Capturing BS4 values into DF and writing to CSV cubangt 18 1,851 Sep-05-2023, 01:57 PM
Last Post: cubangt
  capturing multiline output for number of parameters jss 3 767 Sep-01-2023, 05:42 PM
Last Post: jss
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,008 Jun-29-2023, 11:57 AM
Last Post: gologica
  Json filter is not capturing desired key/element mrapple2020 1 1,073 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,624 May-11-2022, 07:12 AM
Last Post: normanwolf
  web socket server handle onnection closed abnormally [internal]) korenron 0 2,110 Sep-23-2021, 09:26 AM
Last Post: korenron
  500 internal server error Nitil 1 2,847 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,790 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur
  Removing internal brackets from a string Astrikor 4 2,617 Jun-04-2020, 07:54 PM
Last Post: Astrikor
  crontab on RHEL7 not calling python script wrapped in shell script benthomson 1 2,248 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