Parsing help

This is the place for queries that don't fit in any of the other categories.

Parsing help

Postby bbesase » Tue May 14, 2013 12:08 pm

Code: Select all
def getUnitTest(path):
    foundFiles = []
    for r,d,f in os.walk(path):
        for files in f:
            if '.UnitTest' and '.vbproj' in files:
                path2 = os.path.split(files)
                print path2
                foundFiles.append(path2)
    return foundFiles


I have to parse this filepath for any files containing '.UnitTest.vbproj' But for some reason I cannot get it to work, any suggestions? Thanks in advance
bbesase
 
Posts: 18
Joined: Wed May 08, 2013 1:57 pm

Re: Parsing help

Postby bbesase » Tue May 14, 2013 12:20 pm

Nevermind, I'm an idiot. Figured it out :P
bbesase
 
Posts: 18
Joined: Wed May 08, 2013 1:57 pm

Re: Parsing help

Postby metulburr » Tue May 14, 2013 1:54 pm

Nevermind, I'm an idiot. Figured it out

It would be good in this type of situation that you say and paste the code that fixed your problem. That way others that come along and ask the same question, will get something out of it as well.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1470
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY


Return to General Coding Help

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests