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: 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: 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: 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: 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: 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: 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: 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: datetime.time and midnight

2009-02-22 Thread D'Arcy J.M. Cain
. As someone else said, there's not much point in casting time to boolean but if you do, it is a base type, not a sequence so I wouldn't expect to apply sequence logic to the outcome. -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy

Re: Putting asterisks around text

2009-02-09 Thread D'Arcy J.M. Cain
***Hello world*** while understand_problem is False: study(textbook) complete(homework) if want_help is True: study(http://www.catb.org/~esr/faqs/smart-questions.html;) -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy

Re: Running all unit tests

2009-02-06 Thread D'Arcy J.M. Cain
.$$ done -- 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/python-list

Re: Membership of multiple items to a list

2009-02-02 Thread D'Arcy J.M. Cain
On Mon, 02 Feb 2009 17:34:51 -0500 Steve Holden st...@holdenweb.com wrote: Or configure multiple personalities with the same email address but different settings, so all you have to do is switch personalities appropriately. They have pills for that now. -- D'Arcy J.M. Cain da...@druid.net

Re: accessing elements of a tuple

2009-02-01 Thread D'Arcy J.M. Cain
On Sun, 01 Feb 2009 19:23:58 +1100 Steven D'Aprano st...@pearwood.info wrote: D'Arcy J.M. Cain wrote: First of all, list is a reserved word.  Don't use it as a variable name. Unless you mean to. Shadowing built-ins is only a bad thing when you do it by accident. I suppose but I am having

Re: Empty string is False right?

2009-01-31 Thread D'Arcy J.M. Cain
wouldn't expect the following statement to be True. '' is False False -- 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: search speed

2009-01-30 Thread D'Arcy J.M. Cain
-- 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/python-list

Re: Rounding to the nearest 5

2009-01-30 Thread D'Arcy J.M. Cain
On 30 Jan 2009 06:23:17 GMT Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Fri, 30 Jan 2009 00:24:47 -0500, D'Arcy J.M. Cain wrote: That appears to be rounding to nearest 10, not 5. Clarify your requirements first. Look again. 36 = 35. You are correct. I should have

Re: accessing elements of a tuple

2009-01-30 Thread D'Arcy J.M. Cain
in mylist if x[0][:2] == '--']) print opts['datasourcename'] -- 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: Rounding to the nearest 5

2009-01-29 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: How to print lambda result ?

2009-01-20 Thread D'Arcy J.M. Cain
that would return a string if you called it with a number. for num in range(1,4): string_ = %d event%s % (num,lambda num: num 1 and s or ) -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416

Re: How to print lambda result ?

2009-01-20 Thread D'Arcy J.M. Cain
On Tue, 20 Jan 2009 09:26:14 -0500 D'Arcy J.M. Cain da...@druid.net wrote: %s % lambda num: int(num) Of course I meant... %s % (lambda num: int(num)) -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting

Re: file write collision consideration

2009-01-20 Thread D'Arcy J.M. Cain
to block for a small time as opposed to the much longer disk write time. -- 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: issue

2009-01-19 Thread D'Arcy J.M. Cain
.) There are more than one adapter for each. Check out the list at http://wiki.python.org/moin/DatabaseInterfaces for more information. -- 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

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

Please show some restraint (Was: Why not Ruby?)

2009-01-02 Thread D'Arcy J.M. Cain
, if I can't see your reply without scrolling down I just tend to hit the delete key. That means that thanks to you non-trimmers I get to read Xah posts over and over but never get to see your witty, entertaining and educational replies. -- D'Arcy J.M. Cain da...@druid.net | Democracy

Release of PyGreSQL 4.0

2009-01-01 Thread D'Arcy J.M. Cain
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-list

Re: os.system('cls')

2008-12-25 Thread D'Arcy J.M. Cain
the same version. BTW, os.system('clear') will clear the screen on many Unix systems. -- 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: python web programming for PHP programmers

2008-12-24 Thread D'Arcy J.M. Cain
H1Hello World/H1 % colour print P Hello World /BODY/HTML -- 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

Re: iterating initalizations

2008-12-23 Thread D'Arcy J.M. Cain
: for v in vars: locals()[v] = [] It's hard to tell if that's what you actually need though without deeper analysis of your requirements. -- 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

Re: iterating initalizations

2008-12-23 Thread D'Arcy J.M. Cain
On Tue, 23 Dec 2008 10:20:59 -0500 Steve Holden st...@holdenweb.com wrote: D'Arcy J.M. Cain wrote: Well, if all you want is a loop: for v in vars: locals()[v] = [] Note that this isn't guaranteed to work. While locals() will return a dict containing the names and values

Re: psycopg2 and large queries

