hadnt tried it yet.  been working on another area of this project.  once I
drop this update to them, ill add some stuff to use __file__ in and see if
that works correctly or not.

hmmm, if I did this

in module Path

fil=__file__

then in module Bob

import Path as pth

test=pth.fil





if I path was a py and Bob was a PYC..you think it would compile like I
expect?

On Sun, May 28, 2017 at 3:27 PM, Justin Israel <[email protected]>
wrote:

>
>
> On Mon, May 29, 2017, 10:22 AM Todd Widup <[email protected]> wrote:
>
>> justin's correct
>>
>
> Did that suggestion to use the globals end up working?
>
>
>> On Sun, May 28, 2017 at 5:13 AM, Justin Israel <[email protected]>
>> wrote:
>>
>>>
>>>
>>> On Sun, May 28, 2017, 8:18 PM Marcus Ottosson <[email protected]>
>>> wrote:
>>>
>>>> How about this?
>>>>
>>>> def getExecutingfile():
>>>>   return __file__
>>>>
>>>> ​
>>>> ​
>>>>
>>>
>>> That just returns the file of the current module. The original code
>>> wants to inspect the calling frame which could be in another module.
>>>
>>> If this utility module is used in some other tool it might look like:
>>>
>>> import foo.utils
>>> print foo.utils.getExecutingFile()
>>> # myModule.py
>>>
>>> --
>>>> 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/CAFRtmOAtghUXNDCX3Ww7uypxMDiYC
>>>> _cTi2L-mcZjR7k247vPbg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAtghUXNDCX3Ww7uypxMDiYC_cTi2L-mcZjR7k247vPbg%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/CAPGFgA0A07nAE3CLKWUi4%
>>> 3DiXSDtJatEe9Bo3wPXNjEkyE0dp%2Bg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0A07nAE3CLKWUi4%3DiXSDtJatEe9Bo3wPXNjEkyE0dp%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> Todd Widup
>> Creature TD / Technical Artist
>> [email protected]
>>
>> --
>> 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/CABBPk363H_y4AoUCj1ctv-RPQaNcCo0pocik6bN1Tj0%
>> 3DK9g7Bg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/python_inside_maya/CABBPk363H_y4AoUCj1ctv-RPQaNcCo0pocik6bN1Tj0%3DK9g7Bg%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/CAPGFgA1ESdNzO%2BnAzu%2BX_
> 6zK1zK9afesPUdwoWK7EnuYLJ24aw%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1ESdNzO%2BnAzu%2BX_6zK1zK9afesPUdwoWK7EnuYLJ24aw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Todd Widup
Creature TD / Technical Artist
[email protected]

-- 
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/CABBPk35nZMmkH2Q8RCGLEywb7h1C%2BLbvhGWbvhcjZchj496z8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to