I know I replied to your previous question along these lines, but I don't think I mentioned that the syntax I tested *does* actually work when placed in-line with the body of the Nuke script:
python -exec {import sys; nuke.tprint(sys.path)} However, Frank also mentioned that you would be better off using callbacks, which I still agree with. If you do what you're trying to do, it means you will have to manually append these Python calls to every script you want to render, which leaves you open to consistency problems. Why not just write your render script as an executable Python script that accepts a script path to render, and then opens it and calls your render function? -Nathan On Oct 22, 2012, at 1:58 AM, "Groh, Lars" <lars.g...@eder.de> wrote: > Hey Everyone, > > I am trying to call a python script on startup of nuke. > So I placed these lines at the end of the respective .nk-file: > > TCL-Code: > ---- > python ("import runRender") > python ("runRender.runRender()") > python ("nuke.scriptClose()") > ----- > > where runRender.py is python file that resides in the Pythonpath of nuke... > I tested these lines directly in the script editor (only using the python > comands of course) and everything worked fine. > It did even work like this before...but not anymore...as I dont get any error > messages, I dont know whats wrong. > > Instead I tried to call the python file by using the TCL-exec comand like > this: > > exec //server/myNukeScripts/runRender.py > > Here I get an error message saying that the file cant be found..but it exists > and the path is correct. > > Any ideas? > > Regards, > > CGI Pipeline TD > ………………………………………….. > Tel.: +49 (0) 7158 5011-71 > E-Mail: lars.g...@eder.de > ………………………………………….. > > ederstuttgart > > eder GmbH > Liebigstrasse 22 > 73760 Ostfildern (Scharnhausen) > Germany > > www.eder.de > > Geschäftsführer: Andreas Eder, Michael Eder, Robert Laub > Sitz und Handelsregistereintrag: Stuttgart HRB 210788 > > _______________________________________________ > Nuke-python mailing list > Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python