2008-12-18 Thread D'Arcy J.M. Cain
a db api compilant module, but it is only a wrapper around pgqueryobject, and it does not support server side cursors...) I'm not sure where you get that. The DB-API compliant execute function uses server side cursors with fetch. -- D'Arcy J.M. Cain da...@druid.net | Democracy

Re: String slices work only for first string character ?

2008-12-16 Thread D'Arcy J.M. Cain
the second character use data[1:2]. -- 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/python-list

Re: Where is a good open source python project to be used as example?

2008-12-16 Thread D'Arcy J.M. Cain
the code convention recommended by PEP 8 3. it's elements are almost fully documented Extra point features are: 4. building, assembling, and release automation Did you know where are such projects? http://www.PyGreSQL.org/. -- D'Arcy J.M. Cain da...@druid.net | Democracy

Re: Where is a good open source python project to be used as example?

2008-12-16 Thread D'Arcy J.M. Cain
TEST_PyGreSQL_classic.py and TEST_PyGreSQL_dbapi20.py. -- 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: Need help improving number guessing game

2008-12-16 Thread D'Arcy J.M. Cain
On Tue, 16 Dec 2008 13:59:24 -0800 Scott David Daniels scott.dani...@acm.org wrote: def yesno(s): s = s.strip().lower() if not s in (y, n): You could also do this to be a little more user friendly: if not (s and s[0] in (y, n)): Or reverse the test for clarity. -- D'Arcy J.M

Re: How can I understan the for here?

2008-12-11 Thread D'Arcy J.M. Cain
it follows different rules. -- 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: Python is slow

2008-12-10 Thread D'Arcy J.M. Cain
On Wed, 10 Dec 2008 21:04:12 +0100 Stef Mientki [EMAIL PROTECTED] wrote: cm_gui wrote: [...] Put this guy in the junk filter, What's the point if people like you are just going to repost his entire message like that? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three

Re: Python 3.0 automatic decoding of UTF16

2008-12-07 Thread D'Arcy J.M. Cain
with line -- 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 to get a beep, OS independent ?

2008-12-07 Thread D'Arcy J.M. Cain
had a Beep method for years which works on all platforms. If RB can do it, we can do it too. It works on all platforms that RB runs on. A rather short list. Certainly a subset of the platforms that Python runs on. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves

Re: How to get a directory file descriptor?

2008-11-25 Thread D'Arcy J.M. Cain
is fine. But what I want is something like an integer file descriptor, like the one returned by os.open() for files, or the Linux dirfd() call, which returns an integer for a pointer to a DIR stream. Is this what you want? ofiles = [open(x) for x in os.listdir(os.getcwd())] -- D'Arcy J.M. Cain

Re: Exception difference 2.4 == 2.5

2008-11-19 Thread D'Arcy J.M. Cain
On Wed, 19 Nov 2008 01:57:37 -0500 Ross Ridge [EMAIL PROTECTED] wrote: D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: Under Python 2.4 this works fine. If an exception is raised in the looked up method it gets handled by this code just fine. Under 2.5, however, the exception is not caught here

Re: Exception difference 2.4 == 2.5

2008-11-19 Thread D'Arcy J.M. Cain
something to you? -- 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: Exception difference 2.4 == 2.5

2008-11-19 Thread D'Arcy J.M. Cain
On Wed, 19 Nov 2008 11:20:48 -0800 Chris Rebert [EMAIL PROTECTED] wrote: On Wed, Nov 19, 2008 at 8:24 AM, D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: Interesting. I installed 2.6 and tried it. My unit test still failed but for a different reason that I will have to investigate

Re: Exception difference 2.4 == 2.5

2008-11-19 Thread D'Arcy J.M. Cain
to identify the problem. I managed to move everything into one test file and switched to the SimpleXMLRPCServer module but to no avail. The new code is at ftp://ftp.druid.net/pub/distrib/test_2.5 -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net

Exception difference 2.4 == 2.5

2008-11-18 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: return a value to shell script

2008-11-12 Thread D'Arcy J.M. Cain
dedicated to the shell you are using. -- 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: plot for sale

2008-11-07 Thread D'Arcy J.M. Cain
On Fri, 07 Nov 2008 18:10:00 +0100 Mario Testinori [EMAIL PROTECTED] wrote: Unless you're breeding pythons there, you're offtopic. Arrggghhh!!! Stop responding to spam! Please! -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy

Re: spam

2008-11-06 Thread D'Arcy J.M. Cain
to the spam rather than hitting the 'd' key. This conversation sounds like we are in violent agreement. :-) -- 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: damn street venders

