If you plan to use the reload() function, then don't use the "import from" syntax. You only want the symbol for the module and not to hold onto any symbols from that module. Otherwise when you reload, you will still have old symbols.
On Sun, 22 May 2016 11:15 AM <[email protected]> wrote: > hi there. > > i have been reading the python document on naming conventions to try and > avoid clashes when import modules and classes with the same names. > > i am able to import a function from a module with the same name as the > module eg > > from samDev.rigging.TOPOCOAT.configure import configure > > (the second 'configure' being a def inside the 'configure.py' module). > However if i update this function and use the reload command: > > reload (configure) > > i think python is confusing the 'configure' module name with the function, > resulting in this error: > > # TypeError: reload() argument must be module # > > If there was different casing for the module name and the function name it > would work. But apparently it is convention for modules and functions to be > in lower case. Is there a way around this. Or should i just rename the > function to something else? > > 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/a5a694ca-8754-4c46-ac47-11fc3a21a77d%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/CAPGFgA3PEUu%3D0FqEq5E4Dvv8R2KJoY%2Bt1kcEtu3q3T%2BC66nJVA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
