Making a non-root daemon process

2007-03-22 Thread Ben Finney
necessarily running as root. What does the 'os.setsid()' gain me? How can I get that without being the root user? -- \ "I went to a general store. They wouldn't let me buy anything | `\ specifically." -- Steven Wright | _o__)

Re: Making a non-root daemon process

2007-03-23 Thread Ben Finney
"Leo Kislov" <[EMAIL PROTECTED]> writes: > On Mar 22, 11:19 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > > The problem I'm having is that 'os.setsid()' fails with 'OSError: > > [Errno 1] Operation not permitted' unless I run the

Re: Making a non-root daemon process

2007-03-24 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> writes: > Hmm. I typed the example program in as a simplified version of what > I'm doing; but didn't actually *run* it. When I do run it, I get no > exception, as you say. > > Now I'll have to find out what significant differenc

Re: Auto execute python in USB flash disk

2007-03-27 Thread Ben Finney
`\an expiration date." -- Steven Wright | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: PyPy 1.0: JIT compilers for free and more

2007-03-27 Thread Ben Finney
"If nothing changes, everything will remain the same." -- | `\ Barne's Law | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Python automatic testing: mocking an imported module?

2007-03-27 Thread Ben Finney
confirm that the module under test has actually used the module as expected. -- \ "A politician is an animal which can sit on a fence and yet | `\ keep both ears to the ground." -- Henry L. Mencken | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

ANN: Gracie v0.2 -- a local-account OpenID provider

2007-03-27 Thread Ben Finney
://trac.whitetree.org/gracie/>. -- \ "When I turned two I was really anxious, because I'd doubled my | `\ age in a year. I thought, if this keeps up, by the time I'm six | _o__) I'll be ninety." -- Steven Wright | Ben Finney <[EM

Re: Modal value of an array

2007-03-28 Thread Ben Finney
t;>> foo = ["eggs", "beans", "beans", "eggs", "spam"] >>> counts = [(foo.count(val), val) for val in set(foo)] >>> sorted(counts)[-1][1] 'eggs' -- \ "Anger makes dull men witty, but it keeps them poor." -- | `\ Elizabeth Tudor | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about text in Python

2007-04-02 Thread Ben Finney
, it was a satellite | `\ picture of the entire Earth. On the back he wrote, 'Wish you | _o__) were here'." -- Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: getattr/setattr q.

2007-04-02 Thread Ben Finney
Traceback (most recent call last): File "", line 1, in ? NameError: name 'bar' is not defined >>> foo() >>> bar 10 -- \ "I'm beginning to think that life is just one long Yoko Ono | `\ album; no rhyme or reason, just a lot of incoherent shrieks and | _o__) then it's over." -- Ian Wolff | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: cli user interface ala cisco IOS or JUNOS

2007-04-03 Thread Ben Finney
specific about what you're looking for. -- \ "Success is going from one failure to the next without a loss | `\ of enthusiasm." -- Winston Churchill | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about text in Python

2007-04-03 Thread Ben Finney
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Tue, 03 Apr 2007 12:26:47 +1000, Ben Finney wrote: > > > "Steve" <[EMAIL PROTECTED]> writes: > > > >> Yes it is [a homework question]. > >> > >> Where else to ask for hel

Re: Prevent Modification of Script?

2007-04-04 Thread Ben Finney
should I care about posterity? What's posterity ever done | `\ for me?" -- Groucho Marx | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Prevent Modification of Script?

2007-04-04 Thread Ben Finney
of liberty." -- Thomas Jefferson | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Shebang or Hashbang for modules or not?

2007-04-11 Thread Ben Finney
'foo'. This doesn't preclude importing the module (e.g. for unit testing), though it is a little more convoluted than a simple 'import' statement. -- \ "Dad always thought laughter was the best medicine, which I | `\ guess is why sever

Re: Lists and Tuples and Much More

2007-04-12 Thread Ben Finney
for me?" -- Groucho Marx | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: favourite IDE

2007-04-13 Thread Ben Finney
-- \ "You've got to think about big things while you're doing small | `\ things, so that all the small things go in the right | _o__) direction." -- Alvin Toffler | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Python editor/IDE on Linux?

