import maya.cmds as cmds

v = cmds.about(version=True)

print v


please check the about command help from maya you can get a lot of data
from the help

On Fri, Dec 9, 2011 at 2:54 PM, Kurian O.S <[email protected]> wrote:

> cmds.about(version=true)
>
> On Friday, December 9, 2011, Panupat Chongstitwattana <[email protected]>
> wrote:
> > Thanks!
> >
> > I also found sys.argv[0] which contains the path to maya.exe. It
> > depends on where you install your Maya, but the default location will
> > have 2011, 2012 in the string we can check also.
> >
> >
> >
> > On Fri, Dec 9, 2011 at 3:35 PM, 张宇 <[email protected]> wrote:
> >> from pymel import versions
> >>
> >> versions.current()
> >>
> >>
> >> 2011/12/9 Panupat Chongstitwattana <[email protected]>
> >>>
> >>> This one seems to give me a pop up window. Is there a to get the
> >>> version into a string without the pop up?
> >>>
> >>>
> >>>
> >>> On Fri, Dec 9, 2011 at 2:56 PM, Kurian O.S <[email protected]> wrote:
> >>> > cmds.about() ?
> >>> >
> >>> >
> >>> > On Friday, December 9, 2011, Panupat Chongstitwattana
> >>> > <[email protected]>
> >>> > wrote:
> >>> >> Is there a Python command I can use to get the version of Maya it's
> >>> >> running in? 2010, 2011, 2012 etc.
> >>> >>
> >>> >> --
> >>> >> view archives: http://groups.google.com/group/python_inside_maya
> >>> >> change your subscription settings:
> >>> >> http://groups.google.com/group/python_inside_maya/subscribe
> >>> >>
> >>> >
> >>> > --
> >>> > --:: Kurian ::--
> >>> >
> >>> > --
> >>> > view archives: http://groups.google.com/group/python_inside_maya
> >>> > change your subscription settings:
> >>> > http://groups.google.com/group/python_inside_maya/subscribe
> >>>
> >>> --
> >>> view archives: http://groups.google.com/group/python_inside_maya
> >>> change your subscription settings:
> >>> http://groups.google.com/group/python_inside_maya/subscribe
> >>
> >>
> >>
> >>
> >> --
> >> http://thatboy.me
> >>
> >>
> >> --
> >> view archives: http://groups.google.com/group/python_inside_maya
> >> change your subscription settings:
> >> http://groups.google.com/group/python_inside_maya/subscribe
> >
> > --
> > view archives: http://groups.google.com/group/python_inside_maya
> > change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
> >
>
> --
> --:: Kurian ::--
>
>


-- 
--:: Kurian ::--

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to