Re: Control stript which is runing in background.

2021-01-02 Thread Greg Ewing
On 3/01/21 12:30 am, Alan Bawden wrote: So as long as the OP's commands are no longer than 512 bytes, and as long as they are careful to send commands in a single call to write(), Also note that's one write() system call, which may or may not correspond to one Python write() call. -- Greg --

Re: Control stript which is runing in background.

2021-01-02 Thread Alan Bawden
jak writes: Il 02/01/2021 01:07, Alan Bawden ha scritto: > jak writes: > > Il 01/01/2021 06:23, Alan Bawden ha scritto: > > jak writes: > > > > Running the command: > > > > $ cat bible.txt > cmdpipe & cat bible.txt > cmdpipe & cat

Re: Control stript which is runing in background.

2021-01-02 Thread jak
PS: difference starts after 64K block -- https://mail.python.org/mailman/listinfo/python-list

Re: Control stript which is runing in background.

2021-01-02 Thread jak
Il 02/01/2021 01:07, Alan Bawden ha scritto: jak writes: Il 01/01/2021 06:23, Alan Bawden ha scritto: > jak writes: > > Running the command: > > $ cat bible.txt > cmdpipe & cat bible.txt > cmdpipe & cat bible.txt > cmdpipe > > the three texts do

Re: Control stript which is runing in background.

2021-01-02 Thread jak
Il 02/01/2021 01:07, Alan Bawden ha scritto: jak writes: Il 01/01/2021 06:23, Alan Bawden ha scritto: > jak writes: > > Running the command: > > $ cat bible.txt > cmdpipe & cat bible.txt > cmdpipe & cat bible.txt > cmdpipe > > the three texts do

Re: Control stript which is runing in background.

2021-01-01 Thread Alan Bawden
jak writes: Il 01/01/2021 06:23, Alan Bawden ha scritto: > jak writes: > > Running the command: > > $ cat bible.txt > cmdpipe & cat bible.txt > cmdpipe & cat bible.txt > cmdpipe > > the three texts do not mix > > The three texts do not mix as long

Re: Control stript which is runing in background.

2021-01-01 Thread 2QdxY4RzWzUUiLuE
On 2021-01-01 at 21:41:24 +0100, jak wrote: > Sorry if I made you argumentative ... And I didn't mean to be argumentative. :-) We both offered alternatives, and we both argued for them (in the sense of claiming that our own ideas were good). Each solution is better, depending on certain

Re: Control stript which is runing in background.

2021-01-01 Thread Cameron Simpson
On 01Jan2021 03:43, jak wrote: >Maybe the fact that I'm not English and I don't know the language well >doesn't allow me to express myself clearly. Try it one more time: >The OP would like to give some command to a script that is running. How? >With a script that sends commands to it. One of the

Re: Control stript which is runing in background.

2021-01-01 Thread jak
Il 01/01/2021 14:49, 2qdxy4rzwzuui...@potatochowder.com ha scritto: On 2021-01-01 at 11:11:47 +0100, jak wrote: Il 01/01/2021 04:14, 2qdxy4rzwzuui...@potatochowder.com ha scritto: On 2021-01-01 at 03:43:43 +0100, jak wrote: I think you were clear enough before, but you may not have

Re: Control stript which is runing in background.

2021-01-01 Thread 2QdxY4RzWzUUiLuE
On 2021-01-01 at 11:11:47 +0100, jak wrote: > Il 01/01/2021 04:14, 2qdxy4rzwzuui...@potatochowder.com ha scritto: > > On 2021-01-01 at 03:43:43 +0100, > > jak wrote: > > > > I think you were clear enough before, but you may not have > > considered things the OP did not specify. One of the

Re: Control stript which is runing in background.

2021-01-01 Thread jak
Il 01/01/2021 04:14, 2qdxy4rzwzuui...@potatochowder.com ha scritto: On 2021-01-01 at 03:43:43 +0100, Regarding "Re: Control stript which is runing in background.," jak wrote: Il 01/01/2021 01:43, Cameron Simpson ha scritto: On 01Jan2021 01:21, jak wrote: Il 01/01/2021 00:58, 2qd

Re: Control stript which is runing in background.

