På 15. jan 2005 kl. 16:16 skrev .removethis.:
>>> import glob
>>> from os.path import isfile
>>> print filter(isfile, glob.glob('/tmp/*')) # can use patterns
Nice example of when filter() is better than list comprehension.
[f for f in glob.glob("/tmp/*") if isfile(fi)]
is a bit too verbose, the ite
På 14. jan 2005 kl. 22:58 skrev Steven Bethard:
(Any mac users? How do I fix this to appear in Norwegian? =)
Note that if you're not comfortable with short-circuiting behavior,
you can also code this using lazy evaluation:
(lambda: 1/x, lambda: 1.0e99)[x==0]()
.. and people wonder why so many
På 23. jan 2005 kl. 21:55 skrev Nils Emil P.Larsen:
I connect to my server using SSH and then run 'python' to enter the
shell. I can't use the arrow buttons (up, down, left and right).
Instead I get this ^[[A , ^[[B, ^[[C or ^[[D.
Your Python installation is probably compiled without readline su
On 1/14/06, EleSSaR^ <[EMAIL PROTECTED]> wrote:
> Kenneth McDonald si è profuso/a a scrivere su comp.lang.python tutte queste
> elucubrazioni:
>
> > there any good libraries out there that let one write (basic) queries
> > in a Pythonic syntax, rather than directly in SQL?
>
> You need an ORM. Beyo
2007/6/26, Omer Khalid <[EMAIL PROTECTED]>:
> On the RESTFul web service, I would like to piggy pack my own question two
> is there a way to make the connection secure between two Restful service
> running on GNU/linux?
https?
--
Stian Søiland Any society that would give up a litt