On 20/08/2014 05:04, yuzhichang wrote:
Would you please access this list via
https://mail.python.org/mailman/listinfo/python-list or read and action
this https://wiki.python.org/moin/GoogleGroupsPython to prevent us
seeing double line spacing and single line paragraphs, thanks.
--
My fellow
On Wednesday, August 20, 2014 1:08:17 AM UTC+8, Kushal Kumaran wrote:
> On Tue, Aug 19, 2014 at 1:09 PM, yuzhichang wrote:
>
> > Hi all,
>
> > I'm new to asyncio introduced by Python 3.4. I created two tasks each
> > pings a host. I noticed some pieces of output will be lost(see "error:
>
On Tue, Aug 19, 2014 at 1:09 PM, yuzhichang wrote:
> Hi all,
> I'm new to asyncio introduced by Python 3.4. I created two tasks each
> pings a host. I noticed some pieces of output will be lost(see "error: found
> icmp_seq gap"). If I changed to run only one task, this problem never occur.
>
2 ms\n'
got line: b'64 bytes from tyr.global.tektronix.net (10.250.163.252):
icmp_seq=10 ttl=55 time=192 ms\n'
got line: b'64 bytes from tyr.global.tektronix.net (10.250.163.252):
icmp_seq=11 ttl=55 time=210 ms\n'
got line: b'64 bytes from babylon.rich.tek.com (10.2
which underlies Tkinter,
supports non-blocking, asynchronous reading out of the box. Apparently
it does not.
There is currently the asyncore module, but I don't know that anyone
really likes it.
So, my question is hereby revised as such: how can I implement a
non-blocking read of a subpr
ch underlies Tkinter,
> supports non-blocking, asynchronous reading out of the box. Apparently
> it does not.
>
> So, my question is hereby revised as such: how can I implement a
> non-blocking read of a subprocess pipe that can write data to the
> Tkinter text widget in an manner
-blocking, asynchronous reading out of the box. Apparently
it does not.
So, my question is hereby revised as such: how can I implement a
non-blocking read of a subprocess pipe that can write data to the
Tkinter text widget in an manner that does not cause the GUI to lock up?
--Kevin
--
Kevin
The results look right! I did a rather large test and the checksum passed.
I will hold off any speed ups as you suggested.
On Wed, Feb 23, 2011 at 8:37 PM, Rob Williscroft wrote:
> Rita wrote in
> news:AANLkTi=88dcpm_kqrs2g620obsnxz0majubfwpeme...@mail.gmail.com in
> gmane.comp.python.general:
Rita wrote in
news:AANLkTi=88dcpm_kqrs2g620obsnxz0majubfwpeme...@mail.gmail.com in
gmane.comp.python.general:
[Top post relocated]
> On Tue, Feb 22, 2011 at 7:57 PM, Rob Williscroft
> wrote:
>
>> Rita wrote in
>> news:AANLkTi=w95gxosc1tkt2bntgjqys1cbmdnojhokq4...@mail.gmail.com in
>> gmane.co
This is a good solution thanks. You should wiki this somewhere.
For extra points is there a way to speed up the p.stdout.read(bufsize) ?
On Tue, Feb 22, 2011 at 7:57 PM, Rob Williscroft wrote:
> Rita wrote in
> news:AANLkTi=w95gxosc1tkt2bntgjqys1cbmdnojhokq4...@mail.gmail.com in
> gmane.comp.
Thanks everyone for your replies.
Chris,
Unfortunately, I can't redirect the output to a file because there are other
processes which use this processes output as stdin.
Rob,
I will give this a try.
On Tue, Feb 22, 2011 at 7:48 PM, Chris Kaynor wrote:
>
> On Tue, Feb 22, 2011 at 3:44 PM, Rita
Rita wrote in
news:AANLkTi=w95gxosc1tkt2bntgjqys1cbmdnojhokq4...@mail.gmail.com in
gmane.comp.python.general:
>
> When using wait() it works a bit better but not consistent
> def run(cmd):
> p=subprocess.Popen(cmd,stdout=subprocess.PIPE)
> rc=p.wait()
> print rc
> return p.stdout
>
> W
On Tue, Feb 22, 2011 at 3:44 PM, Rita wrote:
> I have a process like this,
>
> def run(cmd):
> #cmd=a process which writes a lot of data. Binary/ASCII data
> p=subprocess.Popen(cmd,stdout=subprocess.PIPE)
>
> I would like to get cmd's return code so I am doing this,
>
> def run(cmd):
> p=su
On 22/02/2011, at 20:44, Rita wrote:
> I have a process like this,
>
> def run(cmd):
> #cmd=a process which writes a lot of data. Binary/ASCII data
> p=subprocess.Popen(cmd,stdout=subprocess.PIPE)
>
> I would like to get cmd's return code so I am doing this,
>
> def run(cmd):
> p=subpro
I have a process like this,
def run(cmd):
#cmd=a process which writes a lot of data. Binary/ASCII data
p=subprocess.Popen(cmd,stdout=subprocess.PIPE)
I would like to get cmd's return code so I am doing this,
def run(cmd):
p=subprocess.Popen(cmd,stdout=subprocess.PIPE)
rc=p.poll()
print
On Sun, 14 Nov 2010 19:47:55 +, Tim Harig wrote:
> On 2010-11-14, Camille Harang wrote:
>> # pg_dump prompts for password so I inject it in stdin.
>> pgsql.stdin.write('MY_PASSWORD' + '\n')
>
> For security reasons, some programs use direct access to the TTY system
> for password entry rathe
Tim Harig a écrit :
> On 2010-11-14, Camille Harang wrote:
>> # pg_dump prompts for password so I inject it in stdin.
>> pgsql.stdin.write('MY_PASSWORD' + '\n')
>
> For security reasons, some programs use direct access to the TTY system
> for password entry rather then reading from stdin. Most o
Tim Harig a écrit :
> On 2010-11-14, Camille Harang wrote:
>> # pg_dump prompts for password so I inject it in stdin.
>> pgsql.stdin.write('MY_PASSWORD' + '\n')
>
> For security reasons, some programs use direct access to the TTY system
> for password entry rather then reading from stdin. Most o
On 2010-11-14, Tim Harig wrote:
> On 2010-11-14, Camille Harang wrote:
>> # pg_dump prompts for password so I inject it in stdin.
>> pgsql.stdin.write('MY_PASSWORD' + '\n')
>
> For security reasons, some programs use direct access to the TTY system
> for password entry rather then reading from st
On 2010-11-14, Camille Harang wrote:
> # pg_dump prompts for password so I inject it in stdin.
> pgsql.stdin.write('MY_PASSWORD' + '\n')
For security reasons, some programs use direct access to the TTY system
for password entry rather then reading from stdin. Most of these programs
provide anoth
Hi Chris, thanks for your reply.
Chris Rebert a écrit :
> Quoting http://docs.python.org/library/subprocess.html , emphasis mine:
> """
> On Unix, with shell=True: [...] If args is a sequence, ***the first
> item*** specifies the command string, and any additional items will be
> treated as additi
On Sun, Nov 14, 2010 at 10:50 AM, Camille Harang wrote:
> Hi all,
>
> I'm having a problem with subprocess.Popen. It seems that its unable to
> capture the pg_dump's standard inputs & outputs in a non-shell mode:
>
> from subprocess import Popen, PIPE
>
> # fire pg_dump in order to read data from
Hi all,
I'm having a problem with subprocess.Popen. It seems that its unable to
capture the pg_dump's standard inputs & outputs in a non-shell mode:
from subprocess import Popen, PIPE
# fire pg_dump in order to read data from the file object pgsql.stdout
pgsql = Popen(['/usr/bin/pg_dump',
23 matches
Mail list logo