Take a look at sys.executable
Returns the path to the python executable.

On mac I get this from mayapy:
'/Applications/Autodesk/maya2015/Maya.app/Contents/bin/../Frameworks/Python.framework/Versions/Current/Resources/Python.app/Contents/MacOS/Python’

compared to running straight python:
'/usr/local/opt/python/bin/python2.7'


import sys
print sys.executable



--

[cid:DC66229E-FA34-4CA4-86D9-78852EBD5D4A]<htt://moonbotstudios.com>

<htt://moonbotstudios.com>

Brennan Chapman
Lead Pipeline Developer
T: (318) 213-0770



<htt://moonbotstudios.com>

<htt://moonbotstudios.com>

On Jun 1, 2015, at 11:33 AM, Todd Widup 
<[email protected]<mailto:[email protected]>> wrote:

is there a way to find out what program called the python script that is 
running?

IE, if its running in Maya, Soft, Houdini, idle, or something else even.

thanks
-todd

--
Todd Widup
Creature TD / Technical Artist
[email protected]<mailto:[email protected]>
[email protected]<mailto:[email protected]>
www.toddwidup.com<http://www.toddwidup.com/>

--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CABBPk361T%2BE%2BMyP4VGnz-Xv%2B3b_ONDpCTJSmw7TDJ%3D5FwEuS8g%40mail.gmail.com<https://groups.google.com/d/msgid/python_inside_maya/CABBPk361T%2BE%2BMyP4VGnz-Xv%2B3b_ONDpCTJSmw7TDJ%3D5FwEuS8g%40mail.gmail.com?utm_medium=email&utm_source=footer>.
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/98B190CB-167E-4EE2-AD78-AF352485A815%40moonbotstudios.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to