Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / Getting rid of the "File was read in 7 seconds" message?
  RSS 2.0 ATOM  

Getting rid of the "File was read in 7 seconds" message?
Rate this thread
 
33721
 
Permlink of this thread   Subscribe to this thread
avatar
  • Ben VZ
  • Posted: 27 August 2009 11:41 AM
  • Total Posts: 7
  • Joined: 27 August 2009 06:34 PM

Hello,

I have a python script that runs from the command line.  It opens a maya scene, gets some data, and then exits.  It returns information that it has gleaned from the scene to the standard out.

Unfortunately, Maya insists on bragging about how fast it was able to open the scene.  It always prints out “File read in 7 seconds” or some such as it opens the file to be processed.  This text pollutes the output of my script. 

Frankly, I don’t care to know how fast Maya opened the scene (and, in fact, will never ever see this line as the script runs autonomously).  I just want to parse the data (and only the data) my script is actively returning.  Is it possible to get Maya to quietly (humbly?) open the scene?

Thanks,

b



Replies: 0
avatar
  • THNKR
  • Posted: 27 August 2009 03:00 PM

scriptEditorInfo -si 1;

suppresses info messages, which include one you want to get rid of.



Replies: 2
/img/forum/dark/default_avatar.png

Thank you SO much!

Author: Ben VZ

Replied: 01 September 2009 10:46 AM  
/img/forum/dark/default_avatar.png

incidentally, for any other new python users out there…

the actual code you run is this:

import maya.cmds as mc

blah
blah
blah

mc.scriptEditorInfo(si=1)

Thanks again mduvekot!

Author: Ben VZ

Replied: 01 September 2009 10:51 AM  




   
  Settings Choose Theme color: