Csound Csound-dev Csound-tekno Search About

Re: Python and CsoundVST: No module named csnd

Date2005-11-06 21:02
From"Michael Gogins"
SubjectRe: Python and CsoundVST: No module named csnd
Thanks for the information, I will fix up the install target.

----- Original Message ----- 
From: "Sebastian Gutsfeld" 
To: 
Sent: Sunday, November 06, 2005 3:55 PM
Subject: Re: [Csnd] Python and CsoundVST: No module named csnd


> Michael Gogins  writes:
>
>> Try using the "csnd" Python extension module, which should replace the
>> CsoundVST module.
>>
>> Because not everyone was building CsoundVST, many builds of Csound
>> lacked scripting facilities. Therefore, I have factored the Python
>> interface to Csound out of CsoundVST and moved into "csnd" in the
>> interfaces directory. There are also Lua, Java, and CLisp interfaces.
>>
>> You may find it easier to do a fresh CVS checkout to get this to build
>> properly.
>
> Ok. I did a CVS checkout and build csound again. To get it compiling I
> applied the following change to SConstruct:
>
> --- projects/csound5/SConstruct 2005-11-06 11:26:53.000000000 +0100
> +++ tmp/src/csound5_2005-11-06/SConstruct       2005-11-06 
> 20:37:03.000000000 +0100
> @@ -1210,7 +1210,7 @@
>         for source in stkSources_:
>                 stkSources.append(source.replace('\\', '/'))
>         for removeMe in removeSources:
> -            stkSources.remove(removeMe)
> +            if removeMe in stkSources: stkSources.remove(removeMe)
>         stk = stkEnvironment.SharedLibrary('stk', stkSources)
>         Depends(stk, csoundLibrary)
>         pluginLibraries.append(stk)
>
> After "scons install" I had to create the symbolic link
> /usr/local/lib/lib_csnd.so to /usr/local/lib/_csnd.so.
>
> It took some time to realize that "scons install" doesn't install the
> python interface automatically and to find csnd.py. But now everything
> works as it should.
>
> Thanks,
>   Sebastian
>
>
>
>>
>> Hope this helps,
>> Mike
>>
>> -----Original Message-----
>> From: Sebastian Gutsfeld 
>> Sent: Nov 6, 2005 11:49 AM
>> To: csound@lists.bath.ac.uk
>> Subject: [Csnd] Python and CsoundVST: No module named csnd
>>
>> Hi *,
>>
>> I compiled csound5 from CVS (2005-11-02) and get the following error
>> message when importing CsoundVST in my python code:
>>
>> ,----
>> | File "/usr/local/lib/CsoundVST.py", line 4241, in ?
>> |     import csnd
>> | ImportError: No module named csnd
>> `----
>>
>> After renaming the two occurences of "csnd" to "_csnd" at the end of
>> CsoundVST.py (I thought I could import /usr/local/lib/_csnd.so) I get
>>
>> ,----
>> | File "/usr/local/lib/CsoundVST.py", line 4242, in ?
>> |     sys.modules["__main__"].csound = _csnd.CppSound()
>> | AttributeError: 'module' object has no attribute 'CppSound'
>> `----
>>
>> Any idea how to fix this and use the CsoundVST python module?
>>
>> regards,
>>    Sebastian
>> -- 
>> Send bugs reports to this list.
>> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
> -- 
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
>