On Mon, 10 Dec 2012 08:36:22 -0800, moonhkt wrote:
> Hi All
>
> I am new in Python. When using open and then for line in f .
>
> Does it read all the data into f object ? or read line by line ?
Have you read the Fine Manual?
http://docs.python.org/2/library/stdtypes.html#file-objects
If you h
Dave Angel wrote:
> On 12/10/2012 11:36 AM, moonhkt wrote:
>> Hi All
>>
>> I am new in Python. When using open and then for line in f .
>>
>> Does it read all the data into f object ? or read line by line ?
>>
>>
>> f=open(file, 'r')
>>for line in f:
>> if userstring in
On 12/10/2012 11:36 AM, moonhkt wrote:
> Hi All
>
> I am new in Python. When using open and then for line in f .
>
> Does it read all the data into f object ? or read line by line ?
>
>
> f=open(file, 'r')
>for line in f:
> if userstring in line:
> print
Hi All
I am new in Python. When using open and then for line in f .
Does it read all the data into f object ? or read line by line ?
f=open(file, 'r')
for line in f:
if userstring in line:
print "file: " + os.path.join(root,file)
brea