PyGreSQL 3.8 released

2006-02-19 Thread D'Arcy J.M. Cain
changed in this version. Please refer to readme.txt for general information. -- D'Arcy J.M. Cain PyGreSQL Development Group http://www.PyGreSQL.org -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf

Release of PyGreSQL 4.0 (update)

2009-01-03 Thread D'Arcy J.M. Cain
. - delete() now also works based on the primary key if no oid available and returns whether the row existed or not. -- D'Arcy J.M. Cain PyGreSQL Development Group http://www.PyGreSQL.org -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software

Odd behaviour of *.pth files and Apache

2008-02-21 Thread D'Arcy J.M. Cain
the .pth files sometimes and not others? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python

Re: understaning self

2008-02-21 Thread D'Arcy J.M. Cain
On Thu, 21 Feb 2008 11:07:18 -0800 (PST) 7stud [EMAIL PROTECTED] wrote: d = Dog() d.bark('Woof!') and the call: d.bark('Woof!') would be transformed into: d.bark(d, 'Woof!') Actually, Dog.bark(d, 'Woof!') -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves

Re: Odd behaviour of *.pth files and Apache

2008-02-23 Thread D'Arcy J.M. Cain
On Thu, 21 Feb 2008 13:55:25 -0500 D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: I tried searching the archives for information on this but nothing seemed to be germane. I am running Python sripts as CGI under Apache and I have a .pth file in site-packages that includes directory that has another

Re: How to manipulate elements of a list in a single line of code?

2008-02-25 Thread D'Arcy J.M. Cain
it. list2 = [item + 'foo' for item in list1] -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman

Re: Odd behaviour of *.pth files and Apache

2008-02-26 Thread D'Arcy J.M. Cain
On Tue, 26 Feb 2008 03:01:33 -0200 Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 23 Feb 2008 12:52:45 -0200, D'Arcy J.M. Cain [EMAIL PROTECTED] escribió: I have more information now. It seems that it recurses the .pth files it finds in PYTHONPATH but not for directories found

Re: How about adding rational fraction to Python?

2008-02-26 Thread D'Arcy J.M. Cain
. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: How about adding rational fraction to Python?

2008-02-26 Thread D'Arcy J.M. Cain
On Tue, 26 Feb 2008 06:45:45 -0800 (PST) Carl Banks [EMAIL PROTECTED] wrote: On Feb 26, 9:29 am, D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: If 3/4 ever returned 0.75 in any language I would drop that language. Have fun dropping Python, then, chief. Integer division with / is already

Re: How about adding rational fraction to Python?

2008-02-26 Thread D'Arcy J.M. Cain
it now. It sounds like the decision has been made. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman

Re: How about adding rational fraction to Python?

2008-02-26 Thread D'Arcy J.M. Cain
On Tue, 26 Feb 2008 16:49:10 +0100 Hrvoje Niksic [EMAIL PROTECTED] wrote: D'Arcy J.M. Cain [EMAIL PROTECTED] writes: I have not been following Python development that closely lately so I was not aware of that. I guess I won't be going to Python 3 then. It's great that Python wants

Re: How to turn a list of tuples into a dictionary?

2008-02-26 Thread D'Arcy J.M. Cain
J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: How about adding rational fraction to Python?

2008-02-26 Thread D'Arcy J.M. Cain
On Tue, 26 Feb 2008 09:01:57 -0800 Jeff Schwab [EMAIL PROTECTED] wrote: Or Jo thinks // is a typo, and helpfully fixes it. Exactly. Programmers who use a language without learning it are apt to do anything. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http

Re: How about adding rational fraction to Python?

2008-02-26 Thread D'Arcy J.M. Cain
On Tue, 26 Feb 2008 13:39:38 -0500 J. Cliff Dyer [EMAIL PROTECTED] wrote: a = 2 * 2 b = 20 * 20 type(a) type 'int' type(b) type 'long' A long int is still integral which is the crux of the issue. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three

Re: How about adding rational fraction to Python?