2008-11-05 Thread D'Arcy J.M. Cain
On Mon, 3 Nov 2008 16:31:24 -0500 Benjamin Kaplan [EMAIL PROTECTED] wrote: I'm pretty sure all of the spam is automated, so your message won't get through to anyone. Well, it got through to us adding to our spam problem. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three

Re: Which PostgreSQL adapter to use?

2008-11-04 Thread D'Arcy J.M. Cain
). - Made private attributes of DB wrapper accessible. http://www.PyGreSQL.org/ -- 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

[issue4243] has_key doc could be clearer

2008-11-01 Thread D'Arcy J.M. Cain
D'Arcy J.M. Cain [EMAIL PROTECTED] added the comment: I think a clarification is in order. The sentence being changed was perfectly and mathematically correct. If you laid it out on a blackboard and parsed it (remember those days?) you could prove that it said the correct thing. No one

Re: xxx.has_key(a) vs a in xxx

2008-10-30 Thread D'Arcy J.M. Cain
) is deprecated. Use key in dict instead. IOW your explanation of the sentence is better than the sentence. :-) -- 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: dictionary

2008-10-28 Thread D'Arcy J.M. Cain
replacing them as they burned out. Programs had to be prepared to deal with the fact that bits could go dead at any time and functions would run multiple times and hold an election to determine the correct answer. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http

Re: dictionary

2008-10-28 Thread D'Arcy J.M. Cain
and shopping cart.) so I cannot check the story's veracity. -- 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: Linux.com: Python 3 makes a big break

2008-10-19 Thread D'Arcy J.M. Cain
parens wouldn't line up. It just a matter of style. -- 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: connection reset by peer error

2008-10-11 Thread D'Arcy J.M. Cain
you. -- 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: do something in time interval

2008-10-06 Thread D'Arcy J.M. Cain
(function, method, action) to do. Then check out http://www.python.org/doc/current/library/select.html -- 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: encoding ascii data for xml

2008-10-04 Thread D'Arcy J.M. Cain
need to look up an ASCII chart -- I seem to recall ETX as end of transmission Nope, Marc is correct. EOT, chr(4), is end of transmission. -- 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: change line with columns when print

2008-10-01 Thread D'Arcy J.M. Cain
. L = [x.strip().split() for x in open(infile) if x] for i in range(2): print ' '.join([x[i] for x in L]) -- 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: string concatenate

2008-10-01 Thread D'Arcy J.M. Cain
to have it as: name1 name2 name3 ...name10 nameAll = [name%d % x for x in range(1,10,1)] -- 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

Re: Fwd: string concatenate

2008-10-01 Thread D'Arcy J.M. Cain
mod from my previous suggestion then. nameAll = ' '.join([name%d % x for x in range(1,10,1)]) Have you gone through the tutorial 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

Re: Music knowledge representation

2008-09-29 Thread D'Arcy J.M. Cain
some error trapping return self.interval_name[higher - lower] Note that lower and higher could be a note object that you have to convert to integers first. Hope this gives you some ideas. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy

Re: PYTHON WORKING WITH PERL ??

2008-09-29 Thread D'Arcy J.M. Cain
, sometimes we don't have control over our entire environment so yes, you can mix them if you have 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: Music knowledge representation

2008-09-29 Thread D'Arcy J.M. Cain
are there? It sounds like your requirement is higher += 12 or some variant. It also depends on whether you need to deal with things like ninths and thirteenths. Anyway, I was just tossing out ideas. You know what your requirements are better than I. -- D'Arcy J.M. Cain [EMAIL PROTECTED

Re: Hello boys!

2008-09-28 Thread D'Arcy J.M. Cain
the Bshit you can eat - and it keeps on coming! What's the point of killfiling Google Groups if people like you are just going to respew this crap. Please consider the Delete key next time. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy

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

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

2008-09-26 Thread D'Arcy J.M. Cain
in a controlled batch environment. Or if you were writing code generators (which is what I happen to do) which won't be run by the general public. Incidentally, couldn't input field edits prevent such exploits prior to interpolation? I encourage my competitors to program that way. -- D'Arcy J.M. Cain

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: 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

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: Sharing common memory space (In form of List) across the python processes.

2008-08-26 Thread D'Arcy J.M. Cain
the legal crap from your postings. This is a public list and such things are just a waste of space. -- 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: __eq__ problem with subclasses

2008-08-23 Thread D'Arcy J.M. Cain
a = b + c does? -- 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: JOB: Python Programmer

2008-08-14 Thread D'Arcy J.M. Cain
On Wed, 13 Aug 2008 21:25:53 -0400 Shemia Miller [EMAIL PROTECTED] wrote: Quick way to earn $50.00. It is an hour job. So which is it? A $50.00 job or a one hour job? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy

Re: You advice please