2007-04-13 Thread Ben Finney
e surest way to corrupt a youth is to instruct him to hold | `\ in higher esteem those who think alike than those who think | _o__)differently." -- Friedrich Nietzsche | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: What makes an iterator an iterator?

2007-04-18 Thread Ben Finney
nd | `\ action, where it often substitutes for both." -- John Andrew | _o__) Holmes, _Wisdom in Small Doses_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Needless copying in iterations?

2007-09-15 Thread Ben Finney
en we call others dogmatic, what we really object to is | `\ their holding dogmas that are different from our own." -- | _o__) Charles Issawi | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Needless copying in iterations?

2007-09-16 Thread Ben Finney
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sun, 16 Sep 2007 15:05:55 +1000, Ben Finney wrote: > > The compiler for a dynamic language like Python has very little > > absolute "no significant side-effect in these specific cases" > > guarantee of the

CherryPy support (was: The path '/' was not found.)

2007-09-16 Thread Ben Finney
sionalism has no place in art, and hacking is art. | `\ Software Engineering might be science; but that's not what I | _o__)do. I'm a hacker, not an engineer." -- Jamie W. Zawinski | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Python "with"

2007-09-16 Thread Ben Finney
within." -- Mahatma Gandhi | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Why 'class spam(object)' instead of class spam(Object)' ?

2007-09-17 Thread Ben Finney
e type is built-in. -- \ "The trouble with the rat race is that even if you win, you're | `\still a rat." -- Jane Wagner, via Lily Tomlin | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

super() doesn't get superclass

2007-09-17 Thread Ben Finney
badly misnamed, and falsely documented. Can anyone point me to a counter-argument to the above article? -- \"The World is not dangerous because of those who do harm but | `\ because of those who look at it without doing anything." | _o__) —Albert Einstein | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: super() doesn't get superclass

2007-09-17 Thread Ben Finney
Evan Klitzke <[EMAIL PROTECTED]> writes: > On Tue, 2007-09-18 at 14:15 +1000, Ben Finney wrote: > > Why does the documentation of 'super' say that it returns the > > superclass when *that's not true*? It doesn't return the > > superclass, it retu

Re: super() doesn't get superclass

2007-09-17 Thread Ben Finney
"Quidquid latine dictum sit, altum viditur." ("Whatever is | `\ said in Latin, sounds profound.") -- Anonymous | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: super() doesn't get superclass

2007-09-17 Thread Ben Finney
responding to. -- \ "Even if the voices in my head are not real, they have pretty | `\ good ideas." —anonymous | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: The meaning of a = b in object oriented languages

2007-09-17 Thread Ben Finney
, orthogonal to whether OOP is involved. -- \ "Our task must be to free ourselves from our prison by widening | `\our circle of compassion to embrace all humanity and the whole | _o__) of nature in its beauty." —Albert Einstein | Ben Finney -- http://m

Re: super() doesn't get superclass

2007-09-17 Thread Ben Finney
Sorry, I read your message too fast and responded to the wrong point :-) [EMAIL PROTECTED] (Alex Martelli) writes: > Ben Finney <[EMAIL PROTECTED]> wrote: > > Am I mistaken in thinking that "superclass of foo" is equivalent > > to "parent class of foo"

Re: super, apply, or __init__ when subclassing?

2007-09-18 Thread Ben Finney
> so most people use your example 1. -- \"The most merciful thing in the world... is the inability of | `\ the human mind to correlate all its contents." -- Howard | _o__)Philips Lovecraft | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: super() doesn't get superclass

2007-09-18 Thread Ben Finney
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Ben Finney a écrit : > > Evan Klitzke <[EMAIL PROTECTED]> writes: > >> On Tue, 2007-09-18 at 14:15 +1000, Ben Finney wrote: > >>> [the 'super' function] doesn't return the superclass, it

Re: super() doesn't get superclass

2007-09-18 Thread Ben Finney
the Lord doesn't work that way so I stole | _o__)one and asked Him to forgive me." -- Emo Philips | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie: self.member syntax seems /really/ annoying

2007-09-18 Thread Ben Finney
hen visually scanning the code, and fails the "explicit" principle. -- \"I have the simplest tastes. I am always satisfied with the | `\best." -- Oscar Wilde | _o__)