2008-02-26 Thread D'Arcy J.M. Cain
the language works. I would be almost as upset if the change was happening the other way. Note, I use the word natural above. Natural is an opinion and that happens to be mine. I am really having a hard time accepting that TRUTH (tm) is determined by election. See signature. -- D'Arcy J.M. Cain

Re: How about adding rational fraction to Python?

2008-02-26 Thread D'Arcy J.M. Cain
On 26 Feb 2008 12:53:48 -0800 Paul Rubin http://phr.cx@NOSPAM.invalid wrote: D'Arcy J.M. Cain [EMAIL PROTECTED] writes: Note, I use the word natural above. Natural is an opinion and that happens to be mine. http://en.wikipedia.org/wiki/Natural_number Recheck the context. I was talking

Re: Adobe CS3

2008-02-26 Thread D'Arcy J.M. Cain
comments, top posting can be an advantage to the reader. Unless, of course, you know how to trim quoted text. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP

Re: How to pass shell variable to shell script from python

2008-02-27 Thread D'Arcy J.M. Cain
On Wed, 27 Feb 2008 15:37:25 +0800 Rockins Chen [EMAIL PROTECTED] wrote: Clearly, I made some typing mistake, it's the shbang line! it should be: #!/usr/bin/python Side topic - if you want portability use the following: #! /usr/bin/env python -- D'Arcy J.M. Cain [EMAIL PROTECTED

Re: Logging to HTTP or File

2008-02-27 Thread D'Arcy J.M. Cain
a local backup. If the server goes down your secondary process deals with it, not your primary app that is handling your user requests. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212

Re: Making string-formatting smarter by handling generators?

2008-02-27 Thread D'Arcy J.M. Cain
() :) Pretty much. :-) -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Making string-formatting smarter by handling generators?

2008-02-27 Thread D'Arcy J.M. Cain
On Wed, 27 Feb 2008 13:06:27 -0800 (PST) Arnaud Delobelle [EMAIL PROTECTED] wrote: On Feb 27, 5:25 pm, D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: Isn't map() deprecated?  The above can be done with; I don't think that map() is deprecated. In python 3.0 it is still present, only it returns

Re: How about adding rational fraction to Python?

2008-02-28 Thread D'Arcy J.M. Cain
the definition in http://en.wikipedia.org/wiki/Programming_language and others if you are unclear. PLs are designed to communicate with machines. Even a calculator is an application, not a language. This is an important difference. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy

Re: How about adding rational fraction to Python?

2008-02-28 Thread D'Arcy J.M. Cain
than Python by far. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: How about adding rational fraction to Python?

2008-02-28 Thread D'Arcy J.M. Cain
On Thu, 28 Feb 2008 13:32:06 -0500 J. Cliff Dyer [EMAIL PROTECTED] wrote: On Thu, 2008-02-28 at 11:22 -0500, D'Arcy J.M. Cain wrote: Not obvious to you. You are using subjective perception as if it was a law of nature. If obvious was the criteria then I would argue that the only proper

Re: How about adding rational fraction to Python?

2008-02-28 Thread D'Arcy J.M. Cain
On 28 Feb 2008 12:25:14 -0800 Paul Rubin http://phr.cx@NOSPAM.invalid wrote: D'Arcy J.M. Cain [EMAIL PROTECTED] writes: I'd like to point out that now you are talking about int OP int returning a tuple, not an int. Which would be stupid. Good thing I don't think that obvious should

Re: convert string number to real number - ValueError: invalid literal for int() with base 10: '2'

2008-02-28 Thread D'Arcy J.M. Cain
. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: convert string number to real number - ValueError: invalid literal for int() with base 10: '2'

2008-02-29 Thread D'Arcy J.M. Cain
that, i should be able to use them as numbers. You still need to apply int() or float() to the result. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP

