why cannot assign to function call

2008-12-28 Thread scsoce
I have a function return a reference, and want to assign to the reference, simply like this: def f(a) return a b = 0 * f( b ) = 1* but the last line will be refused as can't assign to function call. In my thought , the assignment is very nature, but why the interpreter refused

how to get all repeated group with regular expression

2008-11-21 Thread scsoce
say, when I try to search and match every char from variable length string, such as string '123456', i tried re.findall( r'(\d)*, '12346' ) , but only get '6' and Python doc indeed say: If a group is contained in a part of the pattern that matched multiple times, the last match is returned.

Re: Re: how to get all repeated group with regular expression

2008-11-21 Thread scsoce
MRAB wrote: div class=moz-text-flowed style=font-family: -moz-fixedSteve Holden wrote: Please keep this on the list. scsoce wrote: Steve Holden wrote: scsoce wrote: say, when I try to search and match every char from variable length string, such as string '123456', i tried re.findall( r

need to suspend/resume a child thread

2008-11-12 Thread scsoce
A child thread has a long-time executions, how to suspend it and resume back the orignial place ? I know it' nature to use singal, but child thread cannot get signal as Python Manual say. And i dnt like to check status variable as the long-time executions can not or be dirty to stop to do

cannot pickle object returned by urllib2.urlopen()

2008-11-11 Thread scsoce
got a exception: a class that defines __slots__ without defining __getstate__ cannot be pickled why? and is there any other dump method but for pickle to store the kind of object ? -- http://mail.python.org/mailman/listinfo/python-list

how can i profile every line of code

2008-02-21 Thread scsoce
I want to profile a function which has some lines of statement. It seem that profile module only report function's stats instead of every line of code, how can i profile every line of code? thanks. scsoce -- http://mail.python.org/mailman/listinfo/python-list

where to join a open project in Python

2008-01-21 Thread scsoce sc
hi,all: as a newbie, i found that finding a suitable open project in Python seems hard, well, i has tried sourceforge and google code, python project is just rare or not fit for me. so i want to get any suggestion or experience from you dear pythonmates. thank you scsoce -- http