[Tutor] monitor subprocess and get it's output during execution

2008-08-31 Thread 王珂
Hi, I have a python program needs to do some download task from file server to local disk regularly. I intend to call robocopy.exe (a download tool in windows) do the real download job. --Below codes works: DownloadArgs = " \\servername\Sourcepath d:\destinationPath *.bin" os.system("robocopy.exe

Re: [Tutor] Having trouble with a component of the random module

2008-08-31 Thread Alan Gilfoy
In this case, I was trying to pull 1 card from a 5-card pool, which should have worked. There was a typo in my code that I have since fixed, and it is working. I have to make sure manually that I'm not telling the program to pick more cards than exist in the list. I can do this two ways: Ma

Re: [Tutor] Having trouble with a component of the random module

2008-08-31 Thread Alan Gilfoy
I shouldn't get the same card twice in the same batch, no. Of course, in separate trials, I may get the same card again. Basically, I type the names of relevant cards in a list, and proceed to "tell" my program which list to read, and how many cards to pick from that list. Normally, I put e

Re: [Tutor] Having trouble with a component of the random module

2008-08-31 Thread OmerT
Bob, Kent, I understood all that from the context and yet do not feel familiar enough with the information nor had the time to lookup. The point I'm making is that Alan has a logical problem with his generator regarding the question of repetitive cards in a booster: On one hand, the script does n

Re: [Tutor] Having trouble with a component of the random module

2008-08-31 Thread bob gailer
OmerT wrote: I'm unfamiliar with the random.sample function, yet I can't help but wonder: Do you ever got the same card twice? Quoting the manual: sample( population, k) Return a k length list of unique elements chosen from the population sequence. Used for random sampling without replaceme

Re: [Tutor] Having trouble with a component of the random module

2008-08-31 Thread OmerT
I'm unfamiliar with the random.sample function, yet I can't help but wonder: Do you ever got the same card twice? Is that intentional ? On Thu, Aug 28, 2008 at 6:29 PM, Alan Gilfoy <[EMAIL PROTECTED]> wrote: > Quoting W W <[EMAIL PROTECTED]>: > > >>> The number of items I want from a list is sma