Re: Why , not '''?

2008-03-05 Thread D'Arcy J.M. Cain
. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Please keep the full address

2008-03-05 Thread D'Arcy J.M. Cain
the responses to their posts and changing the address makes this impossible. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http

Re: Please keep the full address

2008-03-05 Thread D'Arcy J.M. Cain
, if it is something that you have no control over I apologize for the noise. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org

Re: Identifying messages in a thread (was: Please keep the full address)

2008-03-05 Thread D'Arcy J.M. Cain
guess. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Identifying messages in a thread (was: Please keep the full address)

2008-03-06 Thread D'Arcy J.M. Cain
of problem postings so I don't need to expend the time. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo

Re: Please keep the full address

2008-03-06 Thread D'Arcy J.M. Cain
On Thu, 6 Mar 2008 08:00:58 -0800 (PST) Carl Banks [EMAIL PROTECTED] wrote: I'm talking about castironpi. I find his posts a waste of my time His posts? Whatever. I'm too old to worry about searching for politically correct, gender neutral pronouns. -- D'Arcy J.M. Cain [EMAIL PROTECTED

Re: Regarding coding style

2008-03-07 Thread D'Arcy J.M. Cain
obstructed by the double blanks but tolerated them. Now, that i read that it actually is a recommendation, i need to ask about the purpose. Like many things of this nature, the purpose is to follow the rules of correct English usage. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy

Re: Regarding coding style

2008-03-07 Thread D'Arcy J.M. Cain
. Strunk and White is a pamphlet compared to Fowler's tome. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman

Re: Regarding coding style

2008-03-07 Thread D'Arcy J.M. Cain
of people, text/information oriented and display/presentation oriented. I don't see any way to appeal to both. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP

Re: %x unsigned?

2008-03-14 Thread D'Arcy J.M. Cain
-a' Is this a bug or is %x misdocumented? I think it is working exactly as documented. It says that it displays unsigned numbers. If you give it a negative number you get undefined behaviour. Are you saying that the docs could be a little clearer? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy

Re: Basics of Python,learning

2008-03-16 Thread D'Arcy J.M. Cain
is redefined as a method which creates a variable 'x', overwrites it twice and then discards it. Doesn't matter since you never call the method anyway. Back to the textbook I think. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy

Re: Need Help Starting Out

2008-03-18 Thread D'Arcy J.M. Cain
which I maintain at http://PyGreSQL.org/ Hope these help you get started... And don't forget the tutorial on the Python web site. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD

Re: Testing for an empty dictionary in Python

2008-03-23 Thread D'Arcy J.M. Cain
checks whether or not there are any members and does not run keys() or len() on the dictionary. Of course, you should test it. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD

Re: sendmail should throw an exception but does not

2008-03-25 Thread D'Arcy J.M. Cain
J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Daylight savings time problem

2008-03-26 Thread D'Arcy J.M. Cain
tm_isdst to -1. Anyone knows how to fix it? Use UTC. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman

Re: Daylight savings time problem

2008-03-26 Thread D'Arcy J.M. Cain
os.environ['TZ'] = 'UTC' fix the issue? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Daylight savings time problem

2008-03-26 Thread D'Arcy J.M. Cain
. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: License of Python

2008-03-30 Thread D'Arcy J.M. Cain
is the reason for that? Due to Competitors... I don't want to expost the language I use You might hide it from many of your customers but don't count on hiding it from your competitors. Chances are, if they don't know it because they just don't care. -- D'Arcy J.M. Cain [EMAIL PROTECTED

Re: Creating Class Objects in Loop

2008-03-31 Thread D'Arcy J.M. Cain
: sids = [] -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: april fools email backfires

2008-04-02 Thread D'Arcy J.M. Cain
. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why prefer != over for Python 3.0?

2008-04-03 Thread D'Arcy J.M. Cain
-- not KB, not MB. Wow! I would have thought that the header on most executible file formats was bigger than that these days. Or was this done as a .COM file or something like that? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy

Re: Learning curve for new database program with Python?

2008-04-08 Thread D'Arcy J.M. Cain
query language for PostgreSQL and its predeccessor was QUEL, not SQL. There are other examples. See http://en.wikipedia.org/wiki/SQL#Alternatives_to_SQL for some. This is not to say that learning SQL is a bad idea. It is certainly the de facto standard today. -- D'Arcy J.M. Cain [EMAIL PROTECTED

Re: How to have unittest tests to be executed in the order they appear?

2008-04-15 Thread D'Arcy J.M. Cain
a proprt self-contained test. For one thing, you can't run a single test that way if you wanted to. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's

Re: Finally had to plonk google gorups.

2008-04-16 Thread D'Arcy J.M. Cain
access to my shell users. You can also receive this group as a mailing list which is how I read it. Google is not the only option out there. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425

Re: Finally had to plonk google gorups.

2008-04-16 Thread D'Arcy J.M. Cain
. I thought that all postings from Google groups had an Organization: http://groups.google.com; header. Is that not true? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082

Re: Finally had to plonk google gorups.

2008-04-16 Thread D'Arcy J.M. Cain
is the only one still clinging to NNTP when it appears a normal mail list is just as good. Especially given that Mailman, a Python program, can handle all the heavy lifting anyway. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy

Re: Can't do a multiline assignment!

2008-04-17 Thread D'Arcy J.M. Cain
of headers which __init__ assigns to and to get a header you basically return O.get(header). -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's

Re: Spawing a thread and printing dots until it finishes

2008-04-22 Thread D'Arcy J.M. Cain
a smallest program that exhibits the behaviour you are questioning and then cut and paste the entire script into your message unedited. Often enough you will even answer your own question in the process. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http

Re: Python Success stories

2008-04-22 Thread D'Arcy J.M. Cain
programm in Python, your applications become quite small. Only frameworks in Python are big. So the fact that there are no big applications written in Python IS the success story. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy

Re: Spawing a thread and printing dots until it finishes

2008-04-22 Thread D'Arcy J.M. Cain
On Tue, 22 Apr 2008 09:32:38 -0700 (PDT) sophie_newbie [EMAIL PROTECTED] wrote: On Apr 22, 4:41 pm, D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: We know that your main routine gives up the processor but without a full definition of MyThread how do we know that it ever does? I suspect

Re: Spawning a thread and printing dots until it finishes

2008-04-22 Thread D'Arcy J.M. Cain
On Tue, 22 Apr 2008 13:45:32 -0700 Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Tue, 22 Apr 2008 13:25:07 -0400, D'Arcy J.M. Cain [EMAIL PROTECTED] declaimed the following in comp.lang.python: I think that there are two things that you need to wrap your head around before understanding

Re: MESSAGE RESPONSE

2008-04-23 Thread D'Arcy J.M. Cain
postings until David reposted them from a non-Google account. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman

Re: annoying dictionary problem, non-existing keys

2008-04-24 Thread D'Arcy J.M. Cain
On Thu, 24 Apr 2008 10:24:37 +0200 Robert Bossy [EMAIL PROTECTED] wrote: Way 2: make conf a defaultdict instead of a dict, the documentation is there: http://docs.python.org/lib/defaultdict-objects.html Only for 2.5 and up though. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy

Re: MESSAGE RESPONSE

2008-04-24 Thread D'Arcy J.M. Cain
hand I can see them being concerned about the posting that you made when you resent it to the list. And really, who uses their business address for news/mailing lists. I own my own company and I won't even do that. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http

Re: Why is None = 0

2008-04-25 Thread D'Arcy J.M. Cain
On Fri, 25 Apr 2008 20:27:15 +0200 Gregor Horvath [EMAIL PROTECTED] wrote: None = 0 True Why? Why not? Is there a logical reason? Everything in Python can compare to everything else. It is up to the programmer to make sure that they are comparing reasonable things. -- D'Arcy J.M

Re: Why is None = 0

2008-04-25 Thread D'Arcy J.M. Cain
On Fri, 25 Apr 2008 11:54:23 -0700 Paul McNett [EMAIL PROTECTED] wrote: In my humble opinion, I think that comparisons involving None should return None... Like relational databases. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy

Re: Colors for Rows

2008-04-29 Thread D'Arcy J.M. Cain
' else: bg = '#EAF8D5' print 'tr bgcolor=%s' % bg, d Or, tell us what you are trying to do. In fact, you can replace all the tests and the print statement with this after defining bg as a list of the four colours: print 'tr bgcolor=%s' % bg[z % 4], d -- D'Arcy J.M. Cain [EMAIL PROTECTED

Re: Colors for Rows

2008-04-29 Thread D'Arcy J.M. Cain
On Tue, 29 Apr 2008 13:14:34 -0500 Victor Subervi [EMAIL PROTECTED] wrote: On Tue, Apr 29, 2008 at 11:11 AM, D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: for d in (1,2,3,4,5,6): I changed id to a sequence so that the example actually runs. Please run your examples first and cut and paste

Re: Colors for Rows

2008-04-29 Thread D'Arcy J.M. Cain
J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: Colors for Rows

2008-04-30 Thread D'Arcy J.M. Cain
it was an error. What do you think was wrong with it? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman

Re: Colors for Rows

2008-04-30 Thread D'Arcy J.M. Cain
out of the list. Have you read http://catb.org/~esr/faqs/smart-questions.html yet? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-01 Thread D'Arcy J.M. Cain
own pkg root. Using /usr/bin/env allows your code to run on all these systems. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-02 Thread D'Arcy J.M. Cain
incredulous. OK, let me get out my crayons. However, note that I did not say operating-system-installed. I said a packaging system puts it there. In fact, the NetBSD packaging system works on many systems including Linux and thus is not an operating system packager. -- D'Arcy J.M. Cain [EMAIL

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-02 Thread D'Arcy J.M. Cain
. Certainly #! /usr/bin/python is fine if you never expect your software to run outside of your own little corner of the world but you asked why people prefer the env version and the answer is that we want to write software that runs everywhere that Python runs. -- D'Arcy J.M. Cain [EMAIL PROTECTED

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-02 Thread D'Arcy J.M. Cain
software that runs everywhere that Python runs. Granted, but you must draw the line somewhere anyway. I cannot No one is talking about if statements here. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-02 Thread D'Arcy J.M. Cain
On Sat, 03 May 2008 00:44:00 +1000 Ben Finney [EMAIL PROTECTED] wrote: D'Arcy J.M. Cain [EMAIL PROTECTED] writes: As someone else pointed out, not all the world is Linux. It's a good thing I've never implied such to be the case. You haven't *said* it but you have definitely *implied

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-02 Thread D'Arcy J.M. Cain
they're doing enough to invoke the program in a specific way to get it working. Unpredictable to you. Perfectly predictable on their system. I do believe I am done with this thread. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy

Re: License selection for free software

2008-05-07 Thread D'Arcy J.M. Cain
. That's exactly what makes the GPL annoying to some of us. It just depends on your point of view. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-08 Thread D'Arcy J.M. Cain
the PATH environment, I don't really know. Well, I know what happened when I tried it. What happened when you tried it? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082

Re: Running a python code periodically

2008-05-08 Thread D'Arcy J.M. Cain
? Same answer. Download the source for cron from somewhere (NetBSD, FreeBSD, Linux, whatever), compile it and run it yourself. You can't run setuid but if you want something that acts like cron, cron fits the bill. Ain't open source wonderful? :-) -- D'Arcy J.M. Cain [EMAIL PROTECTED

Re: anonymous assignment

2008-05-11 Thread D'Arcy J.M. Cain
On Mon, 12 May 2008 02:28:13 GMT Yves Dorfsman [EMAIL PROTECTED] wrote: particular case, there's got to be a better way than: d = time.local() y = d[0] d = d[1] Like this? y, d = time.local()[:2] -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http

Re: thread stomp?

2008-05-12 Thread D'Arcy J.M. Cain
the other. Not every problem is a threading problem. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman

Re: Python and Flaming Thunder

2008-05-13 Thread D'Arcy J.M. Cain
English than it does. In fact, pseudocode tends to look a lot like Python. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http

Re: writing python extensions in assembly

2008-05-16 Thread D'Arcy J.M. Cain
anything that you want to do in a Python context that can't be done at least as well in C if not pure Python. Just curious is all. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD

Re: writing python extensions in assembly

2008-05-16 Thread D'Arcy J.M. Cain
on the same processor you may have different assemblers depending on the OS. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http

Re: Python book question

2008-05-16 Thread D'Arcy J.M. Cain
the root = n/2 line. Since the behaviour of this operation changes in 3.0, shouldn't it be specific about whether it is doing int or float division? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416

Re: Top posting

2009-02-23 Thread D'Arcy J.M. Cain
because you read many more posts than you write. -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo

Re: Top posting

2009-02-23 Thread D'Arcy J.M. Cain
reply but I don't think that you should then claim that I never included one. -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http

Re: help with printing to stdout...

2009-03-08 Thread D'Arcy J.M. Cain
. If it wasn't then: while working: print '\r'+percent+' ', -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman

Re: Ban Xah Lee

2009-03-08 Thread D'Arcy J.M. Cain
postings in their entirety so that those that block him will see them anyway, right? Wrong. We'll just block your posts too. *plonk* -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD

Re: Can python quickly display results like bash?

2009-03-17 Thread D'Arcy J.M. Cain
On Tue, 17 Mar 2009 11:10:36 -0700 Chris Rebert c...@rebertia.com wrote: I've read the manpage for bash and can find no such -x option listed. It's an option from sh(1) that bash copies. Check the man page for sh (1) for a description. -- D'Arcy J.M. Cain da...@druid.net | Democracy

Re: script files with python (instead of tcsh/bash)?

2009-03-21 Thread D'Arcy J.M. Cain
think that the reason for that is that most people aren't so concerned with conversion. If the shell script works, why bother? They will just pick the best tool for their next project. -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy

Re: Find duplicates in a list and count them ...

2009-03-26 Thread D'Arcy J.M. Cain
looping through a list. icount = {} for i in list_of_ints: icount[i] = icount.get(i, 0) + 1 Now you have a dictionary of every integer in the list and the count of times it appears. -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy

Re: Find duplicates in a list and count them ...

2009-03-26 Thread D'Arcy J.M. Cain
J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list

Re: database connection error - postgresql

2009-03-30 Thread D'Arcy J.M. Cain
called secondbooks in postgresql. If it is called secondbooks then why are you connecting to secondbooks.db in the code? -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082

Re: make money!!!!

2009-03-31 Thread D'Arcy J.M. Cain
On Tue, 31 Mar 2009 16:43:31 -0500 Grimes, George georgegri...@ti.com wrote: April fools day is not until tomorrow. Your joke is a day early. Wow! I almost missed that piece of spam. Thanks for repeating the entire thing for me. -- D'Arcy J.M. Cain da...@druid.net | Democracy

Re: script question

2009-04-17 Thread D'Arcy J.M. Cain
On 17 Apr 2009 07:03:18 -0700 a...@pythoncraft.com (Aahz) wrote: Go to all that trouble, you might as well make it easier: for func in funclist: func() And if you need the return values: retlist = [func() for func in funclist] -- D'Arcy J.M. Cain da...@druid.net

Re: Curious: 2134 2004-10-06 08:55:20Z fredrik

2008-09-10 Thread D'Arcy J.M. Cain
%20System%20v1.12.12.1%3A%20Keyword%20substitution -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman

Re: md5 differences

2008-09-10 Thread D'Arcy J.M. Cain
() 'b1946ac92492d2347c6235b4d2611184' -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python

Re: md5 differences

2008-09-10 Thread D'Arcy J.M. Cain
(/Volumes/data/Arno/test.txt).read()).hexdigest() -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo

Re: Checking the boolean value of a collection

2008-09-12 Thread D'Arcy J.M. Cain
to having something as a builtin rather than as a regular user method? What difference does it make to the running script? I can see that adding bar from module foo to __builtins__ means that you can use bar() instead of foo.bar(). Is that the only benefit? -- D'Arcy J.M. Cain [EMAIL PROTECTED

Comparing float and decimal

2008-09-23 Thread D'Arcy J.M. Cain
This seems to break the rule that if A is equal to B and B is equal to C then A is equal to C. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 425 1212 (DoD#0082)(eNTP) | what's

Re: how to replace and string in a SELECT ... IN ()

2008-09-26 Thread D'Arcy J.M. Cain
IN clauses. Consider; UPDATE student SET name = '%s' WHERE student_id = %s % (name, id); Now set name to Robert'; DROP TABLE student; and see what happens if you feed that to your SQL database. Hell, just put '; in the string for fun. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy

  1   2   3   4   5   >