def run( uri ):
  JythonURIClassLoader.load( uri, "buildertask" )

  # And now, invoke the "run" method on the downloaded task.
  from buildertask import Task
  task = Task()
  task.run()
Example #2
0
def run(uri):
    JythonURIClassLoader.load(uri, "buildertask")

    # And now, invoke the "run" method on the downloaded task.
    from buildertask import Task
    task = Task()
    task.run()
def get_jythonEditObject(uri, base, invid, editset, original):
    '''Cached, dynamic class loading by uri
  '''
    global class_hash

    # First, we'll look for this class in the cache
    if class_hash.has_key(uri):
        Ganymede.debug("Loaded " + uri + " from the Jython class cache.")
        return class_hash[uri](base, invid, editset, original)

    # Okay, since the class isn't in the cache, we need to slurp
    # it from the specified location
    JythonURIClassLoader.load(uri)

    # Snag the class definition from the default module that
    # JythonURIClassLoader created for us
    from ganymede_hot_code import EditObject

    # Store this class in the hash. This doesn't involve any
    # synchronization because the caller should already be
    # synchronized
    Ganymede.debug("Adding " + uri + " to the Jython class cache.")
    class_hash[uri] = EditObject

    # And return an instantiation of the class
    return EditObject(base, invid, editset, original)
def get_jythonEditObject( uri, base, invid, editset, original ):
  '''Cached, dynamic class loading by uri
  '''
  global class_hash

  # First, we'll look for this class in the cache
  if class_hash.has_key(uri):
    Ganymede.debug( "Loaded " + uri + " from the Jython class cache." )
    return class_hash[uri]( base, invid, editset, original );
  
  # Okay, since the class isn't in the cache, we need to slurp 
  # it from the specified location
  JythonURIClassLoader.load( uri )

  # Snag the class definition from the default module that
  # JythonURIClassLoader created for us
  from ganymede_hot_code import EditObject

  # Store this class in the hash. This doesn't involve any
  # synchronization because the caller should already be
  # synchronized
  Ganymede.debug( "Adding " + uri + " to the Jython class cache." )
  class_hash[ uri ] = EditObject

  # And return an instantiation of the class
  return EditObject( base, invid, editset, original )