RE: Django as exemplary design

2010-05-04 Thread Michael . Coll-Barth
> From: alex23 > (I also think there's value to be gained in studying _bad_ code, > too...) Oh, very true. And not just true for python. But, only if an 'expoert' points out why it is bad and provides an alternative. And saying things like, "it isn't pyhonic" or that such and such is a more "

RE: Rounding up to the next 100

2010-01-21 Thread Michael . Coll-Barth
> From: Arnaud Delobelle > > > > >>> XstrNmbr = 3579.127893 > > I meant > >>> XstrNmbr = "3579.127893" > > > >>> round(float(XstrNmbr), -2) > > 3600.0 Ah, then you will need to cast it first. >>> XstrNmbr = '3579.127893' >>> round(float(XstrNmbr) ,-2) 3600.0 The information contained in

RE: Rounding up to the next 100

2010-01-21 Thread Michael . Coll-Barth
> From: noydb > If one has a floating number as a string, is there a spiffy way to > round that string-number UP to the nearest 100? > > XstrNmbr = 3579.127893 -- would want to round that to 3600. What's wrong with round? round( XstrNmbr, -2 ) seems to do the trick. Or do you want to get ri

RE: Porn Addiction Solutions?

2008-10-08 Thread Michael . Coll-Barth
> From: Dotan Cohen > > 2008/10/8 Support Desk <[EMAIL PROTECTED]>: > > I got a solution, cutt it off, and then Kill yourself. > > > > Cut what off? The OP is female. Are you sure about that? :) The information contained in this message and any attachment may be proprietary, c

RE: You advice please

2008-08-13 Thread Michael . Coll-Barth
> -Original Message- > From: Calvin Spealman > > God forbid I try to make a joke. No kidding! As a lurker newbie, I don't mind one bit. Actually, I have yet to meet a person that codes in Ruby that doesn't also do Python. I have met many Python coders that have never even looked at

RE: Change PC to Win or Windows

2008-07-22 Thread Michael . Coll-Barth
> From: Derek Martin > The term "PC" is commonly used in > English, in the United States and other English speaking countries, to > mean a computer running Microsoft Windows. That isn't quite true. My kids are heading off to college and are in the market for laptops. The question they had f

RE: Python Written in C?

2008-07-21 Thread Michael . Coll-Barth
> > From: mk > Wrong! Real programmers can program using only Touring machine (and > something having to do with post for some reason). I'm sure our > brilliant OP[1] could program in both. Ah, now we can really got OT. My favorite Touring machine is a Jaguar ( with the pronounced 'U' in t

RE: Please unregister this mail-address out of mailing-list.

2008-06-05 Thread Michael . Coll-Barth
> -Original Message- > From: Hank @ITGroup > I am writing this letter to unsubscribe this mail-address from python > mail-list. > -- > http://mail.python.org/mailman/listinfo/python-list > No problem, Hank. You will be officially off of this 'mail-list' after a visit to this site;

RE: Fwd: NUCULAR fielded text searchable indexing

2007-10-10 Thread Michael . Coll-Barth
> From: Grant Edwards > > Anyway, I apologize for my attempt at humor, since it appears > to have somehow offended. Why apologize? If someone doesn't like the name given to a piece of software by its author(s), screw them. If I find the software useful, I'll use it. Even if its called 'bounci

RE: Program inefficiency?

2007-09-29 Thread Michael . Coll-Barth
> -Original Message- > From: thebjorn > > On Sep 29, 9:32 pm, stdazi <[EMAIL PROTECTED]> wrote: > > On Sep 29, 6:07 pm, [EMAIL PROTECTED] wrote: > > > > > You did not mention the OS, but because you are using > > > "pathname\editfile.txt", it sounds like you are using an > MS OS. From

RE: Program inefficiency?

2007-09-29 Thread Michael . Coll-Barth
> -Original Message- > From: stdazi > On Sep 29, 6:07 pm, [EMAIL PROTECTED] wrote: > > > You did not mention the OS, but because you are using > > "pathname\editfile.txt", it sounds like you are using an MS OS. From > > past experience with various MS OSes, I found that as the number of

RE: Program inefficiency?

