> 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
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
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
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
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
class Item ( object ):
def __init__( self ):
self._FullName = ''
self._Recovery = 0
self._Exporter = SimpleItemExporter (); # Don't
understand
Bummer, I was hoping to consider myself at the tip of intermediate
python programming ...
This is the first time I h
# 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
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
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
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
10 matches
Mail list logo