OOP help needed incorporating existing modules in class

2005-06-30 Thread Koncept
I want to incorporate the datetime and other modules into my class. I am new to Python and would really appreciate some help doing this. class FooBar: def getDate(self): return ^^^ how do I do something like this? -- Koncept << "The snake that cannot shed its skin peri

Threading for a newbie

2006-01-05 Thread Koncept
thread.start() # How do I print "order" after all the threads are complete? print "\nThreads were processed in the following order:" for i, person in enumerate(order): print "%d. %s" % (i+1,person) if __name__ == "__main__": main() -- Koncept &l

Re: Threading for a newbie

2006-01-05 Thread Koncept
t I was going about the the wrong way, and now I have a new path to follow. It's really nice to have people lend a hand when others get stumped. I hope to one day be able to contribute here in a similar manner! Best. -- Koncept << "The snake that cannot shed its skin perishes.

REQ: Small Perl to Python conversion needed

2005-06-02 Thread Koncept
"Key: $_\tFrequency: ", "*" x $dict{ $_ }, "\n" if $dict{ $_ } =~ /\d+/g; } sub byKeys { $dict{$b} <=> $dict{$a} } __DATA__ Results: Key: 5 Frequency: * Key: 4 Frequency: Key: 3 Frequency: *** Key: 2 Frequency: ** Key: 1 Frequency: * -- Koncept <

Re: REQ: Small Perl to Python conversion needed

2005-06-02 Thread Koncept
Frequency: %s' % (key, '*'*counts[key]) > ... > Key: 5 Frequency: * > Key: 4 Frequency: > Key: 3 Frequency: *** > Key: 2 Frequency: ** > Key: 1 Frequency: * > > I'm probably missing a few subtleties, but hopefully this will get you > started.