Re: [Tutor] files in a directory

2005-01-31 Thread Danny Yoo
> Now that I am reading many files at once, I wanted, to > have a tab delim file op that looks like this: > > My_coors Int_file 1 Int_file2 > IntFile3 > 01:26 34 235 > 245.45 > 04:42 342.4452.445.5 > 02:56 45.4

Re: [Tutor] files in a directory

2005-01-30 Thread kumar s
Thank you Jay. It worked, I am V.V.happy. I tried Liam's suggestion also, but some weird things are going and I am not only getting results but also any error. I am working on that. Other thing. I a feeding my parser some coordinates specified by me, where I am asking the parser to extract the

Re: [Tutor] files in a directory

2005-01-30 Thread Chad Crabtree
Well in the same vein as what the others put out there I made a verbose 'ls *.ext' so that you can see how to do it in one go. I figured this would give you enough of an example. You can hard code these things into your program. I used a construct similar to this to create an instant html ph

Re: [Tutor] files in a directory

2005-01-30 Thread Liam Clarke
Hey Kumar, You redirect stdin a lot. try this. import os def parse(filename): try: f1 = open(filename,'r') except IOError: return #Listdir returns a list of files and sub-dirs, and an attempt #to open a sub-dir raises an IOError. int = f1.read().split('\n') my

Re: [Tutor] files in a directory

2005-01-30 Thread Jay Loden
There's a few ways to accomplish this...the way that comes to mind is: ## import glob files = glob.glob("/path/to/director/*.dml") # assuming you want only .dml def spot(file): '''search for intensity spots and report them to an output