On Sun, Apr 05, 2015 at 01:11:06PM +0200, Marcus Lütolf wrote:
> Why do I get this traceback with the infinite loop below but not with the
> definitw loop (bottom of mail)?
You forgot to show the definite loop, but the error in the infinite loop
is explained by the error message. You should read
On 05/04/15 12:11, Marcus Lütolf wrote:
Why do I get this traceback with the infinite loop below but not with the
definitw loop (bottom of mail)?
I don;t see anyt loops at the bottom.
But as for this one...
count = 0
total = 0
while True:
x = raw_input('Enter a number')
raw_input read
On 05/04/2015 12:11, Marcus Lütolf wrote:
Why do I get this traceback with the infinite loop below but not with the
definitw loop (bottom of mail)?
Thanks for help, Marcus.
count = 0
total = 0
while True:
x = raw_input('Enter a number')
count = count + 1
total = total + x
pr
Reed DA (Danny) at Aera wrote:
> I have a matrix which contains temperatures. The columns are time, spaced
> 33 seconds apart, and the rows are depth intervals. What I'm trying to do
> is create another matrix that contains the rate of change of temperature
> for each depth. The array is called LS
Alan Gauld wrote:
On 30/08/11 00:26, Emile van Sebille wrote:
delta_temp(i,j) = (LS_JULY_11(i,j) - LS_JULY_11(i,j-1))/TIME_STEP
delta_temp access and assignment likely wants to be expressed with
brackets rather than parens.
And for those not speaking the US variant of English that'll be squ
On 30/08/11 00:26, Emile van Sebille wrote:
delta_temp(i,j) = (LS_JULY_11(i,j) - LS_JULY_11(i,j-1))/TIME_STEP
delta_temp access and assignment likely wants to be expressed with
brackets rather than parens.
And for those not speaking the US variant of English that'll be square
brackets as op
On 8/29/2011 3:28 PM Reed DA (Danny) at Aera said...
Hi all,
I have a matrix which contains temperatures. The columns are time,
spaced 33 seconds apart, and the rows are depth intervals. What I'm
trying to do is create another matrix that contains the rate of change
of temperature for each depth
Hi Danny,
Most likely you want
delta_temp(i,j) = (LS_JULY_11(i,j) -
LS_JULY_11(i,j-1))/TIME_STEP
to become (changed the character from '()' to '[]':
delta_temp[i,j] = (LS_JULY_11(i,j) -
LS_JULY_11(i,j-1))/TIME_STEP
Basically it t
On 12/9/2009 3:18 AM, Rich Lovely wrote:
2009/12/8 spir:
This, of course is a rather dirty, implementation (and probably
version) specific hack, but I can /calculate/ the sequence, using just
one line:
print " ".join(str(i) for i in [x if x<2 else
(locals()['_[1]'][-1]+locals()['_[1]'][-2]) f
2009/12/8 spir :
> Lie Ryan dixit:
>
>> On 12/8/2009 9:39 PM, Dave Angel wrote:
>> > Richard Hultgren wrote:
>> >> a = 0
>> >> b = 1
>> >> count = 0
>> >> max_count = 20
>> >> while count < max_count:
>> >> count = count + 1
>> >> # we need to keep track of a since we change it
>> >> old_a = a # e
Lie Ryan dixit:
> On 12/8/2009 9:39 PM, Dave Angel wrote:
> > Richard Hultgren wrote:
> >> a = 0
> >> b = 1
> >> count = 0
> >> max_count = 20
> >> while count < max_count:
> >> count = count + 1
> >> # we need to keep track of a since we change it
> >> old_a = a # especially here
> >> old_b = b
On 12/8/2009 9:39 PM, Dave Angel wrote:
Richard Hultgren wrote:
a = 0
b = 1
count = 0
max_count = 20
while count < max_count:
count = count + 1
# we need to keep track of a since we change it
old_a = a # especially here
old_b = b
a = old_b
b = old_a + old_b
# Notice that the , at the end of a pr
Richard Hultgren wrote:
a = 0
b = 1
count = 0
max_count = 20
while count < max_count:
count = count + 1
# we need to keep track of a since we change it
old_a = a# especially here
old_b = b
a = old_b
b = old_a + old_b
# Notice that the , at the end of a
Is there a question here?
Please skip the giant type size.
Kent
On Mon, Dec 7, 2009 at 2:53 PM, Richard Hultgren wrote:
> a = 0
> b = 1
> count = 0
> max_count = 20
> while count < max_count:
> count = count + 1
> # we need to keep track of a since we change it
> old_a = a
Norman Khine wrote:
hello,
i have the following code:
Uhh... 5 levels deep of nesting, and from the hint that you used
self.blah earlier this is inside a class which adds a minimum of two
extra levels, in total of 7 levels nesting... We're in deep trouble.
is there a way to optimise the lo
On Wed, Apr 29, 2009 at 3:05 AM, Norman Khine wrote:
> hello,
> i have the following code:
>
> if unique_id is not None:
> training = self.get_site_root()
> from training import Training
> # link back to news item
> root = context.root
> formats = ['itinerary', 'news']
> for docu
Le Wed, 29 Apr 2009 09:42:44 +0200,
"A.T.Hofkamp" s'exprima ainsi:
> Norman Khine wrote:
> > hello,
> > i have the following code:
> >
> > if unique_id is not None:
> > training = self.get_site_root()
> > from training import Training
> > # link back to news item
> > root = conte
Norman Khine wrote:
hello,
i have the following code:
if unique_id is not None:
training = self.get_site_root()
from training import Training
# link back to news item
root = context.root
formats = ['itinerary', 'news']
for document in formats:
results = root.searc
Thanks Alan.
after a few hours scratching my head I finally fixed it by removing
all the indents and remaking them in the correct position.
Payo
On Sat, Feb 14, 2009 at 1:52 AM, Alan Gauld wrote:
> "pa yo" wrote
>
>> The way I have come up with to solve this problem is to put the
>> following
"pa yo" wrote
The way I have come up with to solve this problem is to put the
following loop in:
rawfeed = feedparser(http//twitter.com/foobar)
feedstring = rawfeed.split('=',1)#this splits the feed at
the first "="
headline = feedstring[0]#this is the text
i
James wrote:
All,
I'm trying to do something pretty simple, but I can't seem to get
Python to behave nicely. :)
I'd like to automate a script that sends out three or four lists in an
e-mail. I have a function dedicated to sending e-mail that will take a
string variable, slap it in a message, an
maybe StringIO ?
MsgBody = StringIO.StringIO()
print >> MsgBody, "Hello. Below is an automated e-mail with important
statistics."
print >> MsgBody, ""#empty line
print >> MsgBody, ""#empty line
print >> MsgBody, "The following user accounts expired today:"
print >> MsgBody, " - " %
On Dec 6, 2007 8:38 AM, richard west <[EMAIL PROTECTED]> wrote:
> heres a partial solution. theres no error checking on the Raw Input and you
> have to type in you last number and press return, before the loop will
> break, but its a start!
And modifying your modifications makes it work even a l
heres a partial solution. theres no error checking on the Raw Input and you
have to type in you last number and press return, before the loop will
break, but its a start!
#!/usr/bin/python
# Filename : math_test.py
import time
import threading
class Timer(threading.Thread):
def __init__(self
I'm reading the gmane news archive to see what I missed
while on vacation and noticed this. Sorry the response is
so late...
"John CORRY" <[EMAIL PROTECTED]> wrote
> For example, I have 30 textentry boxes numbered from entry20 to
> entry50.
> I have used the following code to assign the entrybox
I've been on vacation so missed the start of this, apologies
if i'm missing a point somewhere but...
> Ah. I see. A copy, eh? Or, at least a new dictionary separate
> from the "real" namespace. OK. I don't know why locals() returns
> a copy as opposed to the original,
What else can it do?
W
On Sat, Jul 22, 2006 at 01:41:17PM -0400, Kent Johnson wrote:
> Dave Kuhlman wrote:
[snip]
> > And, also, that's why the following statements all have exactly
> > the same effect:
> >
> > total = 5
> > locals()['total'] = 5
> > exec('total = 5')
>
> You're not in the mood to believe
Dave Kuhlman wrote:
> On Sat, Jul 22, 2006 at 11:37:38AM -0400, Python wrote:
>
>>
>> Well the reference documentation says:
>>
>> locals(
>> )
>> Update and return a dictionary representing the current local
>> symbol table. Warning: The contents of this dictionary should
>>
On Sat, Jul 22, 2006 at 11:37:38AM -0400, Python wrote:
> On Sat, 2006-07-22 at 17:18 +0200, Karl Pflästerer wrote:
> > On 22 Jul 2006, [EMAIL PROTECTED] wrote:
> >
> > >
> > > On Sat, 2006-07-22 at 14:11 +0100, John CORRY wrote:
> > >> Hi,
> > >>
> > >> I am refactoring my code. I am trying to
On Sat, 2006-07-22 at 17:18 +0200, Karl Pflästerer wrote:
> On 22 Jul 2006, [EMAIL PROTECTED] wrote:
>
> >
> > On Sat, 2006-07-22 at 14:11 +0100, John CORRY wrote:
> >> Hi,
> >>
> >> I am refactoring my code. I am trying to reduce the amount of lines
> >> by using more loops. I tend to use cop
On 22 Jul 2006, [EMAIL PROTECTED] wrote:
>
> On Sat, 2006-07-22 at 14:11 +0100, John CORRY wrote:
>> Hi,
>>
>> I am refactoring my code. I am trying to reduce the amount of lines
>> by using more loops. I tend to use copy and paste a lot instead of
>> writing a loop to do the work.
>>
>> For
On Sat, 2006-07-22 at 14:11 +0100, John CORRY wrote:
> Hi,
>
> I am refactoring my code. I am trying to reduce the amount of lines
> by using more loops. I tend to use copy and paste a lot instead of
> writing a loop to do the work.
>
> For example, I have 30 textentry boxes numbered from ent
32 matches
Mail list logo