Alright well i've been working at this for a ridiculously longer amount of time than i think i should have been, so i finally gave up and that's why im here. I program in C++ and hardly do any python.. ever. So i need a little help and hope you all will be kind enough to throw some knowledge my way.
What i need to do, is count the files in the directory that my python script is currently in. It needs to be able to list ONLY the files, and NO sub directories that may be in that directory itself.
I've been looking at this thread: http://bytes.com/topic/python/answer...iles-directory and have been trying variations of tons of the solutions on this page, but continue to get errors. Im also trying to use the os.walk function, but it seems that everytime i run my script it works, but it does not display any output of the number of files in the directory. I even used the raw_input() function to see if it was just a matter of keeping the script open to see any output, but even so... the output was blank and all i had was the raw_input() message to quit.
So, any help/solutions would be greatly appreciated. Thanks so much.
What i need to do, is count the files in the directory that my python script is currently in. It needs to be able to list ONLY the files, and NO sub directories that may be in that directory itself.
I've been looking at this thread: http://bytes.com/topic/python/answer...iles-directory and have been trying variations of tons of the solutions on this page, but continue to get errors. Im also trying to use the os.walk function, but it seems that everytime i run my script it works, but it does not display any output of the number of files in the directory. I even used the raw_input() function to see if it was just a matter of keeping the script open to see any output, but even so... the output was blank and all i had was the raw_input() message to quit.
So, any help/solutions would be greatly appreciated. Thanks so much.
Comment