Re: basic questions on cmp, < and sort

2006-10-25 Thread Ben Finney
"", line 1 sort([[1,2,3],["ABC"],['Z','A'], X(), 4) ^ SyntaxError: invalid syntax Care to give an actual example? -- \"I went to the hardware store and bought some used paint. It | `\ was in the shape of a house." -- Steven Wright | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: question about True values

2006-10-25 Thread Ben Finney
quot; -- Groucho Marx | `\ | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem Commenting within Filehandle Iteration

2006-10-26 Thread Ben Finney
e, and get the lines back again later from your version control system. -- \ "I am an optimist. It does not seem too much use being anything | `\ else." -- Winston Churchill | _o__)

Re: Problem Commenting within Filehandle Iteration

2006-10-26 Thread Ben Finney
Fredrik Lundh <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > > My preferred answer: > > > > if m: > > print line, > > > > and get the lines back again later from your version control system. > > switching debugging stateme

Re: Printing Hidden Character in Python

2006-10-26 Thread Ben Finney
to success in life: 1. Don't tell people everything | `\ you know." -- Sassan Tat | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing Hidden Character in Python

2006-10-26 Thread Ben Finney
[Please don't top-post replies. I've corrected it in this post.] Wijaya Edward <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > Wijaya Edward <[EMAIL PROTECTED]> writes: > > > How can we print out the hidden character like "\n", "\r

Re: Cards deck problem

2006-10-26 Thread Ben Finney
#x27;re not here to do your homework assignments. -- \ "It is seldom that liberty of any kind is lost all at once." | `\ -- David Hume | _o__) | Ben Finne

Re: Debugging

2006-10-26 Thread Ben Finney
Fulvio <[EMAIL PROTECTED]> writes: > *** > Your mail has been scanned by InterScan MSS. > *** Please stop sending messages with obnoxious headers like this. -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling emails

2006-10-26 Thread Ben Finney
Fulvio <[EMAIL PROTECTED]> writes: > *** > Your mail has been scanned by InterScan MSS. > *** Please stop sending messages with obnoxious headers like this. -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling emails

2006-10-26 Thread Ben Finney
long! Mind if I sign it now and read it | _o__) later?" -- http://www.achewood.com/ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: doesnt seems to work can any help be provided

2006-10-26 Thread Ben Finney
little kid we had a sand box. It was a quicksand | `\box. I was an only child... eventually." -- Steven Wright | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: question about True values

2006-10-26 Thread Ben Finney
, your system may become | `\ unstable." -- Microsoft, Windows 95 BSOD message | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the best IDE?

2006-10-26 Thread Ben Finney
"If you get invited to your first orgy, don't just show up | `\ nude. That's a common mistake. You have to let nudity | _o__) 'happen.'" -- Jack Handey | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Sentinel values for special cases

2006-10-26 Thread Ben Finney
200610.html#e20061022T192641> -- \ "Immorality: The morality of those who are having a better | `\ time." -- Henry L. Mencken | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Insert Content of a File into a Variable

2006-10-26 Thread Ben Finney
what else you can do with them. -- \ "A free society is one where it is safe to be unpopular." -- | `\ Adlai Ewing Stevenson | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling emails

2006-10-26 Thread Ben Finney
"Peter Decker" <[EMAIL PROTECTED]> writes: > On 10/26/06, Ben Finney <[EMAIL PROTECTED]> wrote: > > There is always the option to not send messages to this list using > > that mail server. I don't care what option is taken, so long as > > the us

Re: Insert Content of a File into a Variable

2006-10-26 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> writes: > The 'read' method of the resulting file object will return the > contents of the file. You may also want to read the documentation of > thile objects to see what else you can do with them. And ith you couldn't underthtand my

Re: Tracing the execution of scripts?

2006-10-26 Thread Ben Finney
mptom that arises from people who are first advised to introduce tests to their code, though. -- \ "If you ever catch on fire, try to avoid seeing yourself in the | `\mirror, because I bet that's what REALLY throws you into a | _o__)

Truth value of iterators [was: question about True values)

2006-10-26 Thread Ben Finney
that boolean contexts can interpret as "false"? Perhaps allowing (but not requiring) an iterator object to grow a 'len' method is the simplest way. -- \ "I like my dental hygenist, I think she's very pretty; so when | `\I go to have my teeth cleaned, while I&#

Re: Sentinel values for special cases

2006-10-26 Thread Ben Finney
; class, since the instance name will make its meaning clear, and other instances don't need to share any behaviour or semantics. -- \ "There is no reason anyone would want a computer in their | `\ home." -- Ken Olson, president, chairman and founder of | _o__)Digital Equipment Corp., 1977 | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling emails

