around
> code
> to catch a segfault.
>
> \d
Wouldn't it be better to narrow down to what in your code is invoking PIL
in a manner in which PIL exhibits such behaviour, and handle it within
your code?
Just a thought!
--
Ayaz Ahmed Khan
--
http://mail.python.org/mailman/listinfo/python-list
7;snagglefrob').hexdigest()
> '9eb2459fcdd9f9b8a9fef7348bcac933'
>>>> md5.new('snagglefrob\n').hexdigest()
> 'f842244d79af85b457811091319d85ff'
>>>>
Or, alternatively:
$ echo -n snagglefrob | md5sum
9eb2459fcdd9f9b8a9fef7348bcac933 -
--
Ayaz Ahmed Khan
--
http://mail.python.org/mailman/listinfo/python-list
for @ prefix is better-
> looking than self.
I've never really understood why some people find that annoying to do. I
make it a point to use, for example, the `this` operator when writing C++
code to avoid implicilty calling/accessing attributes of objects as much
as possible.
-
"James Stroud" typed:
> py> def doit(a, b, c, x=14):
> ... pass
> ...
> py> doit.func_code.co_argcount
> 4
> py> doit.func_code.co_varnames
> ('a', 'b', 'c', 'x')
> py> doit.func_defaults
> (14,)
Nea
"Clement" typed:
> My project is based on console Application. Is there any console UI
> except urwid. If so, can i come to know.
There is ``curses''.
--
Ayaz Ahmed Khan
Do what comes naturally now. Seethe and fume and throw a tantrum.
--
http://mail.python.org/mailman/listinfo/python-list
7 usec per loop
$ python -m timeit -s "L = ['0024', 'haha', '0024']"
"[i for i in L if i != '0024']"
10 loops, best of 3: 5.41 usec per loop
$ python -m timeit -s "L = ['0024', 'haha', '0024']" "[i for i in L if i]"
10 loops, best of 3: 6.71 usec per loop
$ python -m timeit -s "L = ['0024', 'haha', '0024']; import itertools"
"itertools.ifilter(None, L)"
10 loops, best of 3: 4.12 usec per loop
--
Ayaz Ahmed Khan
Do what comes naturally now. Seethe and fume and throw a tantrum.
--
http://mail.python.org/mailman/listinfo/python-list
uot;,"haha","0024"]
In [2]: filter(lambda x: x != "0024", l)
Out[2]: ['haha']
--
Ayaz Ahmed Khan
Do what comes naturally now. Seethe and fume and throw a tantrum.
--
http://mail.python.org/mailman/listinfo/python-list
"Gabriel Genellina" typed:
>
> See
> http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm
Thanks for the link, Gabriel. I didn't know about this.
--
Ayaz Ahmed Khan
Falling in love makes smoking pot all day look like the ultimate in
restraint.
now?
Most everywhere I've read about map() and filter() seemed to
discourage their use stating that they're becoming depreciated (with the
exception of Dive Into Python which advocates use of these two functions
in preference to even list comprehensions, if I've read it properly).
rlopen('http://www.someurl.tld/'))
>>> title = soup.find(name='span', attrs={'class':'title'},
>>> text=re.compile(r'^Linux \w+'))
>>> title
u'Linux Kernel Bluetooth CAPI Packet Remote Buffer Overflow Vulnerabili
) ..)
a = class_obj(link)
a._parse()
getattr() takes an object as its first argument. I can't seem to figure
out how to make it work here.
--
Ayaz Ahmed Khan
A witty saying proves nothing, but saying something pointless gets
people's attention.
--
http://mail.python.org/mailman/listinfo/python-list
t__() calls the __init__() of the first of the class in
the list of classes from which the calling class inherits. For example:
class C(A, B):
def __init__(self):
super(C, self).__init__()
calls A's __init__ explicity when an instance of C is instantiated. I
might be missing so
level(2)
ftp.connect(_host, _port)
ftp.login(_user, _pass)
ftp.storbinary('STOR ' + _file, open(_file))
ftp.quit()
--
Ayaz Ahmed Khan
A witty saying proves nothing, but saying something pointless gets
people's attention.
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo