run maya from python shell

Viewed 4647

So I have hundreds of maya files that have to be run with one script. So I was thinking why do I even have to bother opening maya, I should be able to do it from python shell (not the python shell in maya, python shell in windows)

So the idea is:

fileList = ["....my huge list of files...."]
for f in fileList:
    openMaya
    runMyAwesomeScript

I found this:

C:\Program Files\Autodesk\Maya201x\bin\mayapy.exe
maya.standalone.initialize()

And it looks like it loads sth, because I can see my scripts loading from custom paths. However it does not make the maya.exe run.

Any help is welcome since I never did this kind of maya python external things.

P.S. Using maya 2015 and python 2.7.3

1 Answers
Related