Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (27 sloc) 1.12 KB
# WARNING: the use of javascript pretty much trashes all chance of using
# pyjamas-desktop. give serious consideration to doing something OTHER
# than including random bits of javascript off the internet in a pyjamas
# application. the larger the random bit of javascript, the more chance
# there is that it will interact in some horrendous way with the pyjamas
# infrastructure.
# if you ABSOLUTELY MUST use javascript, here's how to do it.
from pyjamas import logging
log = logging.getAppendLogger(__name__, logging.DEBUG, logging.PLAIN_FORMAT)
# this simply tells the compiler that the two names are to be dropped
# into the javascript global namespace
from __javascript__ import examplevar, get_examplevar
# the default behaviour of jsimport is to include the javascript file
# "inline" - unmodified - direct into the compiler output
from __pyjamas__ import jsimport
def main():
global examplevar
#examplevar is actually "out of modules", in a super scope
examplevar = 'Altered'
examplevar = "Realtered"