unexpected token `;'

bbarbero at inescporto.pt bbarbero at inescporto.pt
Tue Aug 25 12:57:07 CEST 2009

Hello to all!

I am struggling with a script in python for a while now, and decided  
to look for some help. I am running a code that takes commands from  
Marsyas(open source for Music analysis).

#!/bin/bashimport math
import re
import numpy
import string
import os.path
import sys
import commands

l =  

Col = open(l, 'r')
colist= []
songlist = []
for line in Col:
         #print line
         song = os.path.split(line)[1]
         #print song

cmd = "sfplay " + colist[2]
print cmd
fileout = commands.getoutput(cmd)
print fileout

It basically reads song files from the .mf file, stores them in a list  
and play  one of the songs from the list. It does work with some music  
but mostly it gives an error like this:


sh: -c: line 1: syntax error near unexpected token `;'
sh: -c: line 1: `; } 2>&1'

Ive been searching for the meaning of the error, and It really depends  
on the script, but I would conclude that I am missing a punctuation  

Thank you very much for taking your time reading my request.

Looking forward to hearing from you.


This message was sent using IMP, the Internet Messaging Program.

More information about the Python-list mailing list