Re: [ANN] Metatest 0.1.0

2007-09-18 Thread Ben Finney
\ "An eye for an eye would make the whole world blind." -- | `\Mahatma Gandhi | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Using pseudonyms

2007-09-18 Thread Ben Finney
gn: 'Rest Area 25 Miles'. That's pretty big. Some | `\ people must be really tired." -- Steven Wright | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Metatest 0.1.0

2007-09-18 Thread Ben Finney
[Jonathan, please don't send me copies of messages sent to the discussion thread. I follow comp.lang.python via a non-mail interface, and it's irritating to get unwanted copies of messages via email.] Jonathan Fine <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > &

Re: super() doesn't get superclass

2007-09-18 Thread Ben Finney
?" won't be misled into trying to use *the wrong function for that purpose*. -- \ "If you can't annoy somebody there is little point in writing." | `\ -- Kingsley Amis | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: super() doesn't get superclass

2007-09-19 Thread Ben Finney
Hrvoje Niksic <[EMAIL PROTECTED]> writes: > Ben Finney <[EMAIL PROTECTED]> writes: > > > Evan is claiming that "the next class in the MRO _is_ a superclass", > > apparently by his definition or some other that I've not seen. > > The defi

Re: super() doesn't get superclass

2007-09-19 Thread Ben Finney
Scott David Daniels <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > [EMAIL PROTECTED] (Alex Martelli) writes: > > > >> In general, "a superclass of foo" means "a class X such that foo is a > >> sublass of X" > > > > Sure

Re: super() doesn't get superclass

2007-09-19 Thread Ben Finney
Scott David Daniels <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > [EMAIL PROTECTED] (Alex Martelli) writes: > > > >> In general, "a superclass of foo" means "a class X such that foo is a > >> sublass of X" > > > > Sure

Re: super() doesn't get superclass

2007-09-19 Thread Ben Finney
Scott David Daniels <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > [EMAIL PROTECTED] (Alex Martelli) writes: > > > >> In general, "a superclass of foo" means "a class X such that foo is a > >> sublass of X" > > > > Sure

cmsg cancel <[EMAIL PROTECTED]>

2007-09-19 Thread Ben Finney
I am canceling my own article. -- http://mail.python.org/mailman/listinfo/python-list

cmsg cancel <[EMAIL PROTECTED]>

2007-09-19 Thread Ben Finney
I am canceling my own article. -- http://mail.python.org/mailman/listinfo/python-list

Mixin classes and single/multiple inheritance (was: super() doesn't get superclass)

2007-09-19 Thread Ben Finney
- \ "As we enjoy great advantages from the inventions of others, we | `\ should be glad to serve others by any invention of ours." -- | _o__) Benjamin Franklin | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: super() doesn't get superclass

2007-09-19 Thread Ben Finney
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Thu, 20 Sep 2007 12:00:40 +1000, Ben Finney wrote: > > > In its latter form, it is worthless to me when I'm looking for > > "get superclass of A", but its name and parameters and > > documentat

Re: Mixin classes and single/multiple inheritance

2007-09-19 Thread Ben Finney
d for someone looking to do what mixin classes do? -- \ "In case you haven’t noticed, [the USA] are now almost as | `\ feared and hated all over the world as the Nazis were." -- | _o__) Kurt Vonnegut, 2004 | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Mixin classes and single/multiple inheritance

2007-09-19 Thread Ben Finney
Michele Simionato <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > What do you see as an appropriate use of mixin classes, and what > > an abuse? > > An example of fine usage of mixin is Tkinter; an example of bad > usage if Zope 2. Which parts of those two ver

Re: Mixin classes and single/multiple inheritance

2007-09-19 Thread Ben Finney
-- \ "The best way to get information on Usenet is not to ask a | `\question, but to post the wrong information." -- Aahz | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Tapping into the access of an int instance

2007-09-20 Thread Ben Finney
ccess"? Also, some similar events involving the instance that would *not* trigger the same thing. -- \ "The generation of random numbers is too important to be left | `\ to chance." -- Robert R. Coveyou | _o__)

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread Ben Finney
ion of knowledge to an elite group destroys the | `\ spirit of society and leads to its intellectual | _o__) impoverishment." —Albert Einstein | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: SHOCK: WHY None?

