Csound Csound-dev Csound-tekno Search About

[Csnd] python problem

Date2014-02-25 19:05
Fromorebronerd
Subject[Csnd] python problem
Sorry, one more of the Python problem posts. I have read very many of the
older ones, but haven´t found a solution, so therefore I post another one. 

I have Csound 6.02, CsoundQt 0.8.2 installed on a Windows 7 64-bit machine.
Works fine. I have installed the python extensions.
I have installed python 2.7.6 32. I can start python ok from the terminal in
Windows. 
No errror messages when I start CsoundQt.
In CsoundQT I have tried the examples from the Floss manual, for example:



instr 1 
endin


from sys import argv
print "File to read = '%s'" % argv[0]
print "File to write = '%s'" % argv[1]



I get the following output:

STARTING FILE
Creating orchestra
Creating score
Creating C:\Users\martin\AppData\Local\Temp\cs7.ext (74BF2980)
External generation failed
Reading CSD failed ... stopping

When I run the same in the CsoundQT terminal I get an error message saying
that python isn´t a recognised program. 
I have tried to write down the full path in the enviroment settings, tried
both the old and new parser, but no luck. CsoundQt doesn´t seem to find
Python although Windows does. 
Any ideas? I would very much like to try pyscore, so I hope you have a
solution. :-)




--
View this message in context: http://csound.1045644.n5.nabble.com/python-problem-tp5732808.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2014-02-25 19:45
FromAndres Cabrera
SubjectRe: [Csnd] python problem
Maybe there are no args passed to python? What if you just do:
<CsScore bin="python">
print "hello world"
</CsScore>


On Tue, Feb 25, 2014 at 11:05 AM, orebronerd <martino.flodino@gmail.com> wrote:
Sorry, one more of the Python problem posts. I have read very many of the
older ones, but haven´t found a solution, so therefore I post another one.

I have Csound 6.02, CsoundQt 0.8.2 installed on a Windows 7 64-bit machine.
Works fine. I have installed the python extensions.
I have installed python 2.7.6 32. I can start python ok from the terminal in
Windows.
No errror messages when I start CsoundQt.
In CsoundQT I have tried the examples from the Floss manual, for example:

<CsoundSynthesizer>
<CsInstruments>
instr 1
endin
</CsInstruments>
<CsScore bin="python">
from sys import argv
print "File to read = '%s'" % argv[0]
print "File to write = '%s'" % argv[1]
</CsScore>
</CsoundSynthesizer>

I get the following output:

STARTING FILE
Creating orchestra
Creating score
Creating C:\Users\martin\AppData\Local\Temp\cs7.ext (74BF2980)
External generation failed
Reading CSD failed ... stopping

When I run the same in the CsoundQT terminal I get an error message saying
that python isn´t a recognised program.
I have tried to write down the full path in the enviroment settings, tried
both the old and new parser, but no luck. CsoundQt doesn´t seem to find
Python although Windows does.
Any ideas? I would very much like to try pyscore, so I hope you have a
solution. :-)




--
View this message in context: http://csound.1045644.n5.nabble.com/python-problem-tp5732808.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2014-02-26 20:48
Fromorebronerd
Subject[Csnd] Re: python problem
If I try your suggestion I get
"Creating orchestra
Creating score
Creating C:\Users\martin\AppData\Local\Temp\cs3.ext (761C2980)
Reading CSD failed ... stopping"
if I use "run".

I get 
"Creating orchestra
Creating score
Creating C:\Users\martin\AppData\Local\Temp\cs3.ext (761C2980)
hello world
Reading CSD failed ... stopping"
if I use  "run in terminal". 
So I seem to get some kind of response if I use run in terminal. 

A related question:
I have downloaded the pythonScore files via the "Amen break" tutorial.
I am not shure where I shall put the files, and do I need to add something
in the "path" enviroment?
I added the python path and python script to be shure. 
I have tried the examples in the amen break tutorial, and get a error
message on the first one with pythonScore, "amen_upgrade".
I get an error in the terminal stating "Importerror, no module named
csd.pysco"
Any ideas?

I will try some more tomorrow. Now it´s time for bed in Sweden.



--
View this message in context: http://csound.1045644.n5.nabble.com/python-problem-tp5732808p5732834.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2014-02-27 20:28
FromAndres Cabrera
SubjectRe: [Csnd] Re: python problem
Hi,

I forgot that you actually need to write a file from python that csound can find:

https://gist.github.com/jacobjoaquin/2403507

Cheers,
Andrés


On Wed, Feb 26, 2014 at 12:48 PM, orebronerd <martino.flodino@gmail.com> wrote:
If I try your suggestion I get
"Creating orchestra
Creating score
Creating C:\Users\martin\AppData\Local\Temp\cs3.ext (761C2980)
Reading CSD failed ... stopping"
if I use "run".

I get
"Creating orchestra
Creating score
Creating C:\Users\martin\AppData\Local\Temp\cs3.ext (761C2980)
hello world
Reading CSD failed ... stopping"
if I use  "run in terminal".
So I seem to get some kind of response if I use run in terminal.

A related question:
I have downloaded the pythonScore files via the "Amen break" tutorial.
I am not shure where I shall put the files, and do I need to add something
in the "path" enviroment?
I added the python path and python script to be shure.
I have tried the examples in the amen break tutorial, and get a error
message on the first one with pythonScore, "amen_upgrade".
I get an error in the terminal stating "Importerror, no module named
csd.pysco"
Any ideas?

I will try some more tomorrow. Now it´s time for bed in Sweden.



--
View this message in context: http://csound.1045644.n5.nabble.com/python-problem-tp5732808p5732834.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2014-02-28 20:43
Fromorebronerd
Subject[Csnd] Re: python problem
If I just use the "hello world2 statement, it seems to work in the terminal,
so somehow python seems to be working. 
My aim in this is to use pysco, so I tried it on my mac with a simple
script:


score('''
i 1 0 1
i 1 2 1

''')

 
And it works fine on my mac. I can also use the cue command on my mac.  On
my Windows 7 machine I get the error message: "pysco.py no such file or
directory." I have tried to put the pysco.py file in the python lib
directory, and in the base directory for python, but no sucess. I have added
the "lib" folder path in enviroment variables, but no sucess. Python doesn´t
seem to find the file. Any suggestions?



--
View this message in context: http://csound.1045644.n5.nabble.com/python-problem-tp5732808p5732880.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2014-03-04 21:49
FromAndres Cabrera
SubjectRe: [Csnd] Re: python problem
What happens if you use full paths?

Cheers,
Andrés


On Fri, Feb 28, 2014 at 12:43 PM, orebronerd <martino.flodino@gmail.com> wrote:
If I just use the "hello world2 statement, it seems to work in the terminal,
so somehow python seems to be working.
My aim in this is to use pysco, so I tried it on my mac with a simple
script:
<CsScore bin="python pysco.py">

score('''
i 1 0 1
i 1 2 1

''')

</CsScore>
And it works fine on my mac. I can also use the cue command on my mac.  On
my Windows 7 machine I get the error message: "pysco.py no such file or
directory." I have tried to put the pysco.py file in the python lib
directory, and in the base directory for python, but no sucess. I have added
the "lib" folder path in enviroment variables, but no sucess. Python doesn´t
seem to find the file. Any suggestions?



--
View this message in context: http://csound.1045644.n5.nabble.com/python-problem-tp5732808p5732880.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"