pymel has a pymel.core.general module that is getting imported with the * symbol import as `general`
Thus why its always advised NOT to use those types of imports. -------------------------------------------- Eric Thivierge http://www.ethivierge.com On Mon, Aug 29, 2016 at 4:04 PM, <[email protected]> wrote: > Hello, > > a while ago i made a post about my modules not being able to communicate > when the call was nested in a different package. > > I finally found the solution. It was because the module that was doing the > call to the other module, had an import statement to pymel: > > from pymel.core import * > > i did this originally because i had a large script which constantly used > pymel commands and didn't want to keep using the 'pm' namespace. But i > guess this has allowed some name clashings? it was weird that it should > stop my call to another module that was simply printing out something as a > test. > > my malfunctioning code was: > import samDev.rigging.TOPOCOAT.utility_functions.general as general > reload(general) > from pymel.core import * > > general.test() #calling a function in general that printed out 'hello' > ############################### > > the error was always: > AttributeError: 'module' object has no attribute 'test' > > --------------------------------- > as soon as i removed the 'from pymel.core import *' it worked fine.. how > the hell is 'general.test()' affected by pymel.core library? > > thanks, > Sam > > -- > 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/728143f1-b191-4de8-8507- > 2afe0837b4c1%40googlegroups.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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAAjrnHuYb342HdPUVibLLY4yVA2GiTQoL%3DpVRdOAEZpb81S1pQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