2007-09-21 Thread Ben Finney
" "Well, I think so, | `\Brain, but if Jimmy cracks corn, and no one cares, why does he | _o__)keep doing it?" -- _Pinky and The Brain_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Factory function with keyword arguments

2007-09-23 Thread Ben Finney
authority." —Richard Dawkins, Big Mistake (The Guardian) | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing parameters at the command line (New Python User)

2007-09-24 Thread Ben Finney
module http://docs.python.org/lib/module-optparse> from the standard library. -- \ "Holy knit one purl two, Batman!" -- Robin | `\ | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: vim - what's a smarttab?

2007-09-24 Thread Ben Finney
-- The Goon Show, _Rommel's Treasure_ | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Nested For and While Statements

2007-09-24 Thread Ben Finney
blem. Only then should you post the code — if, of course, you haven't yet seen the solution with your own eyes. -- \"Laurie got offended that I used the word 'puke.' But to me, | `\ that's what her dinner tasted like." -- Jack Handey | _o__)

Support for Vim (was: vim - what's a smarttab?)

2007-09-24 Thread Ben Finney
want." --Larry Wall | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: obtaining multiple values from a function.

2007-09-25 Thread Ben Finney
ion -- \"I have one rule to live by: Don't make it worse." -- Hazel | `\ Woodcock | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Test-driven development and code size (was: What is a good way of having several versions of a python module installed in parallell?)

2007-09-25 Thread Ben Finney
-- \ "My mother was like a sister to me, only we didn't have sex | `\ quite so often." -- Emo Philips | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Python XML API's that preserve XML comments?

2007-09-25 Thread Ben Finney
http://www.w3.org/TR/REC-xml/#sec-comments> -- \ "Demagogue: One who preaches doctrines he knows to be untrue to | `\ men he knows to be idiots." -- Henry L. Mencken | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: An Editor that Skips to the End of a Def

2007-09-25 Thread Ben Finney
'Gestalt' verstehen Sie nicht? [What part of | `\ 'gestalt' don't you understand?]" -- Karsten M. Self | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: stopping a while True: with the keyboard

2007-09-25 Thread Ben Finney
ess", there's no OS-independent way to do that. You'll need to write code that depends on a particular way of getting at keypresses that won't work on all operating systems. -- \ "Those who write software only for pay should go hurt some | `\ other

setuptools without unexpected downloads

2007-09-25 Thread Ben Finney
ithin the 'setup.py' program, so my users don't have to be aware of this unexpected default behaviour? -- \ "I disapprove of what you say, but I will defend to the death | `\ your right to say it." -- Evelyn Beatrice Hall, _The Friends | _o__)

Re: setuptools without unexpected downloads

2007-09-25 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> writes: > How can I, as the distributor of a package using setuptools, gain > the benefits of dependency declaration and checking, without the > drawback of unexpected and potentially unwanted download and > installation? To clarify: I want to

Re: setuptools without unexpected downloads

2007-09-26 Thread Ben Finney
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > Ben Finney schrieb: > > To clarify: I want to retain the "assert the specified > > dependencies are satisfied" behaviour, without the "... and, if > > not, download and install them the Setupto

Packaging and dependencies (was: setuptools without unexpected downloads)

2007-09-26 Thread Ben Finney
every dependency with every separate application. -- \ "If [a technology company] has confidence in their future | `\ ability to innovate, the importance they place on protecting | _o__) their past innovations really should decline." -- Gary Barnett | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: setuptools without unexpected downloads

2007-09-26 Thread Ben Finney
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > How would I modify my 'setup.py' script so that its default > > behaviour, when dependencies are not met, is not "download and > > install dependencies via

Re: Test-driven development and code size

2007-09-26 Thread Ben Finney
vant to any programmer trying to adopt the practice. Its "web links" section is also a useful starting point. -- \ "I hope that after I die, people will say of me: 'That guy sure | `\ owed me a lot of money.'" -- Jack Handey | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Packaging and dependencies

2007-09-26 Thread Ben Finney
Steve Holden <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > So, if fifteen different programs depend on library X, we'd have > > fifteen *separate* installations of library X on the same machine? > > > You need to get your opinions up to date. Fifteen copi

Numeric command-line options vs. negative-number arguments (was: getopt with negative numbers?)

2007-09-27 Thread Ben Finney
pecify IPv4 or IPv6. If argparse treats those as numeric arguments instead of options, that's violating the Principle of Least Astonishment for established command-line usage (hyphen introduces an option). -- \ "I went to a general store. They wouldn't let me buy anything |

Re: Python 3.0 migration plans?

2007-09-27 Thread Ben Finney
9/>, http://www.python.org/dev/peps/pep-3110/> - Abstract Base Classes http://www.python.org/dev/peps/pep-3119/> - everything that's being added to 2.6 :-) -- \ "I bought a self learning record to learn Spanish. I turned it | `\ on and went to sle

Re: getopt with negative numbers?

2007-09-27 Thread Ben Finney
on | `\ technology as a McDonalds Certified Food Specialist is to the | _o__) culinary arts." —Michael Bacarella | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Numeric command-line options vs. negative-number arguments

2007-09-28 Thread Ben Finney
as an option (unless it follows an explicit '--' option), and complain if the option is unknown. -- \ "When I was a kid I used to pray every night for a new bicycle. | `\Then I realised that the Lord doesn't work that way so I stole | _o__)one and asked Hi

Re: getopt with negative numbers?

2007-09-28 Thread Ben Finney
type on a command line will be treated as an option or an argument. -- \"When I was crossing the border into Canada, they asked if I | `\ had any firearms with me. I said, 'Well, what do you need?'" | _o__) -- Ste

Re: Optparse and help formatting?

2007-09-29 Thread Ben Finney
invocation. -- \"Members of the general public commonly find copyright rules | `\ implausible, and simply disbelieve them." -- Jessica Litman, | _o__) _Digital Copyright_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: getopt with negative numbers?

2007-09-29 Thread Ben Finney
Carl Banks <[EMAIL PROTECTED]> writes: > On Sep 28, 6:19 pm, Ben Finney <[EMAIL PROTECTED]> > wrote: > > Steven Bethard <[EMAIL PROTECTED]> writes: > > > A user shouldn't have to go out of their way to specify regular > > > numbers on the comma

Re: Using fractions instead of floats

2007-09-30 Thread Ben Finney
"exact representation" problem, it doesn't solve it. -- \ "Facts do not cease to exist because they are ignored." -- | `\ Aldous Huxley | _o__) |

Editor extensions to get a full IDE (was: An Editor that Skips to the End of a Def)

2007-09-30 Thread Ben Finney
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Ben Finney a écrit : > > Both Emacs and Vim are highly customisable text editors. They are > > configurable with complete programming languages specific to the > > program, and both have a huge community of pro

Re: Function return a dictionary

2007-10-01 Thread Ben Finney
s | `\ relevant as the question of whether submarines can swim." | _o__)—Edsger W. Dijkstra | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: reliable unit test logging

2007-10-01 Thread Ben Finney
uot; Test cases for FooBar """ def test_slices_spam(self): """ FooBar should slice spam """ self.failUnless(sends_spam) def test_eats_eggs(self): """ FooBar should eat eggs "

Re: reliable unit test logging

2007-10-02 Thread Ben Finney
| _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: readline() - problem

2007-10-02 Thread Ben Finney
ine) -- \ "The cost of a thing is the amount of what I call life which is | `\ required to be exchanged for it, immediately or in the long | _o__)run." -- Henry David Thoreau | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: module confusion

2007-10-03 Thread Ben Finney
is contagious ... if the government becomes a | `\lawbreaker, it breeds contempt for the law." -- Justice Louis | _o__) Brandeis | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: reliable unit test logging

2007-10-03 Thread Ben Finney
;Philosophy is questions that may never be answered. Religion | `\ is answers that may never be questioned." —anonymous | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: migrating to packages

2007-10-03 Thread Ben Finney
er necessary, since the same object is now also available by the name 'Foo' directly from 'mypackage' because you explicitly put it there. -- \ "Pinky, are you pondering what I'm pondering?" "Uh, I think so, | `\ Brain, but we'll never get a monkey to use dental floss." -- | _o__)_Pinky and The Brain_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: module confusion

