Csound Csound-dev Csound-tekno Search About

[Csnd] setPythonMessageCallback() error

Date2009-12-09 18:26
Frommark jamerson
Subject[Csnd] setPythonMessageCallback() error
 I've been messing with python and csound again, and have run into a little snag/bug/error.  I discovered that csound.setPythonMessageCallback() is causing my script to crash.  I have tried this is several scripts, including Mike Goggins' tutorial examples.  If I comment that line out, the scripts work just fine.  I am using python 2.5, and csound 5.11.  Has anyone else experienced this?  


      


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-09 18:50
FromVictor Lazzarini
Subject[Csnd] Re: setPythonMessageCallback() error
Can you show this problem, it might have a simple solution? A code  
fragment would do.

Victor
On 9 Dec 2009, at 18:26, mark jamerson wrote:

>
> I've been messing with python and csound again, and have run into a  
> little snag/bug/error.  I discovered that  
> csound.setPythonMessageCallback() is causing my script to crash.  I  
> have tried this is several scripts, including Mike Goggins' tutorial  
> examples.  If I comment that line out, the scripts work just fine.   
> I am using python 2.5, and csound 5.11.  Has anyone else experienced  
> this?
>
>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-09 19:02
FromVictor Lazzarini
Subject[Csnd] Re: Re: setPythonMessageCallback() error
By the way instead of using csound.setPythonMessageCallback() you can  
use
csound.setMessageCallback() as in:


def mess(string):
       print "csound messages: %s" + string

cs = csnd.Csound()
cs.PreCompile()
cs.SetMessageCallback(mess)
cs.Compile("test.csd")

etc

Victor


On 9 Dec 2009, at 18:50, Victor Lazzarini wrote:

> Can you show this problem, it might have a simple solution? A code  
> fragment would do.
>
> Victor
> On 9 Dec 2009, at 18:26, mark jamerson wrote:
>
>>
>> I've been messing with python and csound again, and have run into a  
>> little snag/bug/error.  I discovered that  
>> csound.setPythonMessageCallback() is causing my script to crash.  I  
>> have tried this is several scripts, including Mike Goggins'  
>> tutorial examples.  If I comment that line out, the scripts work  
>> just fine.  I am using python 2.5, and csound 5.11.  Has anyone  
>> else experienced this?
>>
>>
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-09 19:32
Frommark jamerson
Subject[Csnd] Re: Re: Re: setPythonMessageCallback() error

If I use the following simple script, the script crashes, but if I simply comment out the csound.setPythonMessageCallback(), it runs, and a csd is printed in the IDLE Gui, and the temp.orc/.sco files are created. 



import csnd

csound = csnd.CppSound()
csound.setPythonMessageCallback()
csound.load('tutorial2.csd')
csound.setCommand('csound -RWfo tutorial.py.wav temp.orc temp.sco')

print csound.getCSD()

csound.exportForPerformance()
csound.perform()





--- On Wed, 12/9/09, Victor Lazzarini  wrote:

> From: Victor Lazzarini 
> Subject: [Csnd] Re: Re: setPythonMessageCallback() error
> To: csound@lists.bath.ac.uk
> Date: Wednesday, December 9, 2009, 1:02 PM
> By the way instead of using
> csound.setPythonMessageCallback() you can use
> csound.setMessageCallback() as in:
> 
> 
> def mess(string):
>       print "csound messages: %s" + string
> 
> cs = csnd.Csound()
> cs.PreCompile()
> cs.SetMessageCallback(mess)
> cs.Compile("test.csd")
> 
> etc
> 
> Victor
> 
> 
> On 9 Dec 2009, at 18:50, Victor Lazzarini wrote:
> 
> > Can you show this problem, it might have a simple
> solution? A code fragment would do.
> > 
> > Victor
> > On 9 Dec 2009, at 18:26, mark jamerson wrote:
> > 
> >> 
> >> I've been messing with python and csound again,
> and have run into a little snag/bug/error.  I
> discovered that csound.setPythonMessageCallback() is causing
> my script to crash.  I have tried this is several
> scripts, including Mike Goggins' tutorial examples.  If
> I comment that line out, the scripts work just fine.  I
> am using python 2.5, and csound 5.11.  Has anyone else
> experienced this?
> >> 
> >> 
> >> 
> >> 
> >> 
> >> Send bugs reports to this list.
> >> To unsubscribe, send email sympa@lists.bath.ac.uk
> with body "unsubscribe csound"
> > 
> > 
> > 
> > Send bugs reports to this list.
> > To unsubscribe, send email sympa@lists.bath.ac.uk
> with body "unsubscribe csound"
> 
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk
> with body "unsubscribe csound"
> 





Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-09 19:39
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Re: setPythonMessageCallback() error
I guess if you need to redirect the messages, use setMessageCallback()  
instead, as in my example. If not, no need to bother with it.

