Re: How much memory used by a name

2007-02-14 Thread placid
On Feb 15, 11:08 am, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Bernard Lebel a écrit : > > > Diez: thanks, I will try that. However isn't sum() returning an > > integer that here would represent the number of elements? > > Nope, it will return the sum of the length of the lines in the list.

Method overloading?

2007-02-14 Thread placid
Hi all, Is it possible to be able to do the following in Python? class Test: def __init__(self): pass def puts(self, str): print str def puts(self, str,str2): print str,str2 if __name__ == "__main__": t = Test() t.puts("hi") t.puts("hi","hello")

Re: Method overloading?

2007-02-14 Thread placid
On Feb 15, 4:04 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-02-15, placid <[EMAIL PROTECTED]> wrote: > > > > > Is it possible to be able to do the following in Python? > > > class Test: > > def __init__(self): > > pass &

Re: Method overloading?

2007-02-15 Thread placid
On Feb 16, 3:37 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-02-15, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > >> def multiAccept( argOfVariousTypes ): > >> if isinstance(argOfVariousTypes,int): > >> # treat like an int > >> elif isinstance(argOfVariousTypes,float): > >

cmd all commands method?

2007-02-17 Thread placid
Hi all, if i want to treat every cmdloop prompt entry as a potential command then i need to overwrite the default() method ? What i want to achieve is to be able to support global variable creation for example; res = sum 1 2 this would create a variable res with the result of the method do_sum(

Re: cmd all commands method?

2007-02-17 Thread placid
placid wrote: > Hi all, > > if i want to treat every cmdloop prompt entry as a potential command > then i need to overwrite the default() method ? > > What i want to achieve is to be able to support global variable > creation for example; > > res = sum 1 2 > >

Re: cmd all commands method?

2007-02-18 Thread placid
On Feb 18, 7:17 pm, "Michele Simionato" <[EMAIL PROTECTED]> wrote: > On Feb 17, 11:44 pm, Bjoern Schliessmann > > > [EMAIL PROTECTED]> wrote: > > placid wrote: > > > if i want to treat every cmdloop prompt entry as a potential > > >

Re: cmd all commands method?

2007-02-18 Thread placid
On Feb 18, 8:59 pm, "Michele Simionato" <[EMAIL PROTECTED]> wrote: > On Feb 18, 10:49 am, "placid" <[EMAIL PROTECTED]> wrote: > > > On Feb 18, 7:17 pm, "Michele Simionato" <[EMAIL PROTECTED]> > > > > Yes, he is talking abo

Re: What is more efficient?

2007-02-18 Thread placid
On Feb 19, 2:17 pm, Karlo Lozovina <[EMAIL PROTECTED]> wrote: > Let's say I have a class with few string properties and few integers, and > a lot of methods defined for that class. > > Now if I have hundreds of thousands (or even more) of instances of that > class - is it more efficient to remove t

Re: What is more efficient?

2007-02-18 Thread placid
On Feb 19, 4:38 pm, Gary Herron <[EMAIL PROTECTED]> wrote: > Karlo Lozovina wrote: > > Let's say I have a class with few string properties and few integers, and > > a lot of methods defined for that class. > > > Now if I have hundreds of thousands (or even more) of instances of that > > class - is

Re: getting a thread out of sleep

2007-02-20 Thread placid
On Feb 21, 3:08 pm, mark <[EMAIL PROTECTED]> wrote: > Right now I have a thread that sleeps for sometime and check if an > event has happened and go back to sleep. Now instead I want the thread > to sleep until the event has occured process the event and go back to > sleep. How to do this? > thank

Re: getting a thread out of sleep

2007-02-20 Thread placid
On Feb 21, 4:12 pm, mark <[EMAIL PROTECTED]> wrote: > On 20 Feb 2007 20:47:57 -0800, placid <[EMAIL PROTECTED]> wrote: > > > On Feb 21, 3:08 pm, mark <[EMAIL PROTECTED]> wrote: > > > Right now I have a thread that sleeps for sometime and check if an > &

Re: getting a thread out of sleep

2007-02-20 Thread placid
On Feb 21, 4:21 pm, "placid" <[EMAIL PROTECTED]> wrote: > On Feb 21, 4:12 pm, mark <[EMAIL PROTECTED]> wrote: > > > > > On 20 Feb 2007 20:47:57 -0800, placid <[EMAIL PROTECTED]> wrote: > > > > On Feb 21, 3:08 pm, mark <[EMAIL PROTECTE

Re: getting a thread out of sleep

2007-02-21 Thread placid
On Feb 22, 3:23 am, mark <[EMAIL PROTECTED]> wrote: > On 20 Feb 2007 21:26:18 -0800, placid <[EMAIL PROTECTED]> wrote: > > > > > On Feb 21, 4:21 pm, "placid" <[EMAIL PROTECTED]> wrote: > > > On Feb 21, 4:12 pm, mark <[EMAIL PROTECTED]>

Re: getting a thread out of sleep

2007-02-21 Thread placid
On Feb 22, 10:20 am, mark <[EMAIL PROTECTED]> wrote: > On 21 Feb 2007 14:47:50 -0800, placid <[EMAIL PROTECTED]> wrote: > > > > > On Feb 22, 3:23 am, mark <[EMAIL PROTECTED]> wrote: > > > On 20 Feb 2007 21:26:18 -0800, placid <[EMAIL PROTECTE

Re: getting a thread out of sleep

2007-02-21 Thread placid
On Feb 22, 12:08 pm, mark <[EMAIL PROTECTED]> wrote: > On 21 Feb 2007 16:10:51 -0800, placid <[EMAIL PROTECTED]> wrote: > > > On Feb 22, 10:20 am, mark <[EMAIL PROTECTED]> wrote: > > > On 21 Feb 2007 14:47:50 -0800, placid <[EMAIL PROTECTED]> wrot

ANN: PyInkblot - Creating Rorschach Inkblots using Genetic Algorithms

2007-11-15 Thread placid
Hi All, I've been working on a 'toy' application for the past month or so called PyInkblot. Simply mirroring a random plotting of half of a grid onto the second half, you can create pictures that look 'organic' like Rorschach Inkblot's. PyInkblot uses pygene for the Genetic Algorithm backend and

Re: ANN: PyInkblot - Creating Rorschach Inkblots using Genetic Algorithms

2007-11-15 Thread placid
On Nov 16, 1:47 am, SamFeltus <[EMAIL PROTECTED]> wrote: > I suspect you could make it visually far more interesting if you > replaced the colored pixels with colorful images, and mapped the I'm already planning of using images instead of coloured blocks. But first i want to try using a gradient f

MySQLdb

2006-04-23 Thread placid
Hi all, Does anyone have binary for MySQLdb (python 2.4.3, MySQL 5.0a) ? Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb

2006-04-23 Thread placid
[EMAIL PROTECTED] wrote: > placid> Does anyone have binary for MySQLdb (python 2.4.3, MySQL 5.0a) ? > > Platform? Last I checked a few weeks ago, MySQLdb didn't yet work with > MySQL 5.0. > > Skip Sorry about that , im using Windows XP... -- http://mail.python.o

cmd module "busy waiter" ?

2006-04-23 Thread placid
Hi all, Just wondering if the cmd module in python uses "busy waiting" for "polling" user command input as this is inefficient. Cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: cmd module "busy waiter" ?

2006-04-25 Thread placid
Dennis Lee Bieber wrote: > On 23 Apr 2006 23:49:51 -0700, "placid" <[EMAIL PROTECTED]> declaimed the > following in comp.lang.python: > > > Just wondering if the cmd module in python uses "busy waiting" for > > "polling" user command

Re: Converstion

2006-04-27 Thread placid
Chris wrote: > In a program I'm writing I have a problem where a bit of text sent over > a network arrives at my server. If the person who sent the text made a > mistake typing the word and pressed backspace the backspace code is > included in the word for example hello is hel\x08lo. The \x08 is t

Re: Can I use python for this .. ??

2006-05-04 Thread placid
Petr Jakes wrote: > Why using Python? > What about? > 1. Open Power Options in Control Panel. (Click Start, click Control > Panel, and then double-click Power Options.) > 2.Click the Hibernate tab, select the Enable hibernate support check > box, and then click Apply. > (If the Hibernate tab is un

Re: Can I use python for this .. ??

2006-05-07 Thread placid
Terry Reedy wrote: > "placid" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > .) > > > > When you hibernate/boot up/hibernate for a long time without a clean > > reboot, Windows becomes unstable... > > This seems to depend on the

Threads

2006-05-11 Thread placid
Hi all, In Python, Threads cannot be paused, i remember reading this somewhere, so is there a way around this ? TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads

2006-05-11 Thread placid
Carl J. Van Arsdall wrote: > placid wrote: > > Hi all, > > > > In Python, Threads cannot be paused, i remember reading this somewhere, > > so is there a way around this ? > > > > When you say paused do you mean paused by an external source or paused > by

Re: Threads

2006-05-11 Thread placid
David Reed wrote: > On May 11, 2006, at 8:02 PM, placid wrote: > > > > > Carl J. Van Arsdall wrote: > >> placid wrote: > >>> Hi all, > >>> > >>> In Python, Threads cannot be paused, i remember reading this > >>> somewhere

Re: Threads

2006-05-12 Thread placid
Dennis Lee Bieber wrote: > On 11 May 2006 17:02:51 -0700, "placid" <[EMAIL PROTECTED]> declaimed the > following in comp.lang.python: > > > > I have a thread that has a job Queue, it continuosly polls this queue > > to see if there are any jobs for it, wh

Re: Threads

2006-05-12 Thread placid
Sybren Stuvel wrote: > placid enlightened us with: > >>Did you read the documentation for Queue methods? > > > > there is no need to be patronizing about this dude, im just learning > > Python in my spare time, as im a Intern Software Engineer > > Th

Re: Threads

2006-05-14 Thread placid
Dennis Lee Bieber wrote: > On Fri, 12 May 2006 14:30:12 -, Grant Edwards <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > On 2006-05-12, Sybren Stuvel <[EMAIL PROTECTED]> wrote: > > > placid enlightened us with: > > >>&g

Windows Copy Gui

2006-05-14 Thread placid
Hi all, Just wondering if anyone knows how to pop up the dialog that windows pops up when copying/moving/deleting files from one directory to another, in python ? Cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows Copy Gui

2006-05-15 Thread placid
Tim Golden wrote: > [placid] > > | Just wondering if anyone knows how to pop up the dialog that windows > | pops up when copying/moving/deleting files from one directory to > | another, in python ? > > http://timgolden.me.uk/python/win32_how_do_i/copy-a-file.html#shell tha

import help

2006-04-10 Thread placid
Hi all, I have the following class code for a Node for a Linked List, (saved in node.py) class Node : def __init__(self,element): self.element = element self.next = None then i have another module called LinkedList.py, with following code import sys import node def main():

Re: import help

2006-04-10 Thread placid
Scott David Daniels wrote: > placid wrote: > > I have the following class code for a Node for a Linked List, (saved in > > node.py) > > > > class Node : > > def __init__(self,element): > >self.element = element > >self.next = N

Re: import help

2006-04-10 Thread placid
so there is a record of this problem i had, to solve this problem either use import node . . . n = node.Node("test") or from node import * . . . n = Node("test") Cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: import help

2006-04-10 Thread placid
Dennis Lee Bieber wrote: > On 10 Apr 2006 20:55:31 -0700, "placid" <[EMAIL PROTECTED]> declaimed the > following in comp.lang.python: > > > > > > Traceback (most recent call last): > > File "LinkedList.py", line 7, in ? > >

<    1   2