simple error i hope

Emile van Sebille emile at fenx.com
Fri Aug 1 22:25:39 CEST 2008


suhail shaik wrote:

>     print fileName
>     file = fileName.split(".")
......^^^^  this is a list

you're shadowing a builtin -- generally a bad practice

>     print file
>     textfile = file[0]+".txt"
>     print textfile
>     os.chdir(PNAME)
>     file(textfile,'wt')

......^^^^  and this is why


HTH,

Emile




More information about the Python-list mailing list