Re: [Tutor] Hello everybody

2016-06-14 Thread Joseph John
On Mon, Jun 13, 2016 at 11:55 PM, Влад <79099012...@yandex.ru> wrote: >Hi. I've just begin with Python? I'm 34. Is it late or what? If it is - > I >will cut it out. What you think guys? >** > Here myself 48 crossed, just started taking python step by step Welcome to the herd >--

Re: [Tutor] capture output from a subprocess while it is being produced

2016-06-14 Thread eryk sun
On Tue, Jun 14, 2016 at 8:03 PM, Albert-Jan Roskam wrote: > > proc = Popen("ls -lF", cwd=cwd, shell=True, stdout=PIPE, stderr=PIPE) Don't use shell=True if you can avoid it. "ls" isn't a shell command. Use ['ls', '-lF']. The child process probably buffers its output when stdout isn't a termi

Re: [Tutor] rock paper scissor lizard spock help

2016-06-14 Thread Alan Gauld via Tutor
On 14/06/16 11:18, Katelyn O'Malley wrote: > Hi I am just getting into python and I am trying to create a rock paper > scissor lizard spock game for 3 people and I cannot figure out the scoring The scoring of any ganme is the bit that makes it unique, so we would need to know the scoring rules to

Re: [Tutor] capture output from a subprocess while it is being produced

2016-06-14 Thread Alan Gauld via Tutor
On 14/06/16 21:03, Albert-Jan Roskam wrote: > from subprocess import Popen, PIPE > from threading import Thread > from collections import deque > import sys > import time > import os.path > > > def process(dq): > """Run a commandline program, with lots of output""" > cwd = os.path.dirnam

Re: [Tutor] rock paper scissor lizard spock help

2016-06-14 Thread Bob Gailer
On Jun 14, 2016 4:05 PM, "Katelyn O'Malley" wrote: > > Hi I am just getting into python and I am trying to create a rock paper > scissor lizard spock game for 3 people and I cannot figure out the scoring > of the players I attached the code below, any help/ideas is much > appreciated. Welcome to p

[Tutor] rock paper scissor lizard spock help

2016-06-14 Thread Katelyn O'Malley
Hi I am just getting into python and I am trying to create a rock paper scissor lizard spock game for 3 people and I cannot figure out the scoring of the players I attached the code below, any help/ideas is much appreciated. import random number_of_games = 3 print("Player 1 please choose rock ,

[Tutor] capture output from a subprocess while it is being produced

2016-06-14 Thread Albert-Jan Roskam
Hi, I have a Tkinter program where I can fire up a commandline program which could run for quite a while (let's say 15 minutes or more). While the program is running, I would like to show the output that I normally see in the terminal (actually, the target platform is windows but now I am on Li

Re: [Tutor] Howto display progress as cmd is being executed via subprocess ?

2016-06-14 Thread eryk sun
On Mon, Jun 13, 2016 at 4:50 PM, Ramanathan Muthaiah wrote: > > subprocess.check_output([cmd], stderr=subprocess.STDOUT, shell=True) > ... > how to combine the progressbar and subprocess code snippets to show the > progress as the cmd is being executed. check_output waits for the process to exit,