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.
My code examples are always for Python >=3.6.0
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
  500 internal server error Nitil 1 467 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 1,392 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur
  Removing internal brackets from a string Astrikor 4 813 Jun-04-2020, 07:54 PM
Last Post: Astrikor
  crontab on RHEL7 not calling python script wrapped in shell script benthomson 1 822 May-28-2020, 05:27 PM
Last Post: micseydel
  auto supply values to a python script(function) from text file metro17 4 1,020 Oct-26-2019, 01:25 AM
Last Post: ichabod801
  Python Script for parsing dictionary values from yaml file pawan6782 3 2,687 Sep-04-2019, 07:21 PM
Last Post: pawan6782
  Internal Server Error 500 on creating .py file patrickluethi 0 785 Aug-02-2019, 01:57 PM
Last Post: patrickluethi
  Capturing a snapshot from the video sreeramp96 1 1,082 May-24-2019, 07:02 AM
Last Post: heiner55
  Package python script which has different libraries as a single executable or script tej7gandhi 1 1,164 May-11-2019, 08:12 PM
Last Post: keames
  HTTP response capturing issue miunika 1 881 Mar-16-2019, 01:46 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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