app/controllers/preprocessor/python/python_preprocessor.rb
# Handles the case when our augmented code has passed syntax validation. Move to the next phase,
# make the augmented code runnable, and trigger running it.
Handles the case when our augmented code has passed syntax validation. Move to the next phase,
make the augmented code runnable, and trigger running it.
Handles the case when our augmented code has passed syntax validation . Move to the next phase make the augmented code runnable and trigger running it .
def augment_success(send, line)
    @phase = :execute
    @augmented_code = make_runnable(@augmented_code)
    send.call([
      {:write_file => {:filename => @filename, :content => @augmented_code}},
      {:execute => {:command => "env PYTHONPATH=$LIB$/python #{VM_PYTHON} -B #{@filename}",
                    :stdout => 'executeoutput',
                    :stderr => 'executeerror'}}])
    return {:type => :no}
  end
def augment_success ( send , line ) @phase = :execute @augmented_code = make_runnable ( @augmented_code ) send . call ( [ { :write_file => { :filename => @filename , :content => @augmented_code } } , { :execute => { :command => "env PYTHONPATH=$LIB$/python #{VM_PYTHON} -B #{@filename}" , :stdout => 'executeoutput' , :stderr => 'executeerror' } } ] ) return { :type => :no } end
Handles the case when our augmented code has passed syntax validation.
Handles the case when our augmented code has passed syntax validation .
# Don't output anything
send
line