so...do PYC files store info like that? I always thought it was strictly a compiled version of the py file, with nothing elseanyways, my friend that was running it, kept getting some errors about a path not existing...strange thing was, it was showing the path where I have the tools on my local machine, not where he has them.so I have a few tools I gave over to a friend..gave them the PYC files.part of what one of the tools does is get the directory path it was executed from to pass along.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk36XUNP2PqWnGaq5wgRdrQH%3DgmYf_v%2BmLQi171VbFS5-GA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
On Sat, May 27, 2017, 3:12 PM Todd Widup <todd....@gmail.com> wrote:so...do PYC files store info like that? I always thought it was strictly a compiled version of the py file, with nothing elseanyways, my friend that was running it, kept getting some errors about a path not existing...strange thing was, it was showing the path where I have the tools on my local machine, not where he has them.so I have a few tools I gave over to a friend..gave them the PYC files.part of what one of the tools does is get the directory path it was executed from to pass along.Do you have an example of what kind of code was returning a cached result from when the pyc was generated?
--
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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk36XUNP2PqWnGaq5wgRdrQH%3DgmYf_v%2BmLQi171VbFS5-GA%40mail.gmail.com.
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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1NzFWJ5o1%3DAFqK1mc%2Bsf%3DETiw8-s_zt3pZt2rWbJKR2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
def getExecutingfile():thats the code I am running in a util.py file that is called by core.py in core.py is where it seems to get hard coded to the path I have things sourced from
exFile=namedtuple("filePath","path, file")
path=None
name=None
frame=sys._getframe(1)
fil=frame.f_code.co_filename
path,name=os.path.split(fil)
return exFile(path,name)
On Fri, May 26, 2017 at 10:02 PM, Justin Israel <justin...@gmail.com> wrote:
On Sat, May 27, 2017, 3:12 PM Todd Widup <todd....@gmail.com> wrote:so...do PYC files store info like that? I always thought it was strictly a compiled version of the py file, with nothing elseanyways, my friend that was running it, kept getting some errors about a path not existing...strange thing was, it was showing the path where I have the tools on my local machine, not where he has them.so I have a few tools I gave over to a friend..gave them the PYC files.part of what one of the tools does is get the directory path it was executed from to pass along.Do you have an example of what kind of code was returning a cached result from when the pyc was generated?
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk36XUNP2PqWnGaq5wgRdrQH%3DgmYf_v%2BmLQi171VbFS5-GA%40mail.gmail.com.
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1NzFWJ5o1%3DAFqK1mc%2Bsf%3DETiw8-s_zt3pZt2rWbJKR2w%40mail.gmail.com.
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk37XaXLxC6NeMXL0MoqF9NjR5U4zd0YWN64mfrv8G8_b8g%40mail.gmail.com.
How about this?
def getExecutingfile():
return __file__
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAtghUXNDCX3Ww7uypxMDiYC_cTi2L-mcZjR7k247vPbg%40mail.gmail.com.
On Sun, May 28, 2017, 8:18 PM Marcus Ottosson <konstr...@gmail.com> 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.utilsprint 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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAtghUXNDCX3Ww7uypxMDiYC_cTi2L-mcZjR7k247vPbg%40mail.gmail.com.
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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0A07nAE3CLKWUi4%3DiXSDtJatEe9Bo3wPXNjEkyE0dp%2Bg%40mail.gmail.com.
justin's correct
On Sun, May 28, 2017 at 5:13 AM, Justin Israel <justin...@gmail.com> wrote:
On Sun, May 28, 2017, 8:18 PM Marcus Ottosson <konstr...@gmail.com> 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.utilsprint 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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAtghUXNDCX3Ww7uypxMDiYC_cTi2L-mcZjR7k247vPbg%40mail.gmail.com.
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0A07nAE3CLKWUi4%3DiXSDtJatEe9Bo3wPXNjEkyE0dp%2Bg%40mail.gmail.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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk363H_y4AoUCj1ctv-RPQaNcCo0pocik6bN1Tj0%3DK9g7Bg%40mail.gmail.com.
On Mon, May 29, 2017, 10:22 AM Todd Widup <todd....@gmail.com> wrote:justin's correctDid that suggestion to use the globals end up working?
On Sun, May 28, 2017 at 5:13 AM, Justin Israel <justin...@gmail.com> wrote:
On Sun, May 28, 2017, 8:18 PM Marcus Ottosson <konstr...@gmail.com> 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.utilsprint 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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAtghUXNDCX3Ww7uypxMDiYC_cTi2L-mcZjR7k247vPbg%40mail.gmail.com.
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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0A07nAE3CLKWUi4%3DiXSDtJatEe9Bo3wPXNjEkyE0dp%2Bg%40mail.gmail.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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk363H_y4AoUCj1ctv-RPQaNcCo0pocik6bN1Tj0%3DK9g7Bg%40mail.gmail.com.
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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1ESdNzO%2BnAzu%2BX_6zK1zK9afesPUdwoWK7EnuYLJ24aw%40mail.gmail.com.
test=pth.filimport Path as pththen in module Bobfil=__file__in module Pathhadnt 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
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 <justin...@gmail.com> wrote:
On Mon, May 29, 2017, 10:22 AM Todd Widup <todd....@gmail.com> wrote:justin's correctDid that suggestion to use the globals end up working?
On Sun, May 28, 2017 at 5:13 AM, Justin Israel <justin...@gmail.com> wrote:
On Sun, May 28, 2017, 8:18 PM Marcus Ottosson <konstr...@gmail.com> 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.utilsprint 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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAtghUXNDCX3Ww7uypxMDiYC_cTi2L-mcZjR7k247vPbg%40mail.gmail.com.
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0A07nAE3CLKWUi4%3DiXSDtJatEe9Bo3wPXNjEkyE0dp%2Bg%40mail.gmail.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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk363H_y4AoUCj1ctv-RPQaNcCo0pocik6bN1Tj0%3DK9g7Bg%40mail.gmail.com.
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1ESdNzO%2BnAzu%2BX_6zK1zK9afesPUdwoWK7EnuYLJ24aw%40mail.gmail.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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk35nZMmkH2Q8RCGLEywb7h1C%2BLbvhGWbvhcjZchj496z8A%40mail.gmail.com.