On 11.01.07, andrea valle wrote:
> Hi to all,
>
> I was trying to call python with a .py file containing pyx code from
> inside SuperCollider language. It happens that the stdout from
> SuperCollider works. I'm able to execute python code generating txt
> files, just like I was using the shell. But there's a problem with PyX
> code when I use .writePDFfile. While writing the pdf the process
> evidently raise some errors.
> In fact it does not return 0, but 256 (?). The resulting pdf is zero
> kb.
> And a temporary .tex file rest in the SuperCollider folder which is not
> the place I chose to generate the pdf (while the pdf is in its right
> place as defined by me in the path). I guess that the temporary .tex
> should be in the same folder of the (definitive) pdf, shouldn't it?
At the moment, TeX is called in the directory from where python is
called. This is to make inclusion of self-provided input files more
intuitive -- TeX behaves then as expected by the user. The resulting
dvi file is then used to construct an EPS, PDF or PS.
Because the dvi file is completely analyzed, the location of the
outcome has nothing to do with the location where TeX is run.
This does not yet explain why the resulting PDF is empty. Does it work
with EPS?
Can you try to reduce the behaviour with the example file "hello.py"
or something similar and increase the errordebug of TeX etc...?
Michael.
> Input
> - unixCmd("python /Users/apple/Desktop/testPyX.py"); (this is
> SuperCollider)
>
> /Users/apple/Desktop/testPyX.py: contains this line -->
> g.writePDFfile("/Users/apple/Desktop/testPyX.pdf")
> (the file behave as expected if executed directly from terminal)
>
> Ouput:
> - returns from terminal inside SC: 256
> - /Users/apple/Desktop/testPyX.pdf: exists but is 0 kbyte
> - tmp8W3ZN1.tex: is in the SuperCollider folder under Applications
> (containg a nice advise: %relax...)
Michael.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user