2008-08-13 Thread D'Arcy J.M. Cain
talk to every one of the 1500 delegates. -- 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: Strong/weak typing

2008-08-02 Thread D'Arcy J.M. Cain
('Name?').split()[1] -- 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: We programming

2008-07-28 Thread D'Arcy J.M. Cain
, not so much. I am not going to write a server in PHP, for example. I also don't much care for PHP as a language anyway but that's actually a secondary consideration. I'll go put on my flame-retardent underwear now. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http

Re: binding names doesn't affect the bound objects (was: print doesn't respect file inheritance?)

2008-07-26 Thread D'Arcy J.M. Cain
/print.html. Which contains this statement. Standard output is defined as the file object named stdout in the built-in module sys. I suppose that there might be some ambiguity there but the proof, as they say, is in the pudding. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves

Re: Attack a sacred Python Cow

2008-07-26 Thread D'Arcy J.M. Cain
a German, I still can't write Für i in range(10). ;-) Yes, this is why good languages try to limit the number of reserved words as much as possible. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416

Re: Attack a sacred Python Cow

2008-07-26 Thread D'Arcy J.M. Cain
. The in my opinion strongest one is that automatic insertion of self would make Python less verbose but more complicated. Well, if we are arguing over which reason to not change it is more important than I would say that we are in violent agreement. :-) -- D'Arcy J.M. Cain [EMAIL PROTECTED

Re: Confused

2008-07-12 Thread D'Arcy J.M. Cain
to my cousin. Well, the subject is accurate anyway. The problem is that sometimes error messages can be misleading. In this case the problem appears that you have arrived too late and the Internet is full. Please turn off your computer and go outside. -- D'Arcy J.M. Cain [EMAIL PROTECTED

Loading just in time

2008-07-10 Thread D'Arcy J.M. Cain
. Of course, I can simply change all my calls to utility.calc_tax.calc_tax(...) but I have a lot of code to change if I do that. Thanks. -- 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: Loading just in time

2008-07-10 Thread D'Arcy J.M. Cain
On Thu, 10 Jul 2008 11:03:10 -0500 Larry Bates [EMAIL PROTECTED] wrote: D'Arcy J.M. Cain wrote: def calc_tax(*arg, **name): from calc_tax import calc_tax as _func_ calc_tax = _func_ return _func_(*arg, **name) You are stuck in a futile battle called premature optimization

Re: Comments on my first script?

2008-06-13 Thread D'Arcy J.M. Cain
suppose you could predefine the default function as well. This saves a binding and a test at the expense of a possible lambda call. -- 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: Python and Flaming Thunder

2008-05-29 Thread D'Arcy J.M. Cain
I guess I am still new to this group and don't understand its charter. I wasn't aware that it was a Flaming Blunder group. Can someone please point me to a newsgroup or mailing list dedicated to the Python programming language? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three

Re: A quick question

2008-05-28 Thread D'Arcy J.M. Cain
is your script: word = raw_input(Type a word:) for i in range(len(word), 0, -1): print word[i] Sorry about that. -- 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: A quick question

2008-05-28 Thread D'Arcy J.M. Cain
it back as tac and what it does is prints out 3,2,1. How can I get these integers to print as letters? This is what I have, word = raw_input(Type a word:) start = len(word) for letter in range(start, 0, -1): print letter Try for letter in start: -- D'Arcy J.M. Cain [EMAIL PROTECTED

Re: Code correctness, and testing strategies

2008-05-24 Thread D'Arcy J.M. Cain
. Read up on actual case studies. -- 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: Code correctness, and testing strategies

2008-05-24 Thread D'Arcy J.M. Cain
it was reported and fixed is calamitous. -- 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:

2008-05-21 Thread D'Arcy J.M. Cain
On Wed, 21 May 2008 09:21:05 -0700 (PDT) ahmed khattab [EMAIL PROTECTED] wrote: unsubscribe me form python list plz Please use the admin interface that you used when you subscribed: http://mail.python.org/mailman/listinfo/python-list -- D'Arcy J.M. Cain PyGreSQL Development Group http

Re: Unsubscribe request

2008-05-21 Thread D'Arcy J.M. Cain
On Wed, 21 May 2008 13:19:11 -0400 D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: On Wed, 21 May 2008 09:21:05 -0700 (PDT) ahmed khattab [EMAIL PROTECTED] wrote: unsubscribe me form python list plz Please use the admin interface that you used when you subscribed: http://mail.python.org

Re: PyGreSQL installation

2008-05-19 Thread D'Arcy J.M. Cain
directory but the problem is still there. It's a guess but perhaps you need to properly install the PostgreSQL client rather than copying files piecemeal. -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1

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: 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: 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

<    1   2   3   4   5   >