Re: [Tutor] Can This Script Be Modified to Read Many Files?..

2016-01-25 Thread Bob Gailer
On Jan 25, 2016 6:26 PM, "Sam Starfas via Tutor" wrote: > > Hi,I am very new to Python, but having fun learning. > I need to have a script read all of the XML files contents that are in a directory, pull out the contents of an element, in my case , and list them in an output file. I have this scri

Re: [Tutor] Can This Script Be Modified to Read Many Files?..

2016-01-25 Thread Alan Gauld
On 25/01/16 21:34, Sam Starfas via Tutor wrote: > Can the below script be modified to scan/read all of the XML files in a > directory You could do it manually using for file in glob.glob("*.xml"): But you need to think about all the other possible file endings too. Or you could look at the fi

[Tutor] Can This Script Be Modified to Read Many Files?..

2016-01-25 Thread Sam Starfas via Tutor
Hi,I am very new to Python, but having fun learning.  I need to have a script read all of the XML files contents that are in a directory, pull out the contents of an element, in my case , and list them in an output file. I have this script that does exactly what I need. But in my beginning Pytho