2007-09-29 Thread Michael . Coll-Barth
> -Original Message- > From: [EMAIL PROTECTED] > the program works great except for one thing. It's significantly > slower through the later files in the search then through the early > ones... Before anyone criticizes, I recognize that that middle section > could be simplified with a fo

RE: OT Annoying Habits (Was: when format strings attack)

2007-01-20 Thread Michael . Coll-Barth
::CLAP CLAP:: thank you! I have been in the newsgroups for over 12 years and I never cared about the top/bottom post silliness. All I care about is that the message is clearly written. Everything else is doggerel. > -Original Message- > From: Carroll, Barry > > Personally, I don't

RE: merits of Lisp vs Python

2006-12-11 Thread Michael . Coll-Barth
After 394 postings in this thread, you all have convinced me. I am dropping all of my python code and switching to Lisp. thank-you The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus pro

RE: v2.3, 2.4, and 2.5's GUI is slow for me

2006-12-01 Thread Michael . Coll-Barth
> -Original Message- > From: John Salerno > > I don't use IDLE too much anymore, just for quick tests, but Just curious. I have tried IDLE, but stopped using it after going through a few of the tutorials. I just type things in at the 'python' prompt, regardless of which platform I

RE: hundreds of seconds?

2006-10-11 Thread Michael . Coll-Barth
> -Original Message- > From: [EMAIL PROTECTED] > How can I access partial seconds on the system clock? What is wrong with time.time()? >>> import time >>> time.time() 1160578386.0109401 >>> time.time() 1160578386.87324 >>> time.time() 1160578387.5790291 >>> x = time.time() >>> y = tim

RE: python loops

2006-08-31 Thread Michael . Coll-Barth
> -Original Message- > From: Kay Schluehr > > > > > python: > > while i < length: > > i += 1 > > As AlbaClause had demonstrated you can iterate over indices as well > using the for-statement and the range() function. But you can also > combine iterating over elements

RE: How do you use this list ?

2006-06-28 Thread Michael . Coll-Barth
-Original Message- From: Grant Edwards >>> Actually having mailing lists send you mail is insane. Once upon a time, I would have agreed. However, it is becoming increasingly difficuilt to get to the newgroups directly from the workplace. The only recourse is to use the mailing lists

RE: John Bokma harassment

2006-05-24 Thread Michael . Coll-Barth
! ! -Original Message- From: John Bokma And ain't it cool that reporting Xah's abuse might stop both? -- John Bokma Freelance software developer & Experienced Perl programmer: http://castleamber.com/ CRAP!

RE: MSSQL LIKE and IN statements in ADO problem

2006-01-18 Thread Michael . Coll-Barth
huh? This seems to work just fine for me... >>> name = '%raj%' >>> test = "SELECT * FROM tb_name WHERE firstname LIKE '%s'" % name >>> print test SELECT * FROM tb_name WHERE firstname LIKE '%raj%' -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] n.org]On Behalf

RE: Tuples

2005-12-16 Thread Michael . Coll-Barth
Well, it works for me and x is a list, not a tuple. Or am I reading too much into your subject line? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] n.org]On Behalf Of Tuvas Sent: Thursday, December 15, 2005 12:20 PM To: python-list@python.org Subject: Tuples Let's

Which is worse, Xah's stuff or everyone's effing crap about it? And don't even get me started on that MS bashing or top posting nonsense

2005-11-02 Thread Michael . Coll-Barth
Actually, the continuous complaining and ranting about Xah's 'postings' are far worse than Xah's actual postings. I can filter his stuff to /dev/null. The drivel that follows is almost as bad as the moronic effluent about how extra-python things should be done or not be done or the legal notices

RE: users of pycurl here?

2005-10-07 Thread Michael . Coll-Barth
How about doing an 'ls -la' once you have connected to the server? That returns a listing of the files with the size in bytes. -Original Message- From: Michele Simionato I am having a hard time in finding out how to retrieve information about the *size* of files I want to download from

RE: Using command line args on Windows

2005-10-05 Thread Michael . Coll-Barth
I'll assume that you are not familiar with Windows, so forgive me if you know this. 1) Go to a command prompt. The location of this depends on which OS you are running. But, you can go to Start / Run... and type in cmd or command. This will give you a window with a 'DOS' prompt. 2) Type pat

