>Messaggio originale
>Da: [email protected]
>Data: 08/09/2014 18.15
>A:
>Ogg: how to be sure the process are ended
>
>Dear all!!
>I want to use subprocess for run some programs But I need to be sure the
>program end before continue with the other:
>
>subprocess.call("ls")
>
print ("Quiz TIME!!!")
ready = input("Are you ready?")
if (ready in ("yes","YES","Yes")):
print ("Alrighty")
if (ready in ("no","NO","No")):
print ("Too bad so sad. You're obligated to do it.")
else:
print ("OK (sarcasm)")
q1 = input("1. When was Quebec City founded? a. 1608 b
Mimi Ou Yang wrote:
> print ("Quiz TIME!!!")
> ready = input("Are you ready?")
> if (ready in ("yes","YES","Yes")):
> print ("Alrighty")
> if (ready in ("no","NO","No")):
> print ("Too bad so sad. You're obligated to do it.")
> else:
> print ("OK (sarcasm)")
> When I write yes or YE
Dear all!!
I want to use subprocess for run some programs But I need to be sure the
program end before continue with the other:
subprocess.call("ls")
cmd1 = i
p1 = subprocess.Popen(cmd1,shell=True,stdout=subprocess.PIPE)
while True:
if p1.poll() is None:
time.sleep(3)
pass
if p1.poll()==0:
print
[email protected] wrote:
> I want to use subprocess for run some programs But I need to be sure the
> program end before continue with the other:
>
> subprocess.call("ls")
> cmd1 = i
> p1 = subprocess.Popen(cmd1,shell=True,stdout=subprocess.PIPE)
>
> while True:
> if p1.poll() is None:
> time.s
On 08/09/2014 18:39, Alan Gauld wrote:
On 08/09/14 15:17, Juan Christian wrote:
One tiny tweak...
class User():
You don't need the parens after User. You don;t have any superclasses
so they do nothing. Python convention for an empty parent list is just
to leave the parens off:
class User
On Tue, Sep 9, 2014 at 9:09 AM, Sydney Shall wrote:
> And while I am writing, what does OP stand for in this list?
"Original Poster". So I understand. Won't answer the Python question
since I'm a newbie here myself.
--
Mind on a Mission
___
Tutor mai
On 09/09/2014 11:45 AM, Peter Otten wrote:
[email protected] wrote:
I want to use subprocess for run some programs But I need to be sure the
program end before continue with the other:
subprocess.call("ls")
cmd1 = i
p1 = subprocess.Popen(cmd1,shell=True,stdout=subprocess.PIPE)
while True:
if
Sydney Shall wrote:
> On 08/09/2014 18:39, Alan Gauld wrote:
>> On 08/09/14 15:17, Juan Christian wrote:
>>
>> One tiny tweak...
>>
>>> class User():
>>
>> You don't need the parens after User. You don;t have any superclasses
>> so they do nothing. Python convention for an empty parent list is jus
On Mon, Sep 8, 2014 at 5:58 AM, Peter Otten <[email protected] >
wrote:
>
> PS: This is not about being pythonic, but it might be more convenient for
> client code if you use datetime objects instead of timestamps:
>
> >>> import datetime
> >>> last_logoff = datetime.datetime.utcfromtimestamp(14100
On 09/09/2014 15:44, Peter Otten wrote:
Sydney Shall wrote:
On 08/09/2014 18:39, Alan Gauld wrote:
On 08/09/14 15:17, Juan Christian wrote:
One tiny tweak...
class User():
You don't need the parens after User. You don;t have any superclasses
so they do nothing. Python convention for an emp
On Tue, Sep 9, 2014 at 10:02 AM, Sydney Shall wrote:
> On 09/09/2014 15:44, Peter Otten wrote:
>
> Sydney Shall wrote:
>
> On 08/09/2014 18:39, Alan Gauld wrote:
>
> On 08/09/14 15:17, Juan Christian wrote:
>
> One tiny tweak...
>
> class User():
>
> You don't need the parens after User. You don;t
Wolfgang Maier wrote:
> On 09/09/2014 11:45 AM, Peter Otten wrote:
>> [email protected] wrote:
>>
>>> I want to use subprocess for run some programs But I need to be sure the
>>> program end before continue with the other:
>>>
>>> subprocess.call("ls")
>>> cmd1 = i
>>> p1 = subprocess.Popen(cmd1,
>> so they do nothing. Python convention for an empty parent list is just
>> to leave the parens off:
>>
>> class User:
>>
>A simple question from a newbie, in response to this surprise.
>Is it not helpful to always put (object) as the parent, if the class is
>not it
On 09/09/2014 16:05, Joel Goldstick wrote:
On Tue, Sep 9, 2014 at 10:02 AM, Sydney Shall wrote:
On 09/09/2014 15:44, Peter Otten wrote:
Sydney Shall wrote:
On 08/09/2014 18:39, Alan Gauld wrote:
On 08/09/14 15:17, Juan Christian wrote:
One tiny tweak...
class User():
You don't need the pa
Forwarding to tutor.
-- Forwarded message --
From: "Felisha Lawrence"
Date: Sep 9, 2014 6:56 AM
Subject: Re: [Tutor] Output 'Strings' to directory
To: "Danny Yoo"
Cc:
> So, I ran the following code
>
>
> import os
>
> path = '/Users/felishalawrence/testswps/vol1'
> for file in os
Felisha, please use reply to all. I'm at work at the moment; can't
look at your question. Thanks!
Forwarding to tutor.
-- Forwarded message --
From: Felisha Lawrence
Date: Tue, Sep 9, 2014 at 8:53 AM
Subject: Re: [Tutor] Fwd: Re: Output 'Strings' to directory
To: Danny Yoo
A
On 09/09/14 14:44, Peter Otten wrote:
Is it not helpful to always put (object) as the parent, if the class is
not itself a sub-class?
The answer differs between Python 2 and 3. In Python 3
class C: # preferred in Python 3
pass
Apologies, I should have mentioned that. I've been using P
From: Felisha Lawrence
Date: Tue, Sep 9, 2014 at 8:53 AM
Subject: Re: [Tutor] Fwd: Re: Output 'Strings' to directory
To: Danny Yoo
Also,
I had this code working
import os
path = '/Users/felishalawrence/testswps/vol1'
for file in os.listdir(path):
newFile = file[:file.index("v")]+"v2
Hello,
I am not an advanced programmer, but am very good with keyboard and find
using tabs for syntax and formatting very helpful. But in this list and
other python documentation i have repeatedly seen people recommending
use of spaces.
I know that i can use any of them and use tabs as my prefe
Thanks! Thats exactly what my problem was. I fixed it
On Tue, Sep 9, 2014 at 12:57 PM, Alan Gauld
wrote:
> From: Felisha Lawrence
>> Date: Tue, Sep 9, 2014 at 8:53 AM
>> Subject: Re: [Tutor] Fwd: Re: Output 'Strings' to directory
>> To: Danny Yoo
>>
>>
>> Also,
>> I had this code working
>>
>>
On Tue, Sep 9, 2014 at 8:27 AM, Mirage Web Studio wrote:
>
> Hello,
>
> I am not an advanced programmer, but am very good with keyboard and find
> using tabs for syntax and formatting very helpful. But in this list and
> other python documentation i have repeatedly seen people recommending
> use o
On Sep 9, 2014, at 8:27 AM, Mirage Web Studio wrote:
>
> Hello,
>
> I am not an advanced programmer, but am very good with keyboard and find
> using tabs for syntax and formatting very helpful. But in this list and
> other python documentation i have repeatedly seen people recommending
> use of
> I am not an advanced programmer, but am very good with keyboard and find
> using tabs for syntax and formatting very helpful. But in this list and
> other python documentation i have repeatedly seen people recommending
> use of spaces.
Usually, you want to match the style used by the majority o
On 09/09/14 13:27, Mirage Web Studio wrote:
would like to understand why hitting the poor keyboard 4/8/12 times is
preferred than just hitting it 1/2/3 times.
Its not, as others have already said, you set the tab
key to insert spaces. Of course you usually have to delete
those spaces manually
Sorry to bother you all with what you might consider trivia, but someone in my
course forum posted this statement:
"I have never seen or heard of real uses of recursion except for proving
cleverness,"
so I thought I would ask you all if that is true. Is it really not used in
real world appli
On Tue, Sep 9, 2014 at 7:27 AM, Mirage Web Studio wrote:
>
> Hello,
>
> I am not an advanced programmer, but am very good with keyboard and find
> using tabs for syntax and formatting very helpful. But in this list and
> other python documentation i have repeatedly seen people recommending
> use o
Thank you and everybody else for the reply.
I am using pycharm and i have found the way to produce four spaces for
single tab key press.
George
On 10-Sep-14 2:32 AM, Danny Yoo wrote:
I am not an advanced programmer, but am very good with keyboard and find
using tabs for syntax and formatt
Sorry, forgot to reply to all.
-- Forwarded message --
From: "Danny Yoo"
Date: Sep 9, 2014 10:10 PM
Subject: Re: [Tutor] Real world use of recursion
To: "Deb Wyatt"
Cc:
>
> On Sep 9, 2014 8:07 PM, "Deb Wyatt" wrote:
> >
> > Sorry to bother you all with what you might consider t
Hi Deb,
For good training on recursion, I can't think of better material than:
http://www.ccs.neu.edu/home/matthias/HtDP2e/
___
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/t
On 10/09/14 03:56, Deb Wyatt wrote:
"I have never seen or heard of real uses of recursion except for proving
cleverness,"
so I thought I would ask you all if that is true. Is it really not used in
real world applications?
Its often used in prototyping and then converted to non-recursive
s
31 matches
Mail list logo