the problem is in the return.
if you append a print statement to the class function
such as
print "number is ",number # (properly indented, of course)
you'll get 8
On May 12, 2007, at 5:11 PM, John Fouhy wrote:
> On 13/05/07, Marilyn Davis <[EMAIL PROTECTED]> wrote:
>> #!/usr/bin/env python
there's also the question of the delivery architecture:
if there are multiple machines in a clustered
configuration, even something such as DNS round
robin, then improving performance is a matter of
throwing machines at the front end.
On May 9, 2007, at 1:17 PM, Alan Gauld wrote:
>
> "OkaMth
I'm geting the following error message and I'm stumped
Traceback (most recent call last):
File "C:\markets\source\QuantScan\QuantScan4_3.py", line 1362, in
db.close()
sqlite3.OperationalError: Unable to close due to unfinalised statements
Here 's the relevant code
db = sqlite.conn
no need for apology on my side. there's
no agreed-upon and expressed policy.
i like the model that we accept each
other as we are.
On Jan 20, 2007, at 7:10 AM, Karl Wittgenstein wrote:
> Sorry for the swear words...
>
> 2007/1/20, Kent Johnson <[EMAIL PROTECTED]>: Karl Wittgenstein w
so it's guaranteed that
'Writing Message to'
will always be followed by
'TRANSPORT_STREAM_ID'
before the next occurrence of
'Writing Message to'
and all text between can be ignored,
and we increment the counter if and only if
there is a newline immediately after
'TRANSPORT_STREAM_I
from
http://docs.python.org/lib/built-in-funcs.html
some functions are always available--the built-in functions.
(from elsewhere) everything in python is an object.
hey, from abs() to zip() there's type() and super() and str()
and setattr() and ... dir() and... they're the
t; Now I want to select ''GeneName ' into listA
> and 'ATTAAGGCCAA' into listB
>
> so I want to select 0,3,6,9 elements into listA
> and 2,5,8,11 and so on elements into listB
>
> then I can do dict(zip(listA,listB))
>
> however, the ve
keep a counter in your loop. is this a homework question?
On Sep 23, 2006, at 8:34 AM, kumar s wrote:
> hi,
>
> the reason could be that I did not quite understand
> the concept of looping
>
> I have a list of 48 elements
>
> I want to create another two lists , listA and listB
>
> I want to loo
i hope this helps: what a fun idea! do it!
my way is to do a bad job fast then re-visit the
plans and reimplement and test and re-visit and
reimplement and test and
consider writing a main program that does the
primary work and outputs as text-only.
maybe then create four clas
i think it's a mistake to concentrate on one book.
Cull responses and pick three books to start with.
The benefit is that where one book presents a
poor explanation, another will do a good job (and
one book will omit certain things that another
presents).
Also, you'll probably find you
y way of
explaining my avoidance above. Might help
to know I very much liked working in assembler
and infer possible assembler correspondences
when I wonder about code behavior.
Your rundown of search order is helpful.
more thanks.
jim
On Aug 14, 2006, at 7:52 PM, Luke Paireepinart wrote:
For example,
import os
import sys
My take is that one uses the import keyword in a
program.
The Python interpreter reads the program and
generates machine code.
The import keyword directs the Python interpreter
to find some library (which is not necessarily named,
certainly not necess
Danny Yoo wrote:
>On Sat, 13 Aug 2005, Jim Roush wrote:
>
>
>
>>I have a python script that creates a list of lists like so:
>>
>>Quant.append( [ db_ticker, stock_close, MTD, 0, QTD, 0, YTD, 0, 0, 0 ] )
>>
>>After Quant is created, I want to sort
I have a python script that creates a list of lists like so:
Quant.append( [ db_ticker, stock_close, MTD, 0, QTD, 0, YTD, 0, 0, 0 ] )
After Quant is created, I want to sort it by MTD. If I use a simple
Quant.sort(), I assume its going to sort by 'db_ticker' which is not
what I want.
I've
I'm getting the following error message:
AttributeError: 'tuple' object has no attribute 'seek'
below is the code that produced the error. The line in question is
marked with arrow in the left margin. Any help would be appreciated.
def build_sp500_rand():
sp500_csv = open('c:/indic
i = raw_input("Enter a word.")
print i[::-1]
raw_input("\n\nPress the enter key to exit.")
Thanks for allowing me to take some of your precious time.
Jim
- Original Message -
From:
Danny Yoo
To: [EMAIL PROTECTED]
Cc: Tutor
Sent: Thursday,
Jim and Laura Ahl said unto the world upon 2005-04-14 02:09:> How
come when I ask it to print i[2:4] from an inputted string it> gives me
the letters between two and four> > But when I ask it to print
i[-1:-4] it does not print anything.> > Jim> Hi
Jim,good to see you
How come when I ask it to print i[2:4] from an inputted string it
gives me the letters between two and four
But when I ask it to print i[-1:-4] it does not print anything.
Jim
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman
cookie program that randomly gives one fortune out of 5 to the
user.
Jim
- Original Message -
From:
Feziwe Mpondo
To: Alberto Troiano
Cc: [EMAIL PROTECTED] ; tutor@python.org
Sent: Wednesday, April 13, 2005 10:14
AM
Subject: Re: [Tutor] Python backwards
progr
I am very new to programming and I have an assignment to have a raw_input
string that is inputted by the user and then is printed backwards.
Can anyone help me? I can get it to print regular but backwards in not
working.
Thank You
Jim
i had the same probblem with xp.
on mac os x i can double click on the file and it will
open.
xp opens the python file and closes it immediately
apon double click
open the python file via the Start Menu in xp.
Then hit f5 and the script will run
jk
nj
--- [EMAIL PROTECTED] wrote:
> Send T
This script did not run properly
jk
nj
--- [EMAIL PROTECTED] wrote:
> Send Tutor mailing list submissions to
> tutor@python.org
>
> To subscribe or unsubscribe via the World Wide Web,
> visit
> http://mail.python.org/mailman/listinfo/tutor
> or, via email, send a message with subjec
501 - 522 of 522 matches
Mail list logo