2007-10-03 Thread Ben Finney
uot; does *not* describe them in the absence of those necessary and non-default qualifiers, and is misleading. -- \ "I wish there was a knob on the TV to turn up the intelligence. | `\ There's a knob called 'brightness' but it doesn't work." -- | _o__)

Test doubles (stubs and mocks) for unit testing (was: unit testing)

2007-10-05 Thread Ben Finney
gt; -- \"I'd take the awe of understanding over the awe of ignorance | `\ any day." -- Douglas Adams | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: unit testing

2007-10-05 Thread Ben Finney
try: >thingy() >assert 42 == 43 Clearer would be: assert False > except GoodException: >pass -- \"Some people, when confronted with a problem, think 'I know, | `\ I'll use regular expressions'. Now they have

Re: unit testing

2007-10-05 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> writes: > Paul Rubin <http://[EMAIL PROTECTED]> writes: > > > Giampaolo Rodolà <[EMAIL PROTECTED]> writes: > > > What's the equivalent of unittest's "assertRaises"? > > > > def test_raises(): &

Re: unit testing

2007-10-06 Thread Ben Finney
Paul Rubin <http://[EMAIL PROTECTED]> writes: > Ben Finney <[EMAIL PROTECTED]> writes: > > Or even better: > > > > def test_raises_good_exception(): > > try: > > thingy() > > Well if we're grading on style, m

Re: EasyMock for python ?

2007-10-11 Thread Ben Finney
d creating the instance is to seed it with anything you *don't* want returned as a Mock. -- \ "Laugh and the world laughs with you; snore and you sleep | `\ alone." -- Anonymous | _o__)

Re: EasyMock for python ?

2007-10-12 Thread Ben Finney
(Please don't send me personal copies of messages that are sent to the forum; I read via the newsgroup, and it's annoying to also get replies in email when I didn't send an email message.) "Simon Brunning" <[EMAIL PROTECTED]> writes: > On 10/12/07, Ben Finney &

Re: test if email

2007-10-12 Thread Ben Finney
nly the final delivery host gets to say whether it's valid or not. -- \ "Saying that Java is nice because it works on all OSes is like | `\saying that anal sex is nice because it works on all genders" | _o__) -- http://bash.org/ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: EasyMock for python ?

2007-10-15 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> writes: > I've had good results with Ian Bicking's 'minimock.py' > http://blog.ianbicking.org/minimock.html>. It uses the existing > 'doctest' functionality for its output [...] That doesn't make much sense,

Re: confused on calculating date difference in days.

2007-10-16 Thread Ben Finney
ime.timedelta(4, 25526) >>> value - datetime.datetime(2007, 11, 26, 0, 0, 0) datetime.timedelta(-41, 55845) -- \ "Experience is that marvelous thing that enables you to | `\ recognize a mistake when you make it again." -- Franklin P. | _o__)Jones | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: magnitude 0.9.1

2007-10-16 Thread Ben Finney
are part of the module I'm trying to learn about, and which are not. -- \ "I'm beginning to think that life is just one long Yoko Ono | `\ album; no rhyme or reason, just a lot of incoherent shrieks and | _o__) then it's over." -- Ian Wolff | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: confused on calculating date difference in days.

2007-10-16 Thread Ben Finney
s program." | `\—Microsoft Vista security dialogue | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: magnitude 0.9.1

2007-10-16 Thread Ben Finney
[EMAIL PROTECTED] (Joan M. Garcia) writes: > Ben Finney <[EMAIL PROTECTED]> writes: > > Please don't ever recommend 'from foo import *' in end-user > > documentation. [...] > > Got it, and solved. Thanks. Thanks for the quick response. A further

Re: Python's coming... from unexpected angles.

2007-10-16 Thread Ben Finney
Brain, but what kind of rides do they have in Fabioland?" -- | _o__)_Pinky and The Brain_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: magnitude 0.9.1

2007-10-16 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> writes: > A further issue, that requires a change of interface: Please comply > with PEP 8 http://www.python.org/dev/peps/pep-0008/> for your > module interface. In particular, please name classes with TitleCase, > and functions, methods, an

<    21   22   23   24   25   26   27   28   29   30   >