Re: Python-libnjb on macosx

2005-02-10 Thread Christian Dieterich
On Déardaoin, Feabh 10, 2005, at 18:08 America/Chicago, Robert Kern wrote: Timothy Grant wrote: I was working on some things that use Glenn Strong's excellent libnjb wrapper on my Linux box. I have since bought a PowerBook and have been trying to get everything working correctly under OS/X. This

Re: Pickling and inheritance are making me hurt

2005-02-04 Thread Christian Dieterich
On Dé hAoine, Feabh 4, 2005, at 15:48 America/Chicago, Kirk Strauser wrote: I have a module that defines a Search class and a SearchResult class. I use these classes by writing other modules that subclass both of them as needed to interface with particular search engines. My problem is that S

Re: SysV IPC message queues

2005-02-03 Thread Christian Dieterich
On Déardaoin, Feabh 3, 2005, at 02:29 America/Chicago, Aki Niimura wrote: Hello everyone. I'm trying to control a program from a Python program using IPC. Although using a socket is a common choice for such applications, I would like to use SysV message queues because I don't need to parse the st

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-03 Thread Christian Dieterich
On Déardaoin, Feabh 3, 2005, at 01:52 America/Chicago, Robert Kern wrote: Christian Dieterich wrote: On Dé Céadaoin, Feabh 2, 2005, at 17:48 America/Chicago, [EMAIL PROTECTED] wrote: Hi there I started a very long and roundabout process of attempting to install python 2.3.4 along side my apple

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-02 Thread Christian Dieterich
On Dé Céadaoin, Feabh 2, 2005, at 17:48 America/Chicago, [EMAIL PROTECTED] wrote: Hi there I started a very long and roundabout process of attempting to install python 2.3.4 along side my apple-installed 2.3 system. To make a long story short, I have completely confabulated my environment ( i del

Re: Finding user's home dir

2005-02-02 Thread Christian Dieterich
On Dé Céadaoin, Feabh 2, 2005, at 13:26 America/Chicago, Nemesis wrote: Hi all, I'm trying to write a multiplatform function that tries to return the actual user home directory. I saw that Please, could you test it on your systems and tell me what you got? I'd like to know what it returns on diffe

Re: variable declaration

2005-02-01 Thread Christian Dieterich
On Dé Máirt, Feabh 1, 2005, at 12:19 America/Chicago, Alex Martelli wrote: Michael Tobis <[EMAIL PROTECTED]> wrote: ... I don't know that it's ever necessary to rebind, but it is, in fact, common, and perhaps too easy. In numeric Python, avoiding rebinding turns out to be a nontrivial skill. W

Re: inherit without calling parent class constructor?

2005-01-27 Thread Christian Dieterich
On Déardaoin, Ean 27, 2005, at 19:25 America/Chicago, Jeff Shannon wrote: Okay, so size (and the B object) is effectively a class attribute, rather than an instance attribute. You can do this explicitly -- Ah, now I'm getting there. That does the trick. Probably not worth the trouble in this pa

Re: inherit without calling parent class constructor?

2005-01-27 Thread Christian Dieterich
On Déardaoin, Ean 27, 2005, at 14:05 America/Chicago, Jeff Shannon wrote: True, in the sense that B is instantiated as soon as a message is sent to D that requires B's assistance to answer. If the "decision" is a case of "only calculate this if we actually want to use it", then this lazy-cont

Re: inherit without calling parent class constructor?

2005-01-27 Thread Christian Dieterich
On Dé Céadaoin, Ean 26, 2005, at 17:02 America/Chicago, Steven Bethard wrote: Just a note of clarification: The @deco syntax is called *decorator* syntax. Classes with a __get__ method are called *descriptors*. Okay, I think I get the idea. I didn't know about the @deco syntax, but it seems to b

Re: inherit without calling parent class constructor?

2005-01-26 Thread Christian Dieterich
On Dé Céadaoin, Ean 26, 2005, at 13:45 America/Chicago, Steven Bethard wrote: Note that: @deco def func(...): ... is basically just syntactic sugar for: def func(...): ... func = deco(func) Oh, I learned something new today :-) Nice thing to know, these descriptor

Re: inherit without calling parent class constructor?

2005-01-26 Thread Christian Dieterich
On Dé Céadaoin, Ean 26, 2005, at 11:46 America/Chicago, Steven Bethard wrote: I'm confused as to how you can tell when it's avoidable... Do you mean you don't want to call 'method' if you don't have to? Could you make size a property, e.g. Then 'size' won't be calculated until you actually u

inherit without calling parent class constructor?

2005-01-26 Thread Christian Dieterich
Hi, I need to create many instances of a class D that inherits from a class B. Since the constructor of B is expensive I'd like to execute it only if it's really unavoidable. Below is an example and two workarounds, but I feel they are not really good solutions. Does somebody have any ideas how