On 2015-06-16 03:00, Malik Rumi wrote:
On Saturday, June 13, 2015 at 1:25:52 PM UTC-5, MRAB wrote:
On 2015-06-13 05:48, Malik Rumi wrote:
> On Friday, June 12, 2015 at 3:31:36 PM UTC-5, Ian wrote:
>> On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote:
>> > I am trying to find a list of strings i
On Mon, Jun 15, 2015 at 8:00 PM, Malik Rumi wrote:
> I have struggled with this for several hours and not made much progress. I
> was not sure if your 'names' variable was supposed to be the same as
> 'filenames'. Also, it should be 'os.path.join', not os.join. Anyway, I
> thought you had some
On Saturday, June 13, 2015 at 1:25:52 PM UTC-5, MRAB wrote:
> On 2015-06-13 05:48, Malik Rumi wrote:
> > On Friday, June 12, 2015 at 3:31:36 PM UTC-5, Ian wrote:
> >> On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote:
> >> > I am trying to find a list of strings in a directory of files. Here is
>
On 2015-06-13 05:48, Malik Rumi wrote:
On Friday, June 12, 2015 at 3:31:36 PM UTC-5, Ian wrote:
On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote:
> I am trying to find a list of strings in a directory of files. Here is my
code:
>
> # -*- coding: utf-8 -*-
> import os
> import fileinput
>
> s2
On Friday, June 12, 2015 at 6:48:18 PM UTC-5, Chris Angelico wrote:
> On Sat, Jun 13, 2015 at 5:39 AM, Malik Rumi wrote:
> > for line in lines:
> > for item in fileinput.input(s2):
> > if line in item:
> > with open(line + '_list', 'a+') as l:
> > l.append(
On Friday, June 12, 2015 at 3:31:36 PM UTC-5, Ian wrote:
> On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote:
> > I am trying to find a list of strings in a directory of files. Here is my
> > code:
> >
> > # -*- coding: utf-8 -*-
> > import os
> > import fileinput
> >
> > s2 = os.listdir('/home/m
On Sat, Jun 13, 2015 at 5:39 AM, Malik Rumi wrote:
> for line in lines:
> for item in fileinput.input(s2):
> if line in item:
> with open(line + '_list', 'a+') as l:
> l.append(filename(), filelineno(), line)
Ian's already answered your actual question, b
On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote:
> I am trying to find a list of strings in a directory of files. Here is my
> code:
>
> # -*- coding: utf-8 -*-
> import os
> import fileinput
>
> s2 = os.listdir('/home/malikarumi/Projects/P5/shortstories')
Note that the filenames that will be
I am trying to find a list of strings in a directory of files. Here is my code:
# -*- coding: utf-8 -*-
import os
import fileinput
s2 = os.listdir('/home/malikarumi/Projects/P5/shortstories')
with open('/home/malikarumi/Projects/P5/list_stories') as f:
lines = f.readlines()
for line in lin