File access

JD Jiandong.Ge at gmail.com
Thu Aug 2 17:05:55 EDT 2007


Thanks for the suggestion, I am thinking implement a database system
for that.

JD

On Aug 2, 12:11 pm, Larry Bates <larry.ba... at websafe.com> wrote:
> JD wrote:
> > Hi,
>
> > What I am trying to do is to run a subprocess on another machine using
> > subprocess.Popen, this subprocess contuinue writing something into a
> > file when it is runing.
>
> > After submit this subprocess, I tried to open the file and readlines()
> > in the loop (with a delay) in the loop) when the subprocess was
> > runing.
>
> > The problem is I could not get anything untill the subprocess
> > finished.
>
> > I also tried to run another python programm when the subprocess is
> > runing, I could get what I want.
>
> > Does anyone know why? Thanks!
>
> > JD
>
> I believe you are approaching this incorrectly.  You should probably be using a
> socket server/socket client to communicate between these two.  Or perhaps you
> could use a multi-user database table.  Writing/reading to files from two
> different workstations and expecting them to by synchronized most likely won't work.
>
> -Larry





More information about the Python-list mailing list