On 13/02/2007 20.01, Raymond Hettinger wrote:
> FWIW, here are three ways of writing constant functions for
> collections.defaultdict():
>
> d = defaultdict(int) # slowest way; works only for zero
> d = defaultdict(lambda: 0) # faster way; works for any constant
> d = defaultdict(it
I have a piece of software I wrote some time ago using Python and the Tix
wrapper. I just upgraded to Python 2.5 and to my surprise my software no
longer functions. There's a problem with the Tix wrapper. Under a clean
install of Python the following should display an empty root window on th
UN Spons.ored Southern Vacation Packages http://vacationdestiny.blogspot.com/
@-- d
--
http://mail.python.org/mailman/listinfo/python-list
Thanks a lot.I've got it.
En Tue, 13 Feb 2007 13:01:59 -0300, <[EMAIL PROTECTED]> escribió:
> But I'm still confused that what's the "real dictionary"?I can't know
> this
> point.Please help and thanks again.
I'm talking about a Python dictionary (a "real" one, as opposed to
UserDic
On Feb 13, 2:24 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Feb 11, 4:24 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] wrote:
> >>> On Feb 11, 1:35?am, Steve Holden <[EMAIL PROTECTED]> wrote:
> [...]
>
> >>> By the way, on the sci.math newsgrou
Thanks for the help guys but I'm a newbie at this and from what I
understand from the code, it looks like you guys are using a two
dimensional array. I am not using a two dimensional array. Basically,
it looks like this:
[
[' ',' ',' ',' ',' ',' ',' ',' '],
[' ',' ',' ',' ',' ',' ',' ',' '],
[' ',
OK I just realized that a list of lists can be accessed in the same
way a 2d array would be accessed. Thanks anyways guys.
--
http://mail.python.org/mailman/listinfo/python-list
Martien Friedeman wrote:
> The size of the 'recording' is a major drawback, it was clearly not meant
> to record the processing of millions of records.
>
> I need to find a way to specify the area in the code that needs recording.
Use something like zlib and write a compressed log -- especially
w
>>> from UserDict import UserDict
>>> d = {1:2,3:4,5:6}
>>> d1 = UserDict(d)
>>> d1
{1: 2, 3: 4, 5: 6}
>>> d1.data
{1: 2, 3: 4, 5: 6}
Here why both d1 and d1.data have the same values?As shown below,they're
different types.
>>> type(d1)
>>> type(d1.data)
Please help.Thanks!
--
http
is it possible to call a php function from python and use a class from
php in python? i want to use mmslib which creates mms messages and the
only implementation is a php mmslib implementation.
thanks a lot!
mark
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I want to generate barcode based on an input which can be numbers or
numbers+alphabets.
How do I do this? Is there any library that will doo this?
thanks
mark
--
http://mail.python.org/mailman/listinfo/python-list
For those who care,
the file below should run on a unix/ linux style
system. And "xpdf", amoung others, will run a pdf
file.
import os
def Printpdf():
os.system( 'xpdf form.pdf' )
if __name__ == '__main__' :
Printpdf()
jim-on-linux
> On Tue, 13 Feb 2007 08:44:18 GMT, Jussi Salm
Here's a large Perl regular expression, from a Perl address parser in CPAN:
use re 'eval';
$Addr_Match{street} = qr/
(?:
# special case for addresses like 100 South Street
(?:($Addr_Match{direct})\W+ (?{ $_{street} = $^N })
($Addr_Mat
Thanks for that for that Scott.
Most of hassle is storing the program flow.
For example:
Iteration 3 of the loop starting on line 12 has itself a loop on line 15
that has 14 iterations.
Iteration 4 of the loop starting on line 12 has a completely different set
of iterations for the loop on line 1
This is a recurrent problem I encounter when I try to sell python solutions to
my customers. I'm aware that this problem is sometimes overlooked, but here
is the market's law.
I've heard of a bunch of arguments to defend python's choice of GIL, but I'm
not quite sure of their technical backgrou
Maric Michaud <[EMAIL PROTECTED]> writes:
> If some guru has made a good recipe, or want to resume the main points it
> would be really appreciated.
Basically Python applications are usually not too CPU-intensive; there
are some ways you can get parallelism with reasonable extra effort;
and for m
I have a function, generally described as so:
def function(args):
if condition:
if condition2:
function(args+1)
elif condition3:
print "text"
return True
else:
return False
which is used in:
if function(args):
En Tue, 13 Feb 2007 22:10:54 -0300, Ron Provost <[EMAIL PROTECTED]> escribió:
> Under Python2.5, the empty root window is displayed but I also get a
> Traceback:
>
> Traceback (most recent call last):
> File "", line 1, in
> File "C:\Python25\lib\lib-tk\Tix.py", line 210, in __init__
> se
"agent-s" <[EMAIL PROTECTED]> writes:
> I have a function, generally described as so:
>
> def function(args):
> if condition:
> if condition2:
> function(args+1)
> elif condition3:
> print "text"
> return True
> else:
> re
On Feb 14, 4:15 pm, "agent-s" <[EMAIL PROTECTED]> wrote:
> I have a function, generally described as so:
>
> def function(args):
> if condition:
> if condition2:
> function(args+1)
return None
> elif condition3:
> print "text"
>
On Tue, 13 Feb 2007 21:15:19 -0800, agent-s wrote:
> I have a function, generally described as so:
[snip function]
> which is used in:
>
> if function(args):
> print "ok"
>
> so here basically "text" will print out when condition3 is true but it
> will not print o
En Tue, 13 Feb 2007 23:52:37 -0300, mark <[EMAIL PROTECTED]> escribió:
> is it possible to call a php function from python and use a class from
> php in python? i want to use mmslib which creates mms messages and the
> only implementation is a php mmslib implementation.
> thanks a lot!
> mark
I d
"Mathias" <[EMAIL PROTECTED]> wrote:
> Does someone have experience with threading in python - are there
> non-threadsafe functions I should know about?
how do your threads communicate with one another - are there any
globals that are accessed from different threads?
strange this - you should
Hi,
I have a program which literately finds the object that overlapping a
point. The horizontal and vertical search are called recursively from
inside each other.
Is this way of implementation fill the stack space with the local
variables inside each call. If this is not good, is there a better w
En Tue, 13 Feb 2007 23:54:29 -0300, <[EMAIL PROTECTED]> escribió:
from UserDict import UserDict
d = {1:2,3:4,5:6}
d1 = UserDict(d)
d1
> {1: 2, 3: 4, 5: 6}
d1.data
> {1: 2, 3: 4, 5: 6}
> Here why both d1 and d1.data have the same values?As shown below,they're
> different
En Wed, 14 Feb 2007 00:56:14 -0300, <[EMAIL PROTECTED]> escribió:
> I want to generate barcode based on an input which can be numbers or
> numbers+alphabets.
> How do I do this? Is there any library that will doo this?
Try google...
--
Gabriel Genellina
--
http://mail.python.org/mailman/list
En Wed, 14 Feb 2007 01:07:33 -0300, John Nagle <[EMAIL PROTECTED]>
escribió:
> Here's a large Perl regular expression, from a Perl address parser in
> CPAN:
>
> use re 'eval';
> $Addr_Match{street} = qr/
> (?:
># special case for addresses like 100 South Street
>
Le mercredi 14 février 2007 05:49, Paul Rubin a écrit :
> Basically Python applications are usually not too CPU-intensive; there
> are some ways you can get parallelism with reasonable extra effort;
Basically, while not CPU intensive, application server needs to get benefit of
all resources of the
Gabriel Genellina wrote:
> En Wed, 14 Feb 2007 01:07:33 -0300, John Nagle <[EMAIL PROTECTED]>
> escribió:
>
>> Here's a large Perl regular expression, from a Perl address parser in
>> CPAN:
>>
>> use re 'eval';
>> $Addr_Match{street} = qr/
>> (?:
>># special case
Maric Michaud <[EMAIL PROTECTED]> writes:
> Le mercredi 14 février 2007 05:49, Paul Rubin a écrit :
> > Basically Python applications are usually not too CPU-intensive; there
> > are some ways you can get parallelism with reasonable extra effort;
> Basically, while not CPU intensive, application s
En Wed, 14 Feb 2007 03:09:37 -0300, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> escribió:
> Hi,
> I have a program which literately finds the object that overlapping a
> point. The horizontal and vertical search are called recursively from
> inside each other.
> Is this way of implementation fill th
On Feb 13, 9:37 pm, "John Machin" <[EMAIL PROTECTED]> wrote:
> On Feb 14, 4:15 pm, "agent-s" <[EMAIL PROTECTED]> wrote:
>
> > I have a function, generally described as so:
>
> > def function(args):
> > if condition:
> > if condition2:
> > function(args+1)
>
> r
En Wed, 14 Feb 2007 04:11:37 -0300, John Nagle <[EMAIL PROTECTED]>
escribió:
> Gabriel Genellina wrote:
>> En Wed, 14 Feb 2007 01:07:33 -0300, John Nagle <[EMAIL PROTECTED]>
>> escribió:
>>
>>> Here's a large Perl regular expression, from a Perl address parser in
>>> CPAN:
>>>
>>> use re 'ev
On Feb 14, 5:45 pm, "agent-s" <[EMAIL PROTECTED]> wrote:
> On Feb 13, 9:37 pm, "John Machin" <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Feb 14, 4:15 pm, "agent-s" <[EMAIL PROTECTED]> wrote:
>
> > > I have a function, generally described as so:
>
> > > def function(args):
> > > if condition:
> > >
On Feb 14, 11:45 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Wed, 14 Feb 2007 03:09:37 -0300, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> escribió:
>
> > Hi,
> > I have a program which literately finds the object that overlapping a
> > point. The horizontal and vertical search are called r
101 - 135 of 135 matches
Mail list logo