Re: [Tutor] Newbie Wondering About Threads

2008-12-06 Thread Lie Ryan
On Sat, 06 Dec 2008 21:43:11 -0500, Damon Timm wrote: > On Sat, Dec 6, 2008 at 6:25 PM, Python Nutter <[EMAIL PROTECTED]> > wrote: >> I'm on my phone so excuse the simple reply. From what I skimmed you are >> wrapping shell commands which is what I do all the time. Some hints. 1) >> look into pope

Re: [Tutor] Sorting on different fields

2008-12-06 Thread the New me
Thanks Kent: Is there an example for sorting on 2 or 3 fields, I saw this page http://personalpages.tds.net/~kent37/kk/7.html#e7sorting-on-multiple-keys It just gives a cursory note: To sort a list of items with primary and secondary sort keys, provide a key function that returns a tuple

Re: [Tutor] Newbie Wondering About Threads

2008-12-06 Thread Martin Walsh
Damon Timm wrote: > On Sat, Dec 6, 2008 at 6:25 PM, Python Nutter <[EMAIL PROTECTED]> wrote: >> I'm on my phone so excuse the simple reply. >> From what I skimmed you are wrapping shell commands which is what I do >> all the time. Some hints. 1) look into popen or subprocess in place of >> execute

Re: [Tutor] Newbie Wondering About Threads

2008-12-06 Thread Damon Timm
On Sat, Dec 6, 2008 at 6:25 PM, Python Nutter <[EMAIL PROTECTED]> wrote: > I'm on my phone so excuse the simple reply. > From what I skimmed you are wrapping shell commands which is what I do > all the time. Some hints. 1) look into popen or subprocess in place of > execute for more flexibility. I

[Tutor] Newbie Wondering About Threads

2008-12-06 Thread Damon Timm
Hi Everyone - I am a complete and utter Python newbie (as of today, honestly) -- am interested in expanding my programming horizons beyond bash scripting and thought Python would be a nice match for me. To start, I thought I may try re-writing some of my bash scripts in Python as a learning tool f

Re: [Tutor] Sorting on different fields

2008-12-06 Thread Kent Johnson
On Sat, Dec 6, 2008 at 1:01 PM, the New me <[EMAIL PROTECTED]> wrote: > > > I would like to be able to sort a list of rows, > each row has (say 4) fields to sort on, > > primary key to sort on first, then the second one and so on, > > any suggestions and where to look (may be), http://personalpage

[Tutor] Sorting on different fields

2008-12-06 Thread the New me
I would like to be able to sort a list of rows, each row has (say 4) fields to sort on, primary key to sort on first, then the second one and so on, any suggestions and where to look (may be), Thanks a bunch Peter ___ Tutor maillist - Tu

Re: [Tutor] Random equation generator

2008-12-06 Thread TexasJerky100
I think this maybe will work out. I might have to just go with the generalized form as you suggest and forget about the random aspect. In a message dated 12/6/2008 10:05:16 A.M. Central Standard Time, [EMAIL PROTECTED] writes: Please use the reply-all button when responding, so tha

Re: [Tutor] Random equation generator

2008-12-06 Thread Rich Lovely
Please use the reply-all button when responding, so that your message gets sent to the list as well. If that's the sort of equation you're after, than the easiest way would probably to decide on a generalised form: y=(2x-1)*4x y = 4*x**2 - 4x y=2+5(x-1) y = 5*x - 3 y=(2x+5)+(5x-25) y =

Re: [Tutor] Random equation generator

2008-12-06 Thread Paul McGuire
I would say, though, that you should be careful in your implementation of is_on_line, for floating point round-off errors. Try this at the command prompt (Python 2.5.2, with __future__ division imported): >>> 49 * (1/49) == 1 False >>> 1 - 49 * (1/49) 1.1102230246251565e-016 I would suggest a sl

Re: [Tutor] Sorting a dictionary on a value in a list.

2008-12-06 Thread Lie Ryan
On Thu, 04 Dec 2008 10:48:54 -0800, Lawrence Wickline wrote: > Thanks for the help I think I got it. > > As far as lines go I believe it will be processing hundreds of thousands > of lines if not a million or more lines per run. I haven't gotten to do > a full run but it has been running acceptab