Help Me! A Problem

how can I use just like whatIs command in python,I just want to use it to know the other .py file`s location,thanks!!!

Print the function without parentheses, thet will give you the module it is pasrt of and teht you will find on your disk. You can also send the command something that crashes it that will give you stack trace (to this end you can inject a strack trace on all lines)

Anyway pytyhon dont exactly work like mel, So it doesnt really know what file it is executing form as the runtime environment caoul have changed vastly after the fact that the code was askied form file.

Are you talking about modules in python ..

then maybe

CODE
import os
print os.__file__

And next thing i know its such a dirt idea anyway just a try

CODE
import maya.mel as mel
def newWhatIs(commandP):
    sendBack=mel.eval("whatIs \""+commandP+"\"")
    return(sendBack)
getTypeH=newWhatIs("animView")
print getTypeH

I wanted to add that you can use the vars command to investigate what objects and files you have been loading up:

so suppose you have:

CODE
import maya.precomp

and you want to know what mayaPrecomp is?

then do:

CODE
print vars(maya)["precomp"]

will result in maya sumarizing wher its atken form However please not somebody might hav injected code past you.

I wanted to add that you can use the vars command to investigate what objects and files you have been loading up:

so suppose you have:

CODE
import maya.precomp

and you want to know what mayaPrecomp is?

then do:

CODE
print vars(maya)["precomp"]

will result in maya sumarizing wher its atken form However please not somebody might hav injected code past you.

Theres aslternate tool in module sys called modules wich can investigate even unloaded bits and pieces, this probably reflect best how mayas whatIs does but for python modules, it of course doesnt do anything for functions:

CODE
import sys
sys.modules["maya.precomp"]