Hi all,
I'm working on my first object-based-from-the-ground-up project, and I
have some queries.
http://www.rafb.net/paste/results/lDUmWS78.html
Here are my two classes here. For each different function, search,
edit, view, etc. a different SQL operation will take place, and a
different child
Liam Clarke wrote:
Hi all,
I'm working on my first object-based-from-the-ground-up project, and I
have some queries.
http://www.rafb.net/paste/results/lDUmWS78.html
Here are my two classes here. For each different function, search,
edit, view, etc. a different SQL operation will take place, and a
d
Thanks Guys,
Guess I have to look once more into decorator functions - and guess it's worth
doing so. Anyway:
My problem is solved.
Cheers
Christian
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi all,
I'm trying to figure out how to subclass the list built-in.
.>>> class my_list(list):
def __init__(self, sequence=None):
list.__init__(self, sequence)
self.spam = 1
.>>> mine = my_list((1,2,3,4))
.>>> mine.append(42)
.>>> mine
[1, 2, 3, 4,
Liam Clarke wrote:
Hi all,
I'm working on my first object-based-from-the-ground-up project, and I
have some queries.
http://www.rafb.net/paste/results/lDUmWS78.html
Here are my two classes here. For each different function, search,
edit, view, etc. a different SQL operation will take place, and a
d
On 22 Feb 2005, [EMAIL PROTECTED] wrote:
> I'm trying to figure out how to subclass the list built-in.
>
> .>>> class my_list(list):
> def __init__(self, sequence=None):
> list.__init__(self, sequence)
> self.spam = 1
>
> .>>> mine = my_list((1,2,3
Brian van den Broek wrote:
Hi all,
I'm trying to figure out how to subclass the list built-in.
.>>> class my_list(list):
def __init__(self, sequence=None):
list.__init__(self, sequence)
self.spam = 1
.>>> mine = my_list((1,2,3,4))
.>>> mine.append(42)
.>>>
On Mon, 21 Feb 2005 13:21:35 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote:
> How far does it get? How do you know?
>
> I would put some debug print statements in. Also you should call sk.close()
> in the else clause of
> scan(). Finally, I don't think you will see any output in the result window
Mark Kels wrote:
On Mon, 21 Feb 2005 13:21:35 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote:
How far does it get? How do you know?
I would put some debug print statements in. Also you should call sk.close() in the else clause of
scan(). Finally, I don't think you will see any output in the resul
Hello list,
I've encountered an (at least for me) weird error in the project I'm working on
(see the traceback below).
Unfortunately there are several of my application's modules involved, so I
cannot post all of my code here.
I hope I can explain in plain words what I'm doing.
The line in the
Mark Kels wrote:
On Mon, 21 Feb 2005 13:21:35 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote:
How far does it get? How do you know?
I would put some debug print statements in. Also you should call sk.close() in
the else clause of
scan(). Finally, I don't think you will see any output in the result
Karl Pflästerer said unto the world upon 2005-02-22 07:53:
On 22 Feb 2005, [EMAIL PROTECTED] wrote:
I'm trying to figure out how to subclass the list built-in.
.>>> class my_list(list):
def __init__(self, sequence=None):
list.__init__(self, sequence)
self.spam = 1
like...
number1 = raw_input(float int("Number1: ")
But, I think error will occur...
Cheers! :)
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
On Tue, 22 Feb 2005, . , wrote:
> like...
>
> number1 = raw_input(float int("Number1: ")
>
> But, I think error will occur...
You have some syntax issues here.
What you want, I think, is to use raw_input to get input, and then convert
that to float. try this:
number1 = float(raw_input("Numb
Hi .,,
An error will certainly occur (you should always try it and see).
You could do something like:
n = raw_input("Number1: ")
try: number1 = int(n)
except ValueError: number1 = float(n)
This will make number1 an integer if possible, and a float otherwise.
But (and wiser heads may correct me
> Message: 2
> Date: Tue, 22 Feb 2005 13:53:44 +0100
> From: [EMAIL PROTECTED] (Karl Pfl?sterer )
> Subject: Re: [Tutor] subclassing list -- slicing doesn't preserve type
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-ascii
>
> On 22 Feb 2005, [EMA
Hi,
Is there a way to terminate a thread from another
thread?
Shitiz
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
Tutor maillist - Tutor@
If I recall correctly, there is not a direct way. Instead, you're
going to want to have your worker thread check a queue it shares with
the parent every so often to see if the supervisor thread has sent a
"quit" message to it.
Peace
Bill Mill
bill.mill at gmail.com
On Tue, 22 Feb 2005 14:23:17 -
Michael Lange"<[EMAIL PROTECTED]> wrote:
>Hello list,
>
[Snip]
This part of the error is saying what the problem is.
>UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 22:
ordinal not in range(128)
Thatthe ascii codec that's being used can't decode any ascii code
Forgot something in previOuse post.
You can set the defualt encoding to something other then 'ascii'.
This is done with the function Qsys.setdefualtencoding('mbcs')".
I think that this has to be done in the module sitecostomize, because the
function is deleted after the module site is run. And t
> > > I'm trying to figure out how to subclass the list built-in.
>
> > You could do it e.g. like that:
> >
> > class Mylist (list):
> > def __init__(self, seq=None):
> > super(self.__class__, self).__init__(seq)
> > def __getslice__(self, start, stop):
> > return self.__cl
On Feb 22, 2005, at 23:08, Bill Mill wrote:
If I recall correctly, there is not a direct way. Instead, you're
going to want to have your worker thread check a queue it shares with
the parent every so often to see if the supervisor thread has sent a
"quit" message to it.
Peace
Bill Mill
bill.mill at
Max Noel wrote:
On Feb 22, 2005, at 23:08, Bill Mill wrote:
If I recall correctly, there is not a direct way. Instead, you're
going to want to have your worker thread check a queue it shares with
the parent every so often to see if the supervisor thread has sent a
"quit" message to it.
Peace
Bill M
Kia ora,
>
> I'm not really sure what you are trying to do, the code is pretty sketchy. It
> looks like you want to
> have a bunch of queries on your dataset, and the result of each query is
> displayed in a window. Is
> that right? Assuming it is, I'll continue...
What I'm doing here is ver
24 matches
Mail list logo