Ok I'm now totally stuck.
This is the code:
---
import os
from collections import Counter
path = ":c\\mypath\dir"
dirs = os.listdir( path )
filenames = {"this.txt", "that.txt",
"the_other.txt","this.doc","that.doc","this.pdf","first.txt","that.pdf"}
extensions = []
for filename in filenames:
kl. 16:56:29 UTC+2 torsdag 6. september 2012 skrev Tigerstyle følgende:
> Hi guys,
>
>
>
> I'm trying to write a module containing a function to examine the contents of
> the current working directory and print out a count of how many files have
> each extension (".txt", ".doc", etc.)
>
>
>
On Fri, Sep 7, 2012 at 12:56 AM, Tigerstyle wrote:
> I'm trying to write a module containing a function to examine the contents of
> the current working directory and print out a count of how many files have
> each extension (".txt", ".doc", etc.)
If you haven't already, look into the Python 'd
Thanks, just what I was looking for :-)
T
kl. 17:20:27 UTC+2 torsdag 6. september 2012 skrev MRAB følgende:
> On 06/09/2012 15:56, Tigerstyle wrote:
>
> > Hi guys,
>
> >
>
> > I'm trying to write a module containing a function to examine the contents
> > of the current working directory and p
On 06/09/2012 15:56, Tigerstyle wrote:
Hi guys,
I'm trying to write a module containing a function to examine the contents of the current working
directory and print out a count of how many files have each extension (".txt",
".doc", etc.)
This is the code so far:
--
import os
path = "v:\\wor
On 06/09/12 15:56, Tigerstyle wrote:
Hi guys,
I'm trying to write a module containing a function to examine the contents of the current working
directory and print out a count of how many files have each extension (".txt",
".doc", etc.)
This is the code so far:
--
import os
path = "v:\\wo
Hi guys,
I'm trying to write a module containing a function to examine the contents of
the current working directory and print out a count of how many files have each
extension (".txt", ".doc", etc.)
This is the code so far:
--
import os
path = "v:\\workspace\\Python2_Homework03\\src\\"
dirs