.
Any ideas ?
e
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
@with_metadata
class TableOne:
# foo
pass
Overnight I have become a decorator fan.
I can postpone the study of metaclasses.
Thanks.
e
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http
nobody mention Geany ?
e
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
()
# now do something with stripped_line
f.close()
egbert
--
Egbert Bouwman
Keizersgracht 197-II
1016 DS Amsterdam
Tel 0(031)20 6257991
--
http://mail.python.org/mailman/listinfo/python-list
suggestion to read the itertools docs.
egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
)
and for a dictionary:
self.__dict__[namestring][keystring]=value
But I have the impression that I am cheating, because users should not
operate on __dict__ directly.
Is that true ? And are there better solutions ?
egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
On Thu, Jul 01, 2010 at 04:02:49AM -0700, Chris Rebert wrote:
switch to getattr() as demonstrated above.
Thanks for opening my eyes, Chris.
egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
the hard coding of attr1 and attr2 like you did.
And because of a blind spot for getattr() I modified __dict__.
Thanks to you, Chris and Lie it will not happen again, I promise.
egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
On Sun, Apr 04, 2010 at 12:10:02PM +, Steven D'Aprano wrote:
I can implement this tree using a flat dict:
root = object()
data = {root: ['Mammal', 'Reptile'],
What is the advantage, or thougth behind, using an instance
of object as the root of your flat tree ?
egbert
--
Egbert
When I do 'from some_package import some_module'
the __init__.py of some_package will be run.
However, there will not be anything like a package-module,
and the effects of __init__.py seem all to be lost. Is that true ?
Or can I still do something useful with __init__.py ?
e
--
Egbert Bouwman
On Thu, Mar 25, 2010 at 12:43:13PM -0400, Terry Reedy wrote:
On 3/25/2010 6:16 AM, egbert wrote:
When I do 'from some_package import some_module'
the __init__.py of some_package will be run.
However, there will not be anything like a package-module,
and the effects of __init__.py seem all
the ROLLBACK conflict algorithm in my sql.
Instead I have to catch the IntegrityError and call the rollback method.
Does that mean that I have to wrap all multi-command transactions
in a try-except if I don't like the default ABORT choice ?
e
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS
On Sat, Aug 02, 2008 at 07:46:49PM -0700, Dennis Lee Bieber wrote:
heh
What is the meaning of heh ?
e.
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman
= , .join(row)
pos = txt.rfind(, )
new = %s and %s % (txt[0:pos], txt[pos+2:])
egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
What is the role or position of C# in this context ?
If I remember well, some people have said that C# is an improved
C++ or Java.
e
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http
condition,
whatever logical explanation you may offer.
. for each_item in item_list:
.do_something()
. else:
.do_else()
My temporary solution will be to accompany this else
with an appropriate comment: # exhausted
e
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020
)
. exhausted - the loop ran to completion.
The last two as suggested by Laurence Tratt in his Convergence.
e
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python
On Thu, Sep 27, 2007 at 09:17:30PM -0400, Steve Holden wrote:
So what we need is a poll on what the questions should be. I *love* c.l.py.
I will switch as soon as Debian has all the tools for an easy conversion
available, and Python 3000 has reached the default release status.
e
--
Egbert
On Thu, Mar 08, 2007 at 01:22:25PM +1100, Steven D'Aprano wrote:
On Wed, 07 Mar 2007 16:02:05 +0100, egbert wrote:
My impression is that you can do everything you want to
by making your instance callable, and not using a but a().
You can't do this:
a() = some value
I didn't say
. Solid, trusted, tunable ...
C++ - objects tacked onto C; but that didn't work so invent ...
Python - it just works. Same scripts run on every platform ...
What about C# ?
e
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
.
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
According to apt-show-versions I have installed:
python-wxgtk2.6 2.6.3.2.1.5
spe 0.8.2a+repack-1
However when I start SPE I get the message
You need to install at least wxPython v2.5.4.1 to run SPE
How do I tell SPE that I have the right wxPython ?
e.
--
Egbert Bouwman
.
Get it from http://www.python.org
Well, I got it from the debian repositories.
e.
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
Is it possible to set Python as the default language in SciTE?
Not all my python scripts have the .py extension,
only the to_be_imported ones. And I use SciTE only for Python.
e.
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
or improvements on my design.
In a python shell you may test it with:
import dip
zoo = dip.Zoo()
zoo.animals[fish].send_food_wish()
egbert
#!/usr/bin/env python
# dip.py := experiment with Patrick O'Brien's dispatcher
import wx.py.dispatcher as disp
class Animal(object):
def __init__
.
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
In pygtk is available: set_focus_chain
Does wxPython have something similar ?
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
):
callback_helper()
...
klas = Klas()
func()
gtk.main()
egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo
by zero or
more z's, but only after each x, including the first one,
you switch to a new line.
So the last digit on each line is an x, except for the last line,
which are z's printed after the 9 (an x) ending the line above it.
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
= Timer(token.isalpha(), from __main__ import token)
print t.timeit() # 0.28
#egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
slower than isalpha() sec. Any suggestions ?
Thanks.
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
My pygtk gui can not be started from a gnome panel,
because, apparently, the panel doesn't know about my
modified PYTHONPATH. So how can I instruct the panel ?
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
On Tue, Dec 20, 2005 at 07:16:46PM +0530, Suresh Jeevanandam wrote:
s1 = '12e3'
s2 = 'junk'
Is there any other function which would return True for s1 and False
for s2.
isinstance(12e3, (int, float))
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020
PyFLTK is not a debian package - yet.
Is nobody interested, or is there a more specific reason ?
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python
that the window is displayed on.
The screen on the second line, before the period, is in italics,
if that helps.
I like these texts. Prose should not disclose its secrets at once.
If you have other examples, please let us know.
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
Without success I try to understand the color mechanism in PyGTK.
It's about the classes Color an Colormap, and their methods and
related functions and other paraphernalia.
If anyone knows about a tutorial-like systematic description,
I will be very grateful.
--
Egbert Bouwman - Keizersgracht
gnome-terminal window is opened for output only,
and PYTHONPATH is an unknown entity.
How can I open a terminal over whose environment and
configuration I have more control ?
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
about the same language. However I must apologize.
It didn't cover Pyhton. This is an improved version:
pc=re.compile(r'\bph?(ph)*[iye]+h?(th?)+o?n+e?\b',re.I)
As you see it covers pitn, and also spellings like pythonne,
to accomodate the francophones.
--
Egbert Bouwman - Keizersgracht 197 II
for limbo,
but the same question goes for:
zip(sequence1,sequence2)
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
):
self.var=0
def __call__(self,val=None):
self.var=val
a = A()
a(5)
print a.var # gives 5
egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo
to offer, but I must be looking
in the wrong direction.
egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
--
http://mail.python.org/mailman/listinfo/python-list
41 matches
Mail list logo