2006-10-27 Thread Ben Finney
Fulvio <[EMAIL PROTECTED]> writes: > On Friday 27 October 2006 06:48, Ben Finney wrote: > > There is always the option to not send messages to this list using > > that mail server > > Once again sorry for that. I'll take action to switch to another > mailserver

Re: Sentinel values for special cases

2006-10-27 Thread Ben Finney
[EMAIL PROTECTED] (Aahz) writes: > Ben Finney <[EMAIL PROTECTED]> wrote: > >Use a unique do-nothing object, defined at the module level so > >callers can easily get at it [...] > > > >GLOBAL = object() > > > >def insert_ids(ids=GLOBAL): &g

Re: Sentinel values for special cases

2006-10-27 Thread Ben Finney
Gabriel Genellina <[EMAIL PROTECTED]> writes: > At Friday 27/10/2006 11:40, Aahz wrote: > > Ben Finney wrote: > > >GLOBAL = object() > > > > > >def insert_ids(ids=GLOBAL): > > >if ids is GLOBAL: > > >ids = g

Re: Cards deck problem

2006-10-27 Thread Ben Finney
uot; -- | `\ Vroomfondel, _The Hitch-Hiker's Guide To The Galaxy_, Douglas | _o__)Adams | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Test-driven development (was: Tracing the execution of scripts?)

2006-10-27 Thread Ben Finney
"Michael B. Trausch" writes: > Ben Finney wrote: > > Jean-Paul Calderone <[EMAIL PROTECTED]> writes: > > > >> 1) Write unit tests for your code. Keep writing unit tests until > >> you have some that _don't pass_. Then fix your code so that

Re: Where do nested functions live?

2006-10-28 Thread Ben Finney
nction type. Define a class that has a '__call__' attribute, make an instance of that, and you'll be able to access attributes and call it like a function. -- \ "Writing a book is like washing an elephant: there no good | `\place to begin or end, and it's hard to keep track of what | _o__) you've already covered." -- Anonymous | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help (Basic python)...what did I do wrong?

2006-10-28 Thread Ben Finney
#x27;ll need to rewrite it so it does what you're actually trying to do. Again, please make sure you work on these problems yourself; your assessment should not be testing your ability to ask on the internet for assistance. -- \ "All good things are cheap; all bad are very dear.&

Re: Reverse function python? How to use?

2006-10-29 Thread Ben Finney
-- \ "For of those to whom much is given, much is required." -- | `\ John F. Kennedy | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: enumerate improvement proposal

2006-10-29 Thread Ben Finney
really want that, you could subclass 'enumerate', but it seems the above function does what you want. -- \"I installed a skylight in my apartment. The people who live | `\ above me are furious!" -- Steven Wright | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: enumerate improvement proposal

2006-10-29 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> writes: > >>> print enumerate("ABCDE") > > >>> print list(enumerate("ABCDE")) > [(0, 'A'), (1, 'B'), (2, 'C'), (3, 'D'), (4, 'E')] > &

Re: dict problem

2006-10-30 Thread Ben Finney
problems with the same thinking we used | `\ when we created them." -- Albert Einstein | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I import a script with an arbitrary name ?

2006-10-30 Thread Ben Finney
e_name, 'r') exec module_file in module.__dict__ return module -- \ "A celebrity is one who is known by many people he is glad he | `\ doesn't know." -- Henry L. Mencken | _o__)

Re: enumerate improvement proposal

2006-10-30 Thread Ben Finney
on't have the commitment for that. What if I were to C-x C-v a few different ones instead? -- \"If you continue running Windows, your system may become | `\ unstable." -- Microsoft, Windows 95 BSOD message | _o__)

Re: How can I import a script with an arbitrary name ?

2006-10-31 Thread Ben Finney
"Steven D'Aprano" <[EMAIL PROTECTED]> writes: > On Tue, 31 Oct 2006 11:00:52 +1100, Ben Finney wrote: > > > If you want a solution that gives you an actual module object, > > here's what I use: > > > > def make_module_from_file(mo

Re: best way to check if a file exists?

2006-10-31 Thread Ben Finney
er OS errors? -- \"We have to go forth and crush every world view that doesn't | `\ believe in tolerance and free speech." -- David Brin | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to check if a file exists?

2006-11-01 Thread Ben Finney
exist" > print f Except that there are other conditions than "File doesn't exist" that can cause an 'open' to fail. -- \"If you continue running Windows, your system may become | `\ unstable." -- Microsoft, Windows 95 B

Re: best way to check if a file exists?

2006-11-01 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > You could try to read the file, if that fails it doesn't exist: > > > > Except that there are other c

Re: Style for modules with lots of constants

2006-11-01 Thread Ben Finney
icate they shouldn't be re-bound. -- \ "Everything you read in newspapers is absolutely true, except | `\for that rare story of which you happen to have first-hand | _o__) knowledge." -- Erwin Knoll | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: can I import the module twice (under differnet names)

2006-11-01 Thread Ben Finney
147483647 -- \ "Laugh and the world laughs with you; snore and you sleep | `\ alone." -- Anonymous | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Python tools for managing static websites?

2006-11-01 Thread Ben Finney
anyone's interested. Yes please. -- \ "The opposite of a correct statement is a false statement. But | `\ the opposite of a profound truth may well be another profound | _o__) truth." -- Niels Bohr | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: other ways to check for ?

2006-11-02 Thread Ben Finney
time and you see somebody else | `\ flying forward into the future, it's probably best to avoid eye | _o__) contact." -- Jack Handey | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Javascript is turning into Python?!

2006-11-03 Thread Ben Finney
man of value." -- Albert Einstein | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: assigning values in __init__

2006-11-06 Thread Ben Finney
instead of just the one list. This is one of the many reasons why Python's built-in composite types are so useful. A group of semantically-related values can be passed as a single composite value. -- \ "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: assigning values in __init__

2006-11-07 Thread Ben Finney
fool you. He really is an idiot." -- Groucho Marx | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: for x in... x remains global

2006-11-08 Thread Ben Finney
64624.html> A search for the separate terms "python iteration variable scope" will turn up more. -- \ "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: python Error: IndentationError: expected an indented block

2006-11-08 Thread Ben Finney
t's been altered. -- \ "I have a large seashell collection, which I keep scattered on | `\the beaches all over the world. Maybe you've seen it." -- | _o__) Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: assigning values in __init__

2006-11-08 Thread Ben Finney
John Salerno <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > If you pass a *mapping* of the > > "I-might-want-to-add-more-in-the-future" values, then you get both > > explicit *and* expandable, without an arbitrary unneeded sequence. > > Do you m

Re: is this the right way to do subclasses?

2006-11-08 Thread Ben Finney
ought a self learning record to learn Spanish. I turned it | `\on and went to sleep; the record got stuck. The next day I | _o__)could only stutter in Spanish." -- Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Py3K idea: why not drop the colon?

2006-11-09 Thread Ben Finney
stance between two points is under | `\ construction." -- Noelie Alito | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: how is python not the same as java?

2006-11-09 Thread Ben Finney
quot; -- Charles A. | `\ Beardsley | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: how is python not the same as java?

2006-11-10 Thread Ben Finney
Steve Holden <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > Steve Holden <[EMAIL PROTECTED]> writes: > >> Java is horrible, Oython is not. > > Is that the predecessor to Python, the one that could only be > > expressed in vowel noises? > > &

Re: how is python not the same as java?

2006-11-11 Thread Ben Finney
Contract, sir, and the Piano is yours." | `\ Ray: "Sheesh! This is long! Mind if I sign it now and read it | _o__) later?" -- http://www.achewood.com/ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: handling many default values

2006-11-11 Thread Ben Finney
quot; -- Unix Programmer's Manual, 2nd Ed., 12-Jun-1972 | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: reduce to be removed?

2006-11-12 Thread Ben Finney
e world is either a madman or an economist." -- Kenneth | _o__) Boulding | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Decimal() instead of float?

2006-11-12 Thread Ben Finney
| `\ trifling exception, is composed of others." -- John Andrew | _o__) Holmes | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Random image text generation?

2006-11-12 Thread Ben Finney
for exactly the reason you state. -- \"To me, boxing is like a ballet, except there's no music, no | `\choreography, and the dancers hit each other." -- Jack Handey | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Random image text generation?

2006-11-12 Thread Ben Finney
ngtest/> -- \ "A free society is one where it is safe to be unpopular." -- | `\ Adlai Ewing Stevenson | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: how do i map this?

2006-11-12 Thread Ben Finney
specifiers; it just wants a string expression. It's the formatting operator, '%', that looks for them. http://docs.python.org/lib/typesseq-strings.html> -- \ "When I was little, my grandfather used to make me stand in a | `\ closet for five minutes without moving. He said it was elevator | _o__) practice." -- Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: how do i map this?

