On Fri, 2008-08-01 at 13:25 -0700, Emile van Sebille wrote:
suhail shaik wrote:
>
......^^^^ this is a list
>
you're shadowing a builtin -- generally a bad practice
>
>
......^^^^ and this is why
>
>
HTH,
>
Emile
>
>
print fileName
file = fileName.split( ".")
file = fileName.split( ".")
>
you're shadowing a builtin -- generally a bad practice
>
print file
textfile = file[0]+".txt"
print textfile
os.chdir(PNAME)
file(textfile,' wt')
textfile = file[0]+".txt"
print textfile
os.chdir(PNAME)
file(textfile,' wt')
......^^^^ and this is why
>
>
HTH,
>
Emile
>
file() function. They do the exact same thing, and take the exact same
parameters, just open() makes your code a bit more readable (or at least
that's what I think).
--Ratfink