Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Python API csoundCompile arguments

Date2008-10-25 17:44
Fromvictor
Subject[Csnd] Re: Python API csoundCompile arguments
yes, that has changed in the meantime
to using the args helper class:

def compile(csound, name,args=[]):
          """Compiles Csound code.
             csound: csound instance
             name: CSD filename if given
             args: list of arguments (as strings)
             returns 0 if successful , non-zero if not."""
             arglist = csnd.CsoundArgVList()
             arglist.Append("csound")
             arglist.Append(name)
             for i in args:
              arglist.Append(i)
             res = csoundCompile(csound, 
self.arglist.argc(),self.arglist.argv())
             return res

Regards

Victor
----- Original Message ----- 
From: "Chuckk Hubbard" 
To: "Csound List" 
Sent: Saturday, October 25, 2008 1:23 PM
Subject: [Csnd] Python API csoundCompile arguments


> Hello.
> I'm trying an example from Victor's API guide, filename
> lac2006_victor_lazzarini.pdf, in Python 2.5, using Csound 5.09.
> When I get to:
> csnd.csoundCompile(cs, 2, ['csound', 'filename.csd'])
> I get:
>
> TypeError: in method 'csoundCompile', argument 3 of type 'char **'
>
> It doesn't matter how many brackets I put around it...  Is there a way
> to get Python to send something that matches char **?
>
> Thanky.
> Chuckk
>
> -- 
> http://www.badmuthahubbard.com
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound" 


Date2008-10-26 10:57
From"Chuckk Hubbard"
Subject[Csnd] Re: Re: Python API csoundCompile arguments
AttachmentsNone