Re: Data Tree urgent help!!!!!!

2013-02-20 Thread Leo Breebaart
equally well if I just do: apple, pear, dog, cat, fork, spoon = map(str, apple pear dog cat fork spoon.split()) So I was wondering why you used Name. -- Leo Breebaart l...@lspace.org -- http://mail.python.org/mailman/listinfo/python-list

What does this PyChecker warning mean?

2010-06-01 Thread Leo Breebaart
is meant by this warning. In fact, it simply seems wrong -- but I have learned not to jump to that conclusion too quickly, so I was hoping someone here could perhaps enlighten me... Many thanks in advance, -- Leo Breebaart l...@lspace.org -- http://mail.python.org/mailman/listinfo/python-list

Re: What does this PyChecker warning mean?

2010-06-01 Thread Leo Breebaart
doing anything else, just to see what comes up. As far as I can tell the sole reason for that code being structured the way it is, is to provide a kind of module-within-a-module and not clutter up the outer module with these helper classes needed only by the foo() function. -- Leo Breebaart l

Re: Using class attributes

2010-02-18 Thread Leo Breebaart
the descriptor solution as given above, the code works perfectly, but running the code through pychecker now causes an error, because that again causes an attempt to read from the non-existant base class template file Foo.tmpl... -- Leo Breebaart l...@lspace.org -- http://mail.python.org/mailman/listinfo

Re: Using class attributes

2010-02-18 Thread Leo Breebaart
with that. My thanks again to all of you for helping me out with this. -- Leo Breebaart l...@lspace.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Using class attributes

2010-02-16 Thread Leo Breebaart
Chris Rebert c...@rebertia.com writes: On Mon, Feb 15, 2010 at 10:29 AM, Leo Breebaart l...@lspace.org wrote: I have a base class Foo with a number of derived classes FooA, FooB, FooC, etc. Each of these derived classes needs to read (upon initialisation) text from an associated template

Using class attributes

2010-02-15 Thread Leo Breebaart
can of course always just hardcode the template filenames in each derived class, but I am just curious if it can be automated through some form of introspection. -- Leo Breebaart l...@lspace.org -- http://mail.python.org/mailman/listinfo/python-list

Designing a cancellable function

2006-12-15 Thread Leo Breebaart
if this way the whole API for foo() won't become to complex and overdesigned. I was wondering if anybody has any insights or best practice recommendations for me here. Do I keep the function interface? Do I use a class? Any other solution I am overlooking? Many thanks in advance for your advice. -- Leo

Logging vs printing

2006-05-08 Thread Leo Breebaart
alisonken1 [EMAIL PROTECTED] writes: Leo Breebaart wrote: I am writing fairly large console scripts in Python. They have quite a few command-line options, which lead to configuration variables that are needed all over the program (e.g. the --verbose option alone is used by just about

Re: Logging vs printing

2006-05-08 Thread Leo Breebaart
Sybren Stuvel [EMAIL PROTECTED] writes: Leo Breebaart enlightened us with: I think the main reason why I am not using [logging] by default is because, when all is said and done, it still comes easier to me to resort to guarded print statements then to set up and use the logging

Passing options around your program

2006-05-07 Thread Leo Breebaart
. -- Leo Breebaart [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

How to doctest if __name__ already used?

2006-05-05 Thread Leo Breebaart
Pythonic way to run doctest on the docstrings in the file? Trigger doctest.testmod() via a --test command-line option, is what I'm thinking. But is that really the best way? -- Leo Breebaart [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending mail from 'current user' in Python

2005-06-14 Thread Leo Breebaart
? is worth reading. Thanks to you and everyone else who contributed to this thread. I've now decided to accept the inherent non-portabilitiness of the whole concept of 'sending mail from within a program', and will be going with a Unix-only see-if-you-can-find-sendmail approach. -- Leo Breebaart

Sending mail from 'current user' in Python

2005-06-10 Thread Leo Breebaart
possible I'd also like to get this working on Windows, so I'd rather stick with the standard smtplib if I can. Does anybody here have any thoughts on this? -- Leo Breebaart [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

tempfile.gettempdir() result on Windows

2005-06-03 Thread Leo Breebaart
to show this location to the users of my program, who I suspect would be much happier with a 'proper' Windows path than with this '~1' DOS malarkey. Does anybody know how I can obtain a temp directory in 'verbose' format (or somehow convert the gettempdir() result to that)? -- Leo Breebaart

How to name Exceptions that aren't Errors

2005-04-07 Thread Leo Breebaart
something better I'm overlooking. Any suggestions? -- Leo Breebaart [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to name Exceptions that aren't Errors

2005-04-07 Thread Leo Breebaart
* grasshopper, though. Does that help any? -- Leo Breebaart [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Why doesn't join() call str() on its arguments?

2005-02-16 Thread Leo Breebaart
the existing semantics after all. But for the life of me I can't think what that counter-argument might be... -- Leo Breebaart [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't join() call str() on its arguments?

2005-02-16 Thread Leo Breebaart
John Machin [EMAIL PROTECTED] writes: On 16 Feb 2005 18:47:21 GMT, Leo Breebaart [EMAIL PROTECTED] wrote: What I can't find an explanation for is why str.join() doesn't automatically call str() on its arguments, so that e.g. str.join([1,2,4,5]) would yield 1245, and ditto for e.g. user

Re: Why doesn't join() call str() on its arguments?

2005-02-16 Thread Leo Breebaart
of you are actually talking to... -- Leo Breebaart [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list