Allowing Arbitrary Indentation in Python
Gary
gfixler at gmail.com
Wed Dec 19 22:49:04 EST 2007
On Dec 19, 6:44 pm, Ross Ridge <rri... at caffeine.csclub.uwaterloo.ca>
wrote:
> Sam <L33tmin... at gmail.com> wrote:
> >cmds.window(t='gwfUI Builder')
> >cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20,
> >100)))
> > cmds.paneLayout(configuration='horizontal2')
> > cmds.frameLayout(l='Layouts')
> > cmds.scrollLayout(cr=True)
> > cmds.columnLayout(adj=True, cat=('both', 2))
> > for i in layouts:
> > cmds.button(l=i)
> > cmds.setParent('..')
> > cmds.setParent('..')
> > cmds.setParent('..')
> > cmds.setParent('..')
> >cmds.setParent('..')
> >cmds.showWindow()
>
> An alternative would be to do something like the following:
>
> cmds.window(t='gwfUI Builder')
> cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100),
> (3, 20, 100)))
> cmds. paneLayout(configuration='horizontal2')
> cmds. frameLayout(l='Layouts')
> cmds. scrollLayout(cr=True)
> cmds. columnLayout(adj=True, cat=('both', 2))
> for i in layouts:
> cmds. button(l=i)
> cmds. setParent('..')
> cmds. setParent('..')
> cmds. setParent('..')
> cmds. setParent('..')
> cmds.setParent('..')
> cmds.showWindow()
>
> Stylistically it's not much better, but you don't need to change Python
> interpreter for it work.
I'm adding this to my list of crazy things not to do :) I'm also
adding it to my list of code snippets I can use to injure Python
programmers, if the need arises. Thanks!
-g
More information about the Python-list
mailing list