On Fri, May 24, 2019 at 10:26 AM tomas mikulak <mikulakto...@gmail.com> wrote:
> > Hi everyone, > could somebody help me with running script with argument(path) to save new > file maya standalone will create and save it to given location and all that > from maya. > I wrote simple python script that takes path argument and when I do it > manually openning cmd and typing mayapy path\\script.py -p “c:\\” > it works and creates simple scene with sphere named test on c drive > but I can’t figure it out how to run it from maya. > this is just concept what I need standalone to do. > Are you saying that you are seeing failures when you run it from Maya? Or that you don't know how to execute it from Maya? If its a matter of how to even run the script, you would go about that using the 'subprocess' module: import subprocess exitcode = subprocess.call(["mayapy", "/path/to/script.py", "-p", "c:\\"]) See: https://docs.python.org/2/library/subprocess.html -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to python_inside_maya+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAEUzAD282xN-WZq2nGN%2BUn9fZGyd6ZGNNJ%3DBNdwJEjcWz34C_A%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAEUzAD282xN-WZq2nGN%2BUn9fZGyd6ZGNNJ%3DBNdwJEjcWz34C_A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3vzvk_f5090kycrbzTqf8XD%2BiYnEgo%2BrZ%2BO_1k_2LZtQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.