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. For more options, visit https://groups.google.com/d/optout.
