Are there multiple people doing this Towers of Hanoi thing on this list? :-)

Are you saying you have defined your code like this?

def Hanoi():
    def solve_hanoi():
       ...

If so, don't do that. Refactor your code to have reusable logic by putting
solve_hanoi() in a scope that can be reached by a button callback

Otherwise you will need to show some code, because it is hard to know what
you are doing from a vague description.
On May 4, 2014 7:05 AM, "Heather Rose" <[email protected]> wrote:

> Hi Guys,
>
> I am trying to create a GUI in python in maya for my Towers of Hanoi
> Solver. I have made GUIs before but the difference now is that all of my
> procedures are within another procedure!
>
> So say I wanted to make a button that solved the puzzle. I have a
> function, *def solve_hanoi(disc, 1, 2, 3):*, which solves the puzzle.
> This function is within *def Hanoi():, *so when i'm making my button:
>
> *cmds.button("Solvepuzzle", l="Solve the Puzzle", w=200, al="center",
> command=?)*
>
> What should the command be?!
>
> Thanks in advance!
>
>
>  --
> 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/51666336-f3f0-46b2-b77f-b5ed3a0bef42%40googlegroups.com<https://groups.google.com/d/msgid/python_inside_maya/51666336-f3f0-46b2-b77f-b5ed3a0bef42%40googlegroups.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/CAPGFgA1tncC-%2B%2Bo4urDjuUpkHMny0T_NyOhN7Ax8_gd%2BkZzG8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to