2006-11-12 Thread Ben Finney
"John Machin" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > You're printing a string, and never using that 'row' parameter. > > If that is so, why is he getting that message "TypeError: format > requires a mapping"? No idea. Probab

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Ben Finney
umber of characters, even though it is affected when they change. -- \ "I bought a self learning record to learn Spanish. I turned it | `\on and went to sleep; the record got stuck. The next day I | _o__) could only stutter in Spanish." -- Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Ben Finney
ed.'" -- Steven Wright | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Test-driven development of random algorithms

2006-11-13 Thread Ben Finney
\ "It is the mark of an educated mind to be able to entertain a | `\ thought without accepting it." -- Aristotle | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing/writing an integer to a file

2006-11-16 Thread Ben Finney
enumber, in_line) out_file.write(out_line) This also means you're one easy step away from padding the line number to a minimum width:: out_line = "%06d:: %s" % (linenumber, in_line) -- \ "I must say that I find television very educational. The minute | `\ somebody turns it on, I go to the library and read a book." -- | _o__) Groucho Marx | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing/writing an integer to a file

2006-11-16 Thread Ben Finney
"Steven D'Aprano" <[EMAIL PROTECTED]> writes: > On Fri, 17 Nov 2006 14:18:12 +1100, Ben Finney wrote: > > > The function call syntax doesn't allow a space between the > > function name and the opening parenthesis. > > Are you sure? Are you kid

Re: send an email with picture/rich text format in the body

2006-05-28 Thread Ben Finney
"Prediction is very difficult, especially of the future." -- | `\Niels Bohr | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: send an email with picture/rich text format in the body

2006-05-29 Thread Ben Finney
Max M <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > "anya" <[EMAIL PROTECTED]> writes: > > > > > >>Acctualy there is a solution: > >>see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473810 > > > >

Re: shuffling elements of a list

2006-05-30 Thread Ben Finney
w', 'u'], ['e', 'i'], ['r', 'o'], ['t', 'p']] >>> print pileshuffle(deck, 3) [['q', 'r', 'u', 'p'], ['w', 't', 'i'], ['e', 'y&

Re: [OT] whitespace

2006-05-31 Thread Ben Finney
who do. And for the people who like country music, | _o__) denigrate means 'put down'." -- Bob Newhart | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Best Python Editor

2006-05-31 Thread Ben Finney
http://www.gnu.org/software/emacs/> -- \ "A child of five could understand this. Fetch me a child of | `\ five." -- Groucho Marx | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: create a text file

2006-05-31 Thread Ben Finney
rint filename result_00123.txt -- \"When you go in for a job interview, I think a good thing to | `\ ask is if they ever press charges." -- Jack Handey | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: shuffling elements of a list

2006-06-01 Thread Ben Finney
"Gerard Flanagan" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > pile_index = 0 > > for card in deck: > > piles[pile_index].append(card) > > pile_index = (pile_index + 1) % numpiles > > > > no ne

Re: losing handles of open files

2006-06-01 Thread Ben Finney
s the action of the thinking | _o__) power called an idea" -- Thomas Jefferson | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: C# equivalent to range()

2006-06-01 Thread Ben Finney
cribing the behaviour you want from your program. -- \ "The only tyrant I accept in this world is the still voice | `\ within." -- Mahatma Gandhi | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance structure less important in dynamic languages?

2006-06-01 Thread Ben Finney
it look round?" Eccles: "Yes, but I don't think it saw me." | _o__) -- The Goon Show, _Wings Over Dagenham_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: how to erase a variable

2006-06-02 Thread Ben Finney
n ends. This greatly aids the person reading the program: they have fewer things to concentrate on at any point in your program. -- \ "For every complex problem, there is a solution that is simple, | `\neat, and wrong." -- Henry L. Mencken | _o__)

Re: __getattr__ question

2006-06-09 Thread Ben Finney
perty, it is the action of the thinking | _o__) power called an idea" -- Thomas Jefferson | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Difference between copy and link (was: Re: os.link makes a copy, not a link)

2006-06-09 Thread Ben Finney
omes from | `\ bad judgement." -- Frederick P. Brooks | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing PNG with pure Python

2006-06-12 Thread Ben Finney
ut that author in future, while still preserving their copyright. -- \"I was in the grocery store. I saw a sign that said 'pet | `\ supplies'. So I did. Then I went outside and saw a sign that | _o__) said 'compact cars'." -- Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing PNG with pure Python

2006-06-13 Thread Ben Finney
chosen the Expat license as being acceptable; use that, and you grant all the rest without even mentioning it. -- \ "[On the Internet,] power and control will shift to those who | `\ are actually contributing something useful rather than just | _o__)

Test functions and test discovery (was: Re: Is there a better way of accessing functions in a module?)

