Pyjamas import statements
Posted
by Gordon Worley
on Stack Overflow
See other posts from Stack Overflow
or by Gordon Worley
Published on 2009-12-04T21:55:41Z
Indexed on
2010/06/13
0:02 UTC
Read the original article
Hit count: 215
I'm starting to use Pyjamas and I'm running into some annoyances. I have to import a lot of stuff to make a script work well. For example, to make a button I need to first
from pyjamas.ui.Button import Button
and then I can use Button
. Note that
import pyjamas.ui.Button
and then using Button.Button
doesn't work (results in errors when you build to JavaScript, at least in 0.7pre1). Does anyone have a better example of a good way to do the import statements in Pyjamas than what the Pyjamas folks have on their site? Doing things their way is possible, but ugly and overly complicated from my perspective, especially when you want to use a dozen or more ui components.
© Stack Overflow or respective owner