I am trying to run
pyjamas-desktop on my Fedora 15. All packages were installed, I have adjusted
PYTHONPATH to include
/usr/share/pyjamas/library, but when I try to run a simple example:
from pyjamas.ui.Button import Button from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.HTML import HTML from pyjamas import Window def greet(sender): Window.alert("Hello, AJAX!") if __name__ == '__main__': b = Button("Click me", greet) RootPanel().add(b) hw = HTML("Hello <b>World</b>") RootPanel().add(hw)
I get information:
Traceback (most recent call last): File "pyjstest.py", line 10, in <module> b = Button("Click me", greet) File "/usr/share/pyjamas/library/pyjamas/ui/Button.py", line 36, in __init__ element = DOM.createButton() File "/usr/share/pyjamas/library/pyjamas/DOM.py", line 190, in createButton return createElement("button") File "/usr/share/pyjamas/library/pyjamas/DOM.py", line 202, in createElement return doc().createElement(tag) File "/usr/share/pyjamas/library/__pyjamas__.py", line 45, in doc return main_frame.getDomDocument() AttributeError: 'NoneType' object has no attribute 'getDomDocument'
Do I need to adjust something here? For Ubuntu I have found information on pyjamas-dev, that it needs to be built from source and bootstrapped. Nothing was required of me, when I installed it from package in Fedora. What may I be doing wrong?