asit wrote:
>
>According to me, indentation is ok. but the python interpreter gives
>an indentation error
>
>[asit ~/py] $ python search.py
> File "search.py", line 7
>findResults = string.split(commandOutput, "\n")
> ^
>IndentationError: unind
On Fri, 05 Mar 2010 00:04:13 -0800, asit wrote:
> Consider the following code
[snip]
> According to me, indentation is ok. but the python interpreter gives an
> indentation error
You can trust the interpreter. There *is* an indentation error. Most
likely you have mixed spaces and tabs. Try:
pyt
asit wrote:
> pattern = raw_input("Enter the file pattern to search for :\n")
> commandString = "find " + pattern
> commandOutput = commands.getoutput(commandString)
> findResults = string.split(commandOutput, "\n")
> print "Files : "
> print commandOutput
> print "=