simple error i hope

suhail shaik suhailsqm at gmail.com
Fri Aug 1 22:08:30 CEST 2008


hi ,

i am new to python..may be this may turn into a simple error but i am in
urgency please kindly help me


#!/usr/bin/python
#Globals here
ROOTDIR = "/vol/mmis/media/video/tvid2008/mediaVideos/test" # Root dir where
video files are located
PNAME = "/data/test_1/"
#DAILY_UPLOAD_PATH = "/mmis-ss9952/newsroom/du-dev/"

import os,glob
### MAIN ###
os.chdir(ROOTDIR)

for fileName in glob.glob('*.mpg'):
    print fileName
    file = fileName.split(".")
    print file
    textfile = file[0]+".txt"
    print textfile
    os.chdir(PNAME)
    file(textfile,'wt')
    os.chdir("/home/qmss2/workspace/sbd/")
    command = "java MPEG_Play "+ROOTDIR+"/"+filename+"
"+"/data/test_1/"+textfile
    print command
    #os.system(command)


please tell me what is the error.
trace back is

file(textfile,'wt')
TypeError: 'list' object is not callable
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080801/af45e289/attachment.html>


More information about the Python-list mailing list