Re: [Tutor] What books do you recommend?

2009-12-09 Thread Weidner, Ronald
> My problem, though, is I still find it difficult to write meaningful code or > use the built in libraries > effectively and/or correctly because I can't find example code to mimic. I > tried sifting through > ActiveState recipes page, but most of the code seems uninteresting or useful > only

Re: [Tutor] Recursive user input collection problem

2009-10-13 Thread Weidner, Ronald
I didn't test this but shouldn't you have a line like this... return getinput(variable,prompt) -- Ronald Weidner -Original Message- From: tutor-bounces+rweidner=ea@python.org [mailto:tutor-bounces+rweidner=ea@python.org] On Behalf Of William Witteman Sent: Tuesday, October 13, 2

Re: [Tutor] [OT] Secure coding guidelines

2009-10-13 Thread Weidner, Ronald
In reference to this tip, my question is why? - don't use string formatting to create SQL statements - use the two-argument form of execute() to pass args as a sequence -- Ronald Weidner -Original Message- From: tutor-bounces+rweidner=ea@python.org [mailto:tutor-bounces+rweidner=e

Re: [Tutor] Here's something to talk about

2009-04-15 Thread Weidner, Ronald
1. Python is not Java (see Philip Eby's blog entry http://dirtsimple.org/2004/12/python-is-not-java.html). Let go of your concepts that only Items can go into an ItemCollection - Python already has some perfectly good collection builtins. Instead of writing a custom ItemCollection, why not write

Re: [Tutor] Here's something to talk about

2009-04-15 Thread Weidner, Ronald
I must confess I do not really understand your intent (a) with the code itself (b) with the fact of publishing it Maybe I have read it too fast. What I saw is an implementation of strict object interface, in the sense strictly separating the inner and outer parts of an object. Sure, this is an

Re: [Tutor] Here's something to talk about (Weidner, Ronald)

2009-04-15 Thread Weidner, Ronald
class Item ( object ): def __init__( self ): self._FullName = '' self._Recovery = 0 self._Exporter = SimpleItemExporter (); #

[Tutor] Here's something to talk about

2009-04-15 Thread Weidner, Ronald
# This code is posted for the purpose of conversation. If it is of some # value to someone that would be great. But what I hope is that the code # sparks conversations about what I did in this code and why I did it. Since # the list seems thick with OOP questions at the moment, I thought this m

Re: [Tutor] ideas on how to process a file

2009-04-10 Thread Weidner, Ronald
In my last e-mail I think I suggested making an Item object. This time I'll suggest an ItemCollection object. Now you can have an Add(self, item) that could validate. This could be some rather simple loop and test logic. -- Ronald Weidner From: tutor-bounces+rweidner=ea@python.org [mai

[Tutor] subprocess Popen

2009-04-03 Thread Weidner, Ronald
I have a long running py script that I'm trying to kick off from another long running py script as a separate process... If either script fails or terminates, I don't want the other script to be effected as a result. In other words I need a separate process not a new thread. In any case, this co

[Tutor] subprocess Popen

2009-04-03 Thread Weidner, Ronald
I have a long running py script that I'm trying to kick off from another long running py script as a separate process... If either script fails or terminates, I don't want the other script to be effected as a result. In other words I need a separate process not a new thread. In any case, this co