> >def is_palidrome (n):
> > return str(n) == ''.join (reversed (str(n)))
>
> >which will return True if integer n is a palidromic or False
> >otherwise.
>
> I wouldn't normally provide a direct solution to this type of request; but
> since you have, may I suggest:
>
> def is_palindrome (n):
>
Hi,
I wanted to use smtplib to send a bunch of files. All good, except I
cant monitor the upload progress as far as I can see.
So I monkey patched the SMTP.sendall method, which chops up the data
and keeps calling a provided callback for every chunk of data sent.
This feels kind of dirty and I w
> One simple solution would be to forbid import statements in the
> scripts, to import the scripts as modules and inject whatever
> functions you want them to be able to use in the module's namespace.
how do you 'forbid' imports?
Guyon
http://gumuz.nl
--
http://mail.python.org/mailman/listinf
Hi,
I'm looking for a signup link to get my blog included in
http://planet.python.org/,
but I couldn't find one. I emailed [EMAIL PROTECTED] to no avail.
any ideas?
thanks,
Guyon
http://www.gumuz.nl/blog/
--
http://mail.python.org/mailman/listinfo/python-list
Brian you are right, but in my case (host, port, protocol) is unique.
[EMAIL PROTECTED] schreef:
> Guyon Morée wrote:
> > i have a big list of tuples like this:
> >
> > [ (host, port, protocol, startime, endtime), .. ] etc
> >
> > now i have another
Memory is no problem. It just needs to be as fast as possible, if
that's what this is, fine.
If not, I'd like to find out what is :)
thanx,
Guyon Moree
http://gumuz.looze.net
Paul Rubin schreef:
> "Guyon Morée" <[EMAIL PROTECTED]> writes:
> > if (((src_
hi all,
i have a big list of tuples like this:
[ (host, port, protocol, startime, endtime), .. ] etc
now i have another big(ger) list of tuples like this:
[(src_host, src_port, dest_src, dest_port, protocol, time), ... ] etc
now i need to find all the items in the second list where either
src_
Hi all,
I'm using simple classes as a container of named values and I'm
instantiating a lot of them in a very short time.
i was wondering if there is any benefit in using dicts instead from a
performance/memory usage point of view?
regards,
Guyon Morée
http://gumuz.looze.net
hi, i think you'd have better luck at
http://groups.google.com/group/webpy
--
http://mail.python.org/mailman/listinfo/python-list
Thanks, I just *assumed* I needed the globals to reach the vars in the
nested function.
This makes my code a l ot cleaner :)
cheers,
Guyon Morée
http://gumuz.looze.net/
--
http://mail.python.org/mailman/listinfo/python-list
--------
Is there any other way to do this?
cheers,
Guyon Morée
http://gumuz.looze.net/
--
http://mail.python.org/mailman/listinfo/python-list
hi, i used pygame to display video and draw over it.
check out:
http://gumuz.looze.net/wordpress/index.php/archives/2005/06/06/python-webcam-fun-motion-detection/
cheers,
http://gumuz.looze.net
--
http://mail.python.org/mailman/listinfo/python-list
So, is an ugly short one a candidate?
i managed in 199 bytes :)
i'll send it in anyway
ciao
http://gumuz.looze.net/
--
http://mail.python.org/mailman/listinfo/python-list
Wow Paul!
thanks a lot for your comments! I learned a lot already only by reading
them, I will implement them and see what the speed gains are.
Keep an eye on my blog, I will post an update on it soon!
thanks,
guyon
ps. love this group
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
>
h
14 matches
Mail list logo