[Tutor] basics of passing arguments to make a graph

2007-03-22 Thread Che M
Hi, this is some *really* beginner Python stuff, hope you folks could help me. I've been trying to make basic plots (line graphs) using the pyplot module (wx.lib.plot) in wxPython. So far, so good. To start, I can use a class like this (adapted from a demo) to draw a pre-defined graph: cla

Re: [Tutor] sorting data from multiple arrays

2007-03-22 Thread Jeff Peery
... what is '*' in '*temp'? thanks! J Kent Johnson <[EMAIL PROTECTED]> wrote: Jeff Peery wrote: > hello, I typically run into this problem and I'm not always sure of the > most efficient way to handle it. I often work with multiple arrays of > data, say arrays a, b, and c, and I want to sort the

Re: [Tutor] Why is it...

2007-03-22 Thread Terry Carroll
On Thu, 22 Mar 2007, Jason Massey wrote: > In the interpreter this doesn't work: > > >>> f = open(r"c:\python24\image.dat") > >>> line = f.readline() > >>> while line: > ... line = f.readline() > ... f.close() > Traceback ( File "", line 3 > f.close() > ^ > SyntaxError: invalid synta

[Tutor] Another string question

2007-03-22 Thread Jay Mutter III
I wanted the following to check each line and if it ends in a right parentheses then write the entire line to one file and if not then write the line to anther. It wrote all of the ) to one file and the rest of the line (ie minus the ) to the other file. in_filename = raw_input('What is the

[Tutor] pruning and ordering a list of lists

2007-03-22 Thread William O'Higgins Witteman
I have a list of lists derived from a log file that I want to create a summary of, but I am not sure of an approach to do what I need. Here's a sample of the data: [["user1","18/Mar/2007:07:52:38 -0400"],["user1","18/Mar/2007:07:52:40 -0400"],["user2","18/Mar/2007:07:52:42 -0400"],["user3","18/M

Re: [Tutor] sorting data from multiple arrays

2007-03-22 Thread Jeff Peery
Thanks for all the responses, that is a huge help! Jeff Kent Johnson <[EMAIL PROTECTED]> wrote: Jeff Peery wrote: > hello, I typically run into this problem and I'm not always sure of the > most efficient way to handle it. I often work with multiple arrays of > data, say arrays a, b, and c, and

Re: [Tutor] sorting data from multiple arrays

2007-03-22 Thread Kent Johnson
Jeff Peery wrote: > hello, I typically run into this problem and I'm not always sure of the > most efficient way to handle it. I often work with multiple arrays of > data, say arrays a, b, and c, and I want to sort the elements of b and c > based on a. for example: > > a = [3,2,1,4] > b = ['hi'

Re: [Tutor] Why is it...

2007-03-22 Thread Jason Massey
In the interpreter this doesn't work: f = open(r"c:\python24\image.dat") line = f.readline() while line: ... line = f.readline() ... f.close() Traceback ( File "", line 3 f.close() ^ SyntaxError: invalid syntax But this does: f = open(r"c:\python24\image.dat") line = f.readline()

Re: [Tutor] Why is it...

2007-03-22 Thread Kent Johnson
Jay Mutter III wrote: > Why is it that when I run the following interactively > > f = open('Patents-1920.txt') > line = f.readline() > while line: > print line, > line = f.readline() > f.close() > > I get an error message > > File "", line 4 > f.close() > ^ > SyntaxError: inv

Re: [Tutor] sorting data from multiple arrays

2007-03-22 Thread R. Alan Monroe
> hello, I typically run into this problem and I'm not always sure of the most > efficient way to handle it. I often work with multiple arrays of data, say > arrays a, b, and c, and I want to sort the > elements of b and c based on a. for example: > a = [3,2,1,4] > b = ['hi', 'my','name', 'is']

[Tutor] [ANN] Python courses this Spring

2007-03-22 Thread wesley chun
I'll be giving a variety of Python courses this Spring. Daytime courses are for visitors and locals who need Python training in the shortest amount of time possible via consecutive workdays. Python is certainly gaining momentum as our February course filled up completely! Although I had planned

[Tutor] Why is it...

2007-03-22 Thread Jay Mutter III
Why is it that when I run the following interactively f = open('Patents-1920.txt') line = f.readline() while line: print line, line = f.readline() f.close() I get an error message File "", line 4 f.close() ^ SyntaxError: invalid syntax but if i run it in a script there is no

[Tutor] sorting data from multiple arrays

2007-03-22 Thread Jeff Peery
hello, I typically run into this problem and I'm not always sure of the most efficient way to handle it. I often work with multiple arrays of data, say arrays a, b, and c, and I want to sort the elements of b and c based on a. for example: a = [3,2,1,4] b = ['hi', 'my','name', 'is'] c = [5,2,4,

Re: [Tutor] Money Matters

2007-03-22 Thread Jaggo
Hello! I read this list because I'm new to Python and I really am learning an average of something new I did not know from every digest hitting my inbox. I have no interest on the matter of money. Just my .02$. -Omer Tabach [EMAIL PROTECTED] wrote: Message: 3 Date: Wed, 21 Mar 2007 23:13:57 -

Re: [Tutor] MONEY MATTERS

2007-03-22 Thread Kirk Bailey
So be it. The list now exists, and is called Coding4Cash. Here is a weblink to it: http://tech.groups.yahoo.com/group/coding4cash/ And here are email address': Post message: [EMAIL PROTECTED] Subscribe: [EMAIL PROTECTED] Unsubscribe:[EMAIL PROTECTED] List owner: [EMAIL PROTECTED]

Re: [Tutor] MONEY MATTERS

2007-03-22 Thread Kent Johnson
Kirk Bailey wrote: > ok, SHOULD THIS BE A THREAD OR A SEPERATE LIST? > > Many of ius are independants, and write code for the love of it- or to > promote and sell independantly. So possibly a thread discussing ways to > turn useful code into moiney is a useful idea. If the wish of the list >

Re: [Tutor] Should I use python for parsing text

2007-03-22 Thread Luke Paireepinart
Jay Mutter III wrote: > Luke; I'm a bit pressed for time right now and I can't look over this e-mail. Please reply on-list in the future using the 'reply-all' feature. You're more likely to get a prompt response. (this e-mail is carbon copied to the list, so don't worry about sending another.)

Re: [Tutor] Should I use python for parsing text?

2007-03-22 Thread Kent Johnson
Jay Mutter III wrote: > Kent; > > Thanks for the reply on tutor-python. > > My data file which is just a .txt file created under WinXP by an OCR > program contains lines like: > > A.-C. Manufacturing Company. (See Sebastian, A. A., > and Capes, assignors.) > A. G. A. Railway Light & Signal Co.

Re: [Tutor] MONEY MATTERS

2007-03-22 Thread Steve Oldner
My 2 cents worth is to set up something separate, it'll just keep the principles and ideas clearer. While I have my own ideas about the "million dollar application", I would like a forum where I can just listen and learn any type of ideas without having a worry that someone will 'steal' my idea an

Re: [Tutor] Making table

2007-03-22 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message >> One final tip is to put the format string in a variable then use >> that >> in printing/writing the output ... >> This has the advantage that you can build the format string >> dynamically by examining the data first - eg the maximum >> leng

Re: [Tutor] MONEY MATTERS

2007-03-22 Thread wesley chun
> ok, SHOULD THIS BE A THREAD OR A SEPERATE LIST? > > Many of ius are independants, and write code for the love of it- or to > promote and sell independantly. So possibly a thread discussing ways to > turn useful code into moiney is a useful idea. If the wish of the list > is a thread here, we ca