2006-06-13 Thread Ben Finney
posters on this thread and encourage you to consider using the standard 'unittest' module, and recommend 'nose' for test discovery and execution: http://somethingaboutorange.com/mrl/projects/nose/> -- \ "Unix is an operating system, OS/2 is half an operating system, | `\

Re: How do I ignore the errors thrown by the DB api?

2006-06-13 Thread Ben Finney
-- \ "A lot of people are afraid of heights. Not me, I'm afraid of | `\widths." -- Steven Wright | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Bundling an application with third-party modules

2006-06-13 Thread Ben Finney
-- Emo Philips | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Test functions and test discovery

2006-06-14 Thread Ben Finney
bruno at modulix <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > (snip) > > if __name__ == "__main__": > > test_funcs = [x for name, x in globals() > > if name.startswith("test") and hasattr(x, "__call__"

Re: Writing PNG with pure Python

2006-06-14 Thread Ben Finney
"Johann C. Rocholl" <[EMAIL PROTECTED]> writes: > Ben Finney schrieb: > > Simplify. Please don't attempt to write yet another set of license > > terms without expert legal assistance. You've already chosen the > > Expat license as being acceptable; u

Re: Bundling an application with third-party modules

2006-06-14 Thread Ben Finney
| _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Negative hex to int

2006-06-14 Thread Ben Finney
return int_val Adjust for whatever algorithm you want to use. Consult a book of algorithms if you want a better implementation than my off-the-cuff brute-force approach. -- \ "Remorse: Regret that one waited so long to do it." -- Henry | `\L. Mencken | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: nested functions

2006-06-14 Thread Ben Finney
they avoid." -- Soren Aabye Kierkegaard | _o__) (1813-1855) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Bundling an application with third-party modules

2006-06-14 Thread Ben Finney
"Serge Orlov" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > That's a large part of my question. How can I lay out these > > modules sensibly during installation so they'll be easily > > available to, but specific to, my application? > >

Re: Negative hex to int

2006-06-14 Thread Ben Finney
John Machin <[EMAIL PROTECTED]> writes: > On 15/06/2006 10:31 AM, Ben Finney wrote: > > If you want a special interpretation of the value, you'll have to > > calculate it. > > > > Example assuming you want a one's-complement interpretation:: > >

Python and databases (was: Re: how you get Python files on websites?)

2006-06-15 Thread Ben Finney
the object is to preserve them, | _o__) it is no longer so." -- Voltaire, _Dictionnaire Philosophique_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Need Help comparing dates

2006-06-15 Thread Ben Finney
can be used with those from the standard library. -- \ "There is no reason anyone would want a computer in their | `\ home." -- Ken Olson, president, chairman and founder of | _o__)Digital Equipment Corp., 1977 | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: Need Help comparing dates

2006-06-15 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] writes: > > I am new to Python and am working on my first program. I am trying > > to compare a date I found on a website to todays date. The problem I > > have is the website only shows 3 letter month name and

Re: Need Help comparing dates

2006-06-15 Thread Ben Finney
Ambrose Bierce | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: BeautifulSoup error

2006-06-15 Thread Ben Finney
, and decode the data to Unicode from that encoding. -- \ "Man cannot be uplifted; he must be seduced into virtue." -- | `\ Donald Robert Perry Marquis | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: BeautifulSoup error

2006-06-16 Thread Ben Finney
ld safe for our children, but not | `\our children's children, because I don't think children should | _o__) be having sex." -- Jack Handey | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: blindness and top vs. bottom posting

2006-08-24 Thread Ben Finney
response. This is of even greater assistance to the blind, who then have just the necessary context to understand the current message. http://en.wikipedia.org/wiki/Top_posting> -- \ "We are not gonna be great; we are not gonna be amazing; we are | `\gonna be *amazingly* amazi

Re: Truly platform-independent DB access in Python?

2006-08-28 Thread Ben Finney
tes would copulate with anything that moved, but I | `\never saw any reason to limit myself." -- Emo Philips | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Naming conventions (was: Re: refering to base classes)

2006-08-29 Thread Ben Finney
EP 8) instances are named with all lower case, either joinedwords or separate_by_underscores. -- \"Crime is contagious ... if the government becomes a | `\lawbreaker, it breeds contempt for the law." -- Justice Louis | _o__)

Re: Coding style and else statements

2006-08-30 Thread Ben Finney
result = -1 return result -- \ "Ours is a world where people don't know what they want and are | `\willing to go through hell to get it." -- Donald Robert Perry | _o__) Marquis | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: What do you want in a new web framework?

2006-08-30 Thread Ben Finney
" -- | `\ Henry L. Mencken | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

<    17   18   19   20   21   22   23   24   25   26   >