Re: [Tutor] Declaration order of classes... why it is important?

2009-08-27 Thread Lie Ryan
Mac Ryan wrote: Second thing: the example that Dave gave me and that I left quoted above makes use of decorators, but this is something that I still do not understand. I believe I got a grasp of the concept of metaclasses, to which the concept of decorator seems to be related, but the official d

Re: [Tutor] Callbacks in Python

2009-08-27 Thread Lie Ryan
Jramak wrote: Hello I'm confused by callbacks. I would really appreciate any introduction or help in understanding the concept of callbacks. By example: def callback(nums): """ The callback function """ return sum(nums) * 2 def another_callback(nums): """ Yet another callback f

Re: [Tutor] Callbacks in Python

2009-08-27 Thread Alan Gauld
"Jramak" wrote I'm confused by callbacks. I would really appreciate any introduction or help in understanding the concept of callbacks. Callbacks are used in all sorts of different ways in programming so it might help to undertand what exactly confuses you. Is it the whole concept of a ca

Re: [Tutor] how do I post event to thread?

2009-08-27 Thread Kent Johnson
On Wed, Aug 26, 2009 at 9:38 PM, Jeff Peery wrote: > hello, > I've read a bit about multi thread communication, and found that most people > use a queue, which makes sense. however in my case I simply have two > threads, a main thread and one other. the main thread is doing many > different things

Re: [Tutor] design advise

2009-08-27 Thread davidwilson
Thanks for the reply, but reading from my initial post I don't seem to have made my question clear ;( I was thinking more in terms of how python would find it more efficient in retrieving the information, this being: 1) Storing all the user files in one place and then selecting only the files w

Re: [Tutor] design advise

2009-08-27 Thread Kent Johnson
On Thu, Aug 27, 2009 at 7:26 AM, wrote: > I was thinking more in terms of how python would find it more efficient in > retrieving the information, this being: > 1) Storing all the user files in one place and then selecting only the files > with the correct permissions for the user views >  2) St

Re: [Tutor] how do I post event to thread?

2009-08-27 Thread Jeff Peery
Hi, thanks for all the good responses. I appreciate your thoughts. I was sightly confused about how these threads work together.   I am using python 2.6, no GUI at the moment, so I can't use the wxEvent class or the equivalent.    The program basically pulls data from a serial port and then calcu

Re: [Tutor] design advise

2009-08-27 Thread Alan Gauld
wrote The thing that bothers me is that I ma have 10 users or 100,000 users and really wanted to get an opinion as to which option would scale better, leaving aside the relational DB approach. If you have to cater for 100,000 users all with different views on a common set of resources I do

Re: [Tutor] design advise

2009-08-27 Thread Dave Angel
Alan Gauld wrote: wrote The thing that bothers me is that I ma have 10 users or 100,000 users and really wanted to get an opinion as to which option would scale better, leaving aside the relational DB approach. If you have to cater for 100,000 users all with different views on a common se

Re: [Tutor] string.title(): correct?

2009-08-27 Thread Christoph Burgmer
> Allen Fowler wrote: > > Hello, > > > > "He's a great guy".title() > > > > Gives me: > > > > "He'S A Great Guy" > > > > > > I expected: > > > > "He's A Great Guy" > > > > Did i miss something here? > > The docs state: > > "title( ) - Return a titlecased version of the string: words start with > up

Re: [Tutor] Callbacks in Python

2009-08-27 Thread Jramak
Thanks everyone for your excellent insights. I think I understand the callback concept better. So, it is like passing a function as an argument to another function. I am interested in learning more about how callbacks can be applied in GUIs, using wxPython as an example. Would appreciate any insig

[Tutor] FW: Kerberos Validation

2009-08-27 Thread Dan Eicher
Hi,I have Heimdal Kerberos server running under Solaris. It is working and my pam stack is correct as I can kinit on a client and validate on the unix command line. Under Linux (ubuntu 9.04 in this case) - I'd like to write a python program that will validate a user name and password against