Thanks all for your immediate responses :)
On Thu, Oct 11, 2012 at 6:20 PM, Joel Goldstick wrote:
> On Thu, Oct 11, 2012 at 8:30 AM, eryksun wrote:
> > On Thu, Oct 11, 2012 at 7:13 AM, Sunil Tech
> wrote:
> >>
> >> text1 contains
> >> This is from Text1 --- 1st line
> >>
> >>
> >> text2 co
On Thu, Oct 11, 2012 at 8:30 AM, eryksun wrote:
> On Thu, Oct 11, 2012 at 7:13 AM, Sunil Tech wrote:
>>
>> text1 contains
>> This is from Text1 --- 1st line
>>
>>
>> text2 contains
>> This is from Text2 --- 1st line
>>
>>
>> i want result in text3 like
>> This is from Text1 --- 1st line
On Thu, Oct 11, 2012 at 7:13 AM, Sunil Tech wrote:
>
> text1 contains
> This is from Text1 --- 1st line
>
>
> text2 contains
> This is from Text2 --- 1st line
>
>
> i want result in text3 like
> This is from Text1 --- 1st line
> This is from Text2 --- 1st line
>
> but condition is "
i used zip(), but it gives me result in list of tuples format.
But i don't get in a exact expect format (as mentioned)
no loopings are allowed.
On Thu, Oct 11, 2012 at 5:30 PM, Dave Angel wrote:
> On 10/11/2012 07:13 AM, Sunil Tech wrote:
> > Hi all,
> >
> > Greetings to you...
> > it been so he
On 10/11/2012 07:13 AM, Sunil Tech wrote:
> Hi all,
>
> Greetings to you...
> it been so helpful for me to go through your all mails & support & i wish
> it still continues.
>
> I have two text files.
>
> text1 contains
>
> This is from Text1 --- 1st line
> This is from Text1 --- 2nd line
> This is
Hi all,
Greetings to you...
it been so helpful for me to go through your all mails & support & i wish
it still continues.
I have two text files.
text1 contains
This is from Text1 --- 1st line
This is from Text1 --- 2nd line
This is from Text1 --- 3rd line
This is from Text1 --- 4th line
This is
Alan Gauld wrote:
> "Ricardo Aráoz" <[EMAIL PROTECTED]> wrote
>
> In = open(r'E:\MyDir\MyDoc.txt', 'rb')
> Out = open(r'E:\MyDir\MyUpperDoc.txt', 'wb')
> Out.write(In.read().upper())
> In.close()
> Out.close()
>> Pretty simple program. The question is : If 'In' is a HUGE file,
"Ricardo Aráoz" <[EMAIL PROTECTED]> wrote
In = open(r'E:\MyDir\MyDoc.txt', 'rb')
Out = open(r'E:\MyDir\MyUpperDoc.txt', 'wb')
Out.write(In.read().upper())
In.close()
Out.close()
>
> Pretty simple program. The question is : If 'In' is a HUGE file, how
> does Python process
Hi, I am in doubt :
>>> In = open(r'E:\MyDir\MyDoc.txt', 'rb')
>>> Out = open(r'E:\MyDir\MyUpperDoc.txt', 'wb')
>>> Out.write(In.read().upper())
>>> In.close()
>>> Out.close()
Pretty simple program. The question is : If 'In' is a HUGE file, how
does Python process it? Does it treat it as a stream
Kermit:
> --
>
> Message: 7
> Date: Fri, 09 Jun 2006 11:02:44 -0400
> From: Kent Johnson <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] file attribute of module
> Cc: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1; format=
the way.
Is the individual db appropriate for
this or I should be looking for a dictionary type format. I am lost.
_/_/ _/ _/
_/ _/ _/ _/
_/_/_/_/ _/ _/
_/ _/ _/ _/
_/ _/ _/ _/
Andrzej Kolinski
Kent Johnson <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
24/11/2005 08:40 PM
To
Andrzej Kolinski wrote:
>
> OK, I made some progress I think. I added a few lines to Kent's script
> to get closer what I really am after:
Congratulations! See some notes below.
>
> ==
> lines = open('liga050926.sbk') # to get the data from a real fi
Andrzej Kolinski wrote:
>
> OK, I made some progress I think. I added a few lines to Kent's script
> to get closer what I really am after:
Congratulations! See some notes below.
>
> ==
> lines = open('liga050926.sbk') # to get the data from a real
ohnson <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
23/11/2005 11:03 AM
To
cc
tutor@python.org
Subject
Re: [Tutor] files - strings - lists
Andrzej Kolinski wrote:
>
> I want to create a program that uses data from text files, makes
> appropriate calculations and pr
Danny wrote:
| Hi Chris,
|
| Yes, I suspect that this happens a lot. I have my own little formatting
| reader that simulates some of the features of C's scanf, for example:
|
|http://hkn.eecs.berkeley.edu/~dyoo/python/scanf/
|
| so I think it's one of those little exercises that everyone e
Thank you Kent, Chris, Danny,
This is superb, let me work on my part
for now and I promise get back to the group with more ...
_/_/ _/ _/
_/ _/ _/ _/
_/_/_/_/ _/ _/
_/ _/ _/ _/
_/ _/ _/ _/
Andrzej Kolinski wrote:
>
> I want to create a
> Great links, Danny. Thanks. I had seen mxTextTools before but didn't
> search for the right thing before raising the question. The pyparsing
> seems very interesting. The code that I attach below is a very
> light-weight version of a formatted reader. It assumes that you just
> want to pluck
Danny Yoo wrote:
| On Wed, 23 Nov 2005, Chris or Leslie Smith wrote:
|
|| I agree that handling this with Python is pretty straightforward, but
|| I'm wondering if there exists some sort of mechanism for reading
|| these types of well structured (though not XML format, etc...) files.
|
| Hi Chris
On Wed, 23 Nov 2005, Chris or Leslie Smith wrote:
> I agree that handling this with Python is pretty straightforward, but
> I'm wondering if there exists some sort of mechanism for reading these
> types of well structured (though not XML format, etc...) files.
Hi Chris,
Yes, take a look at "pa
|
| With these tools the solution is pretty simple.
I agree that handling this with Python is pretty straightforward, but I'm
wondering if there exists some sort of mechanism for reading these types of
well structured (though not XML format, etc...) files. Something like a reverse
template, s
Andrzej Kolinski wrote:
>
> I want to create a program that uses data from text files, makes
> appropriate calculations and produces report. First I need to find out
> what is the right way to retrieve appropriate information from an input
> file. This is a typical format of the input file:
>
I want to create a program that uses
data from text files, makes appropriate calculations and produces report.
First I need to find out what is the right way to retrieve appropriate
information from an input file. This is a typical format of the input file:
1 Polonijna Liga Mistrzow
|from
> 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
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
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
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
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
Hello.
I wrote a parser to parse spot intensities. The input
to this parser i am giving one single file
f1 = open('my_intensity_file.dml','r')
int = f1.read().split('\n')
my_vals = intParser(int)
intParser return a list
f2 = open('myvalues.txt','w')
for line in my_vals:
f2.write(line)
28 matches
Mail list logo