This might work:
import maya.cmds as mc

mc.quit(force=True)



Flagsabort<file:///C:/program%20files/autodesk/maya2008/docs/Maya2008/en_US/CommandsPython/quit.html#flagabort>
, 
exitCode<file:///C:/program%20files/autodesk/maya2008/docs/Maya2008/en_US/CommandsPython/quit.html#flagexitCode>
, 
force<file:///C:/program%20files/autodesk/maya2008/docs/Maya2008/en_US/CommandsPython/quit.html#flagforce>Long
name (short name)*argument types*Properties*force*(*f*)*boolean*[image:
create]If specified, this flag will force a quit without saving or prompting
for saving changes. Use at your own risk.*exitCode*(*ec*)*uint*[image:
create]Specifies the exit code to be returned once the application exits.
The default exit code is 0.*abort*(*a*)*boolean*[image: create]Will quit
without saving like -force, but will also prevent preferences/hotkeys/colors
from being saved. Use at your own risk.
On Sat, Mar 14, 2009 at 9:37 AM, aku.mar.zen <[email protected]> wrote:

>
> bad... thts my first step in maya python... and its slipping. hmmm...
> anyway.. thx Ian.
>
> -kumar
>
> On Mar 13, 10:17 pm, Ian Jones <[email protected]> wrote:
> > I asked a similar question on the autodesk subscription forums a while
> ago.
> >
> > There response follows:
> >
> > "Hi Ian,
> >
> > From mayapy if you run help(‘maya.standalone’) you’ll see that it has
> > only one function initialize(), so to restart Maya you need to exit
> > the parent python process.
> >
> > I have opened a Service Request # 1-4914842102 on your behalf and I’m
> > going to log a SUG on it.
> >
> > Regards,
> > Avto"
> >
> > So you essentially can't.
> >
> > However I was able to work around the issue by using the
> > multiprocessing (http://docs.python.org/library/multiprocessing.html
> > py2.6) and pyprocessing (2.4/2.5) packages.
> > This way I ran maya in another process and was able to capture the
> > results. Not quite the same but I've been able to get it to work for
> > me.
> >
> > Ian
> >
> > On Thu, Mar 12, 2009 at 9:56 AM, [email protected]
> >
> > <[email protected]> wrote:
> >
> > > In python idle I hav initalized maya with standalone module.
> > > After workin on it.. i would like to terminate the initialized maya
> > > modules ...
> > > how do i destroy initialized maya, even if i del the
> > > maya.standalone.... my pythonw... is running with huge memory
> > > consumption. how to kill/destroy/del the maya standalone.
> > > Its troughing memory exceptioin each time i close my python idle.
> >
> >  ask
> >
>


-- 


- Ofer
www.mrbroken.com

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to