Victor
On 9 Dec 2009, at 19:32, mark jamerson wrote:

>
>
> If I use the following simple script, the script crashes, but if I  
> simply comment out the csound.setPythonMessageCallback(), it runs,  
> and a csd is printed in the IDLE Gui, and the temp.orc/.sco files  
> are created.
>
>
>
> import csnd
>
> csound = csnd.CppSound()
> csound.setPythonMessageCallback()
> csound.load('tutorial2.csd')
> csound.setCommand('csound -RWfo tutorial.py.wav temp.orc temp.sco')
>
> print csound.getCSD()
>
> csound.exportForPerformance()
> csound.perform()
>
>
>
>
>
> --- On Wed, 12/9/09, Victor Lazzarini   
> wrote:
>
>> From: Victor Lazzarini 
>> Subject: [Csnd] Re: Re: setPythonMessageCallback() error
>> To: csound@lists.bath.ac.uk
>> Date: Wednesday, December 9, 2009, 1:02 PM
>> By the way instead of using
>> csound.setPythonMessageCallback() you can use
>> csound.setMessageCallback() as in:
>>
>>
>> def mess(string):
>>       print "csound messages: %s" + string
>>
>> cs = csnd.Csound()
>> cs.PreCompile()
>> cs.SetMessageCallback(mess)
>> cs.Compile("test.csd")
>>
>> etc
>>
>> Victor
>>
>>
>> On 9 Dec 2009, at 18:50, Victor Lazzarini wrote:
>>
>>> Can you show this problem, it might have a simple
>> solution? A code fragment would do.
>>>
>>> Victor
>>> On 9 Dec 2009, at 18:26, mark jamerson wrote:
>>>
>>>>
>>>> I've been messing with python and csound again,
>> and have run into a little snag/bug/error.  I
>> discovered that csound.setPythonMessageCallback() is causing
>> my script to crash.  I have tried this is several
>> scripts, including Mike Goggins' tutorial examples.  If
>> I comment that line out, the scripts work just fine.  I
>> am using python 2.5, and csound 5.11.  Has anyone else
>> experienced this?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>> with body "unsubscribe csound"
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>> with body "unsubscribe csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk
>> with body "unsubscribe csound"
>>
>
>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-09 19:51
Frommark jamerson
Subject[Csnd] Re: Re: Re: Re: Re: setPythonMessageCallback() error
  Thanks. I will try your method, otherwise, it will just be a minor annoyance.  

--- On Wed, 12/9/09, Victor Lazzarini  wrote:

> From: Victor Lazzarini 
> Subject: [Csnd] Re: Re: Re: Re: setPythonMessageCallback() error
> To: csound@lists.bath.ac.uk
> Date: Wednesday, December 9, 2009, 1:39 PM
> I guess if you need to redirect the
> messages, use setMessageCallback()  
> instead, as in my example. If not, no need to bother with
> it.
> 
> Victor
> On 9 Dec 2009, at 19:32, mark jamerson wrote:
> 
> >
> >
> > If I use the following simple script, the script
> crashes, but if I  
> > simply comment out the
> csound.setPythonMessageCallback(), it runs,  
> > and a csd is printed in the IDLE Gui, and the
> temp.orc/.sco files  
> > are created.
> >
> >
> >
> > import csnd
> >
> > csound = csnd.CppSound()
> > csound.setPythonMessageCallback()
> > csound.load('tutorial2.csd')
> > csound.setCommand('csound -RWfo tutorial.py.wav
> temp.orc temp.sco')
> >
> > print csound.getCSD()
> >
> > csound.exportForPerformance()
> > csound.perform()
> >
> >
> >
> >
> >
> > --- On Wed, 12/9/09, Victor Lazzarini  
> 
> > wrote:
> >
> >> From: Victor Lazzarini 
> >> Subject: [Csnd] Re: Re: setPythonMessageCallback()
> error
> >> To: csound@lists.bath.ac.uk
> >> Date: Wednesday, December 9, 2009, 1:02 PM
> >> By the way instead of using
> >> csound.setPythonMessageCallback() you can use
> >> csound.setMessageCallback() as in:
> >>
> >>
> >> def mess(string):
> >>       print "csound
> messages: %s" + string
> >>
> >> cs = csnd.Csound()
> >> cs.PreCompile()
> >> cs.SetMessageCallback(mess)
> >> cs.Compile("test.csd")
> >>
> >> etc
> >>
> >> Victor
> >>
> >>
> >> On 9 Dec 2009, at 18:50, Victor Lazzarini wrote:
> >>
> >>> Can you show this problem, it might have a
> simple
> >> solution? A code fragment would do.
> >>>
> >>> Victor
> >>> On 9 Dec 2009, at 18:26, mark jamerson wrote:
> >>>
> >>>>
> >>>> I've been messing with python and csound
> again,
> >> and have run into a little snag/bug/error. 
> I
> >> discovered that csound.setPythonMessageCallback()
> is causing
> >> my script to crash.  I have tried this is
> several
> >> scripts, including Mike Goggins' tutorial
> examples.  If
> >> I comment that line out, the scripts work just
> fine.  I
> >> am using python 2.5, and csound 5.11.  Has
> anyone else
> >> experienced this?
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> Send bugs reports to this list.
> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk
> >> with body "unsubscribe csound"
> >>>
> >>>
> >>>
> >>> Send bugs reports to this list.
> >>> To unsubscribe, send email sympa@lists.bath.ac.uk
> >> with body "unsubscribe csound"
> >>
> >>
> >>
> >> Send bugs reports to this list.
> >> To unsubscribe, send email sympa@lists.bath.ac.uk
> >> with body "unsubscribe csound"
> >>
> >
> >
> >
> >
> >
> > Send bugs reports to this list.
> > To unsubscribe, send email sympa@lists.bath.ac.uk
> with body  
> > "unsubscribe csound"
> 
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk
> with body "unsubscribe csound"
> 





Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-09 21:13
From"ilterzouomo"
Subject[Csnd] Re: Re: Re: Re: Re: Re: setPythonMessageCallback() error
Hi Mr. Mark,
it would not be that csound 5.11 is usimg python 2.6 ?

But i don't know if this means somethings for Your problem ...

ciao,
fran.
----- Original Message ----- 
From: "mark jamerson" 
To: 
Sent: Wednesday, December 09, 2009 8:51 PM
Subject: [Csnd] Re: Re: Re: Re: Re: setPythonMessageCallback() error



  Thanks. I will try your method, otherwise, it will just be a minor 
annoyance.

--- On Wed, 12/9/09, Victor Lazzarini  wrote:

> From: Victor Lazzarini 
> Subject: [Csnd] Re: Re: Re: Re: setPythonMessageCallback() error
> To: csound@lists.bath.ac.uk
> Date: Wednesday, December 9, 2009, 1:39 PM
> I guess if you need to redirect the
> messages, use setMessageCallback()
> instead, as in my example. If not, no need to bother with
> it.
>
> Victor
> On 9 Dec 2009, at 19:32, mark jamerson wrote:
>
> >
> >
> > If I use the following simple script, the script
> crashes, but if I
> > simply comment out the
> csound.setPythonMessageCallback(), it runs,
> > and a csd is printed in the IDLE Gui, and the
> temp.orc/.sco files
> > are created.
> >
> >
> >
> > import csnd
> >
> > csound = csnd.CppSound()
> > csound.setPythonMessageCallback()
> > csound.load('tutorial2.csd')
> > csound.setCommand('csound -RWfo tutorial.py.wav
> temp.orc temp.sco')
> >
> > print csound.getCSD()
> >
> > csound.exportForPerformance()
> > csound.perform()
> >
> >
> >
> >
> >
> > --- On Wed, 12/9/09, Victor Lazzarini 
>
> > wrote:
> >
> >> From: Victor Lazzarini 
> >> Subject: [Csnd] Re: Re: setPythonMessageCallback()
> error
> >> To: csound@lists.bath.ac.uk
> >> Date: Wednesday, December 9, 2009, 1:02 PM
> >> By the way instead of using
> >> csound.setPythonMessageCallback() you can use
> >> csound.setMessageCallback() as in:
> >>
> >>
> >> def mess(string):
> >> print "csound
> messages: %s" + string
> >>
> >> cs = csnd.Csound()
> >> cs.PreCompile()
> >> cs.SetMessageCallback(mess)
> >> cs.Compile("test.csd")
> >>
> >> etc
> >>
> >> Victor
> >>
> >>
> >> On 9 Dec 2009, at 18:50, Victor Lazzarini wrote:
> >>
> >>> Can you show this problem, it might have a
> simple
> >> solution? A code fragment would do.
> >>>
> >>> Victor
> >>> On 9 Dec 2009, at 18:26, mark jamerson wrote:
> >>>
> >>>>
> >>>> I've been messing with python and csound
> again,
> >> and have run into a little snag/bug/error.
> I
> >> discovered that csound.setPythonMessageCallback()
> is causing
> >> my script to crash. I have tried this is
> several
> >> scripts, including Mike Goggins' tutorial
> examples. If
> >> I comment that line out, the scripts work just
> fine. I
> >> am using python 2.5, and csound 5.11. Has
> anyone else
> >> experienced this?
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> Send bugs reports to this list.
> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk
> >> with body "unsubscribe csound"
> >>>
> >>>
> >>>
> >>> Send bugs reports to this list.
> >>> To unsubscribe, send email sympa@lists.bath.ac.uk
> >> with body "unsubscribe csound"
> >>
> >>
> >>
> >> Send bugs reports to this list.
> >> To unsubscribe, send email sympa@lists.bath.ac.uk
> >> with body "unsubscribe csound"
> >>
> >
> >
> >
> >
> >
> > Send bugs reports to this list.
> > To unsubscribe, send email sympa@lists.bath.ac.uk
> with body
> > "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk
> with body "unsubscribe csound"
>





Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound"= 



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-12-09 22:50
Frommark jamerson
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: setPythonMessageCallback() error
  That's probably a good point.  I'm in the process of reinstalling both Csound 5.11, and Python 2.6, so I will see what happens after all of that is finished.  



--- On Wed, 12/9/09, ilterzouomo  wrote:

> From: ilterzouomo 
> Subject: [Csnd] Re: Re: Re: Re: Re: Re: setPythonMessageCallback() error
> To: csound@lists.bath.ac.uk
> Date: Wednesday, December 9, 2009, 3:13 PM
> Hi Mr. Mark,
> it would not be that csound 5.11 is usimg python 2.6 ?
> 
> But i don't know if this means somethings for Your problem
> ...
> 
> ciao,
> fran.
> ----- Original Message ----- 
> From: "mark jamerson" 
> To: 
> Sent: Wednesday, December 09, 2009 8:51 PM
> Subject: [Csnd] Re: Re: Re: Re: Re:
> setPythonMessageCallback() error
> 
> 
> 
>   Thanks. I will try your method, otherwise, it will
> just be a minor 
> annoyance.
> 
> --- On Wed, 12/9/09, Victor Lazzarini 
> wrote:
> 
> > From: Victor Lazzarini 
> > Subject: [Csnd] Re: Re: Re: Re:
> setPythonMessageCallback() error
> > To: csound@lists.bath.ac.uk
> > Date: Wednesday, December 9, 2009, 1:39 PM
> > I guess if you need to redirect the
> > messages, use setMessageCallback()
> > instead, as in my example. If not, no need to bother
> with
> > it.
> >
> > Victor
> > On 9 Dec 2009, at 19:32, mark jamerson wrote:
> >
> > >
> > >
> > > If I use the following simple script, the script
> > crashes, but if I
> > > simply comment out the
> > csound.setPythonMessageCallback(), it runs,
> > > and a csd is printed in the IDLE Gui, and the
> > temp.orc/.sco files
> > > are created.
> > >
> > >
> > >
> > > import csnd
> > >
> > > csound = csnd.CppSound()
> > > csound.setPythonMessageCallback()
> > > csound.load('tutorial2.csd')
> > > csound.setCommand('csound -RWfo tutorial.py.wav
> > temp.orc temp.sco')
> > >
> > > print csound.getCSD()
> > >
> > > csound.exportForPerformance()
> > > csound.perform()
> > >
> > >
> > >
> > >
> > >
> > > --- On Wed, 12/9/09, Victor Lazzarini 
> >
> > > wrote:
> > >
> > >> From: Victor Lazzarini 
> > >> Subject: [Csnd] Re: Re:
> setPythonMessageCallback()
> > error
> > >> To: csound@lists.bath.ac.uk
> > >> Date: Wednesday, December 9, 2009, 1:02 PM
> > >> By the way instead of using
> > >> csound.setPythonMessageCallback() you can
> use
> > >> csound.setMessageCallback() as in:
> > >>
> > >>
> > >> def mess(string):
> > >> print "csound
> > messages: %s" + string
> > >>
> > >> cs = csnd.Csound()
> > >> cs.PreCompile()
> > >> cs.SetMessageCallback(mess)
> > >> cs.Compile("test.csd")
> > >>
> > >> etc
> > >>
> > >> Victor
> > >>
> > >>
> > >> On 9 Dec 2009, at 18:50, Victor Lazzarini
> wrote:
> > >>
> > >>> Can you show this problem, it might have
> a
> > simple
> > >> solution? A code fragment would do.
> > >>>
> > >>> Victor
> > >>> On 9 Dec 2009, at 18:26, mark jamerson
> wrote:
> > >>>
> > >>>>
> > >>>> I've been messing with python and
> csound
> > again,
> > >> and have run into a little snag/bug/error.
> > I
> > >> discovered that
> csound.setPythonMessageCallback()
> > is causing
> > >> my script to crash. I have tried this is
> > several
> > >> scripts, including Mike Goggins' tutorial
> > examples. If
> > >> I comment that line out, the scripts work
> just
> > fine. I
> > >> am using python 2.5, and csound 5.11. Has
> > anyone else
> > >> experienced this?
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>> Send bugs reports to this list.
> > >>>> To unsubscribe, send email sympa@lists.bath.ac.uk
> > >> with body "unsubscribe csound"
> > >>>
> > >>>
> > >>>
> > >>> Send bugs reports to this list.
> > >>> To unsubscribe, send email sympa@lists.bath.ac.uk
> > >> with body "unsubscribe csound"
> > >>
> > >>
> > >>
> > >> Send bugs reports to this list.
> > >> To unsubscribe, send email sympa@lists.bath.ac.uk
> > >> with body "unsubscribe csound"
> > >>
> > >
> > >
> > >
> > >
> > >
> > > Send bugs reports to this list.
> > > To unsubscribe, send email sympa@lists.bath.ac.uk
> > with body
> > > "unsubscribe csound"
> >
> >
> >
> > Send bugs reports to this list.
> > To unsubscribe, send email sympa@lists.bath.ac.uk
> > with body "unsubscribe csound"
> >
> 
> 
> 
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk
> with body "unsubscribe 
> csound"= 
> 
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk
> with body "unsubscribe csound"
> 





Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"