Thank you Fredrik. I'll take a look at the example. One caveat is that my external py script imports alembic / py alembic which prohibits it from being imported in maya 2014. However it looks like we have the option of moving onto 2015 which seems to be happy with those modules.
Either way your examples will assist my understanding so thanks again!! Gerard. On 05/05/2014, at 3:51 PM, Fredrik Averpil <[email protected]> wrote: > Hi Gerard, > > Here's an example how you can catch (or list the output) from python's > subprocess: http://fredrik.averpil.com/post/63722065215 > > To source the script and run it within Maya, first do: > > import sys > sys.path.append('c:/where/your/script/is/at') > import yourScriptName > > > And optionally/preferably execute a function inside the module, so it doesn't > get run just because you have sourced it (above): > > yourScriptName.functionName() > > > Check out python's "optparse" for a clean way of dealing with arguments. But > that's not really applicable when you execute the script within Maya. If > executed like described above, you can just supply arguments to the function: > > yourScriptName.functionName('hello', 5, 'blue') > > > > // Fredrik > > > > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWPYGBwQMYZ5Ro8gPvrssMKVFshN6mqmbWsu-bDwnRu3%2Bw%40mail.gmail.com. > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/576A7601-D996-4AF2-B105-D990F1422E64%40gmail.com. For more options, visit https://groups.google.com/d/optout.