2021-01-01 Thread jak
Il 01/01/2021 06:23, Alan Bawden ha scritto: jak writes: Running the command: $ cat bible.txt > cmdpipe & cat bible.txt > cmdpipe & cat bible.txt > cmdpipe the three texts do not mix The three texts do not mix as long at the contents of bible.txt is short enough (and

Re: Control stript which is runing in background.

2020-12-31 Thread Alan Bawden
jak writes: Running the command: $ cat bible.txt > cmdpipe & cat bible.txt > cmdpipe & cat bible.txt > cmdpipe the three texts do not mix The three texts do not mix as long at the contents of bible.txt is short enough (and provided `cat' only calls `write' once). In the POSIX

Re: Control stript which is runing in background.

2020-12-31 Thread 2QdxY4RzWzUUiLuE
On 2021-01-01 at 03:43:43 +0100, Regarding "Re: Control stript which is runing in background.," jak wrote: > Il 01/01/2021 01:43, Cameron Simpson ha scritto: > > On 01Jan2021 01:21, jak wrote: > > > Il 01/01/2021 00:58, 2qdxy4rzwzuui...@potatochowder.com ha scritto:

Re: Control stript which is runing in background.

2020-12-31 Thread jak
Il 01/01/2021 01:43, Cameron Simpson ha scritto: On 01Jan2021 01:21, jak wrote: Il 01/01/2021 00:58, 2qdxy4rzwzuui...@potatochowder.com ha scritto: Most of the time, I have several shells open, often with their own background jobs running. Limiting write permission on the pipe to "me"

Re: Control stript which is runing in background.

2020-12-31 Thread Cameron Simpson
On 01Jan2021 01:21, jak wrote: >Il 01/01/2021 00:58, 2qdxy4rzwzuui...@potatochowder.com ha scritto: >>Most of the time, I have several shells open, often with their own >>background jobs running. Limiting write permission on the pipe to "me" >>wouldn't prevent concurrent access. > >This is true

Re: Control stript which is runing in background.

2020-12-31 Thread jak
Il 01/01/2021 00:58, 2qdxy4rzwzuui...@potatochowder.com ha scritto: Most of the time, I have several shells open, often with their own background jobs running. Limiting write permission on the pipe to "me" wouldn't prevent concurrent access. This is true but there would be no difference if

Re: Control stript which is runing in background.

2020-12-31 Thread 2QdxY4RzWzUUiLuE
On 2021-01-01 at 00:45:52 +0100, Regarding "Re: Control stript which is runing in background.," jak wrote: > ... but this won't be the problem the OP may encounter if its intention is > to create a script to command another one that is running. It will be > sufficient

Re: Control stript which is runing in background.

2020-12-31 Thread jak
... but this won't be the problem the OP may encounter if its intention is to create a script to command another one that is running. It will be sufficient to limit the write permissions to the pipe file to himself ... perhaps protecting the pipe file inside a directory with stickibits set. --

Re: Control stript which is runing in background.

2020-12-31 Thread jak
Il 31/12/2020 22:43, Cameron Simpson ha scritto: On 31Dec2020 18:07, jak wrote: Il 31/12/2020 11:43, Petro ha scritto: I would like to make something like this: A python script would run headlessly in the background. I would like to control the script from the command line using other python

Re: Control stript which is runing in background.

2020-12-31 Thread Cameron Simpson
On 31Dec2020 18:07, jak wrote: >Il 31/12/2020 11:43, Petro ha scritto: >>I would like to make something like this: >>A python script would run headlessly in the background. >>I would like to control the script from the command line using other python >>scripts or from the python shell. >> From

Re: Control stript which is runing in background.

2020-12-31 Thread jak
Il 31/12/2020 11:43, Petro ha scritto: Hi. I would like to make something like this: A python script would run headlessly in the background. I would like to control the script from the command line using other python scripts or from the python shell. From time to time I would ask the main

Re: Control stript which is runing in background.

2020-12-31 Thread MRAB
On 2020-12-31 10:43, Petro wrote: Hi. I would like to make something like this: A python script would run headlessly in the background. I would like to control the script from the command line using other python scripts or from the python shell. From time to time I would ask the main script