MAYA_CMD_FILE_OUTPUT This variable enables the cmdFileOutput command during startup so the content in the script editor automatically outputs to a designated file.
If no file name is specified, then errors are sent to the standard error output, for example the Terminal window. This feature is useful for tracking down error messages when Maya crashes upon startup. On Fri, Feb 19, 2010 at 10:02 AM, Paul Molodowitch <[email protected]>wrote: > Well, if you're in windows, then I don't think you can print out to > the shell (instead, I believe it goes to a separate 'output' window, > which will also disappear when maya crashes). If you're in another os, > you can print to sys.__stdout__, like so: > > print >> sys.__stdout__, 'foo' > > ... which should go to the shell. > > Otherwise, I suggest you checkout the logging module, which is a very > handy logging system. For your purposes, you'll want to set up a > FileHandler, and attach your logger to that. > > - Paul > > On Fri, Feb 19, 2010 at 9:54 AM, Brandon Harris <[email protected]> > wrote: > > I'm currently having issues with a command insta crashing maya and > > leaving no trace of what exactly happened to cause the crash. Is there > > a way of outputting print statements to the shell that maya is running > > in? Or a way of saving out a more elaborate error log? > > > > -- > > http://groups.google.com/group/python_inside_maya > > -- > http://groups.google.com/group/python_inside_maya > -- http://groups.google.com/group/python_inside_maya