RE: Plotting points to screen

2005-09-26 Thread Michael . Coll-Barth
Jason, YMMV = Your Mileage May Vary In other words, how well it works for you depends on a lot of things. You need to determine the suitability for a given task. :) Michael Don't like the legal notice at the end of my email? Too bad, you can stuff it where the sun don't shine. -O

RE: HTML tags optimization

2005-09-02 Thread Michael . Coll-Barth
Maybe you can get some ideas over at http://validator.w3.org/docs/. At least they have the whole parser thing worked out. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] n.org]On Behalf Of DENG Sent: Friday, September 02, 2005 8:36 AM To: python-list@python.org Subje

RE: how to join two Dictionary together?

2005-08-30 Thread Michael . Coll-Barth
update works like append for lists a = {} a['a']='a' a['c']='c' b={} b['b'] = 'b' c={} c.update(a) c.update(b) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] n.org]On Behalf Of DENG Sent: Tuesday, August 30, 2005 10:45 AM To: python-list@python.org Subject: how to

RE: Newbie Question

2005-08-19 Thread Michael . Coll-Barth
Tom, Well, as one newbie to another, I tried this; >>> x = '22,44,66,88,"asd,asd","23,43,55"' >>> y = eval(x) >>> y (22, 44, 66, 88, 'asd,asd', '23,43,55') given that x some how comes from a single line in your file. BTW, do you get the tutor list as well? My guess is that the 'experts' over h

a little trouble passing values to Oracle using bind variables

2005-05-17 Thread Michael . Coll-Barth
All, As the subject line says, I am having some trouble passing bind variables to Oracle. When I pass a printable string value, such as 'NM', I get data. When I try to pass a non-printable character, such as 'return' - chr(13), I get no data back. I can't simply make NactionCode = chr(13), as py

RE: Launch file in Notepad

2005-05-12 Thread Michael . Coll-Barth
try b1="c:/test.txt" It seems to work for me on Windows 2000. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] n.org]On Behalf Of George Sent: Thursday, May 12, 2005 9:41 AM To: python-list@python.org Subject: Launch file in Notepad Newbie question: I'm trying to l

RE: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means t hat if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever sep

2005-05-11 Thread Michael . Coll-Barth
def testSpiritual(): ''' look within ''' if knowChrist: cryWithTheSaints() else: laughWithTheSinners() -Original Message- [mailto:[EMAIL PROTECTED] g]On Behalf Of rbt Who is this Jesus you are talking about? Does he know Python or something? What do fig t

RE: How do I parse this ? regexp ?

2005-04-27 Thread Michael . Coll-Barth
> From: [EMAIL PROTECTED] > > I want to remove the commas, and square brackets [ and ] > characters and > rewrite this whole line (and all the ones following in a text file > where only space would be a delimiter. How do I do this ? > If all you want to do to the data as you read in and write

rudeness was: Python licence again

2005-04-22 Thread Michael . Coll-Barth
Laszlo, >>> Is it something like 'center' or 'color' for Americans and 'centre' or 'colour' for British people? Yes, exactly. >>> (Sorry to be offtopic) No need to apologize. I started to read the postings on this list and was dismayed at the depth of rudeness on here. I thought that python

RE: trouble to print array contents using slice operator

2005-04-16 Thread Michael . Coll-Barth
print a[10:15] or print a[10:] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] n.org]On Behalf Of praba kar Sent: Saturday, April 16, 2005 10:28 AM To: python-list@python.org Subject: trouble to print array contents using slice operator Dear all, In Php array

RE:

2005-04-16 Thread Michael . Coll-Barth
All, I have been going through the manuals and not having much luck with the following code. This is basically an issue of giving 'split' multiple patterns to split a string. If it had an ignore case switch, the problem would be solved. Instead, I have to code the following, which works fine fo

RE: newbie: dictionary - howto get key value

2005-03-10 Thread Michael . Coll-Barth
how about? test = 3 #find person with this number for x in xrange(len(phone.keys())): print x if phone[phone.keys()[x]] == test: print phone.keys()[x] break Being a newbie myself, I'd love a little critique on the above. Be kind as I don't know what else needs to be done