Source

pyld / examples / simple / test-1-pyld.py

Full commit


if __name__ == '__pyld_init__':
  global the_global_number
  the_global_number = 42
  test_1_var = 0
  print 'initializing pyld test'

if __name__ == '__pyld_unload__':
  print 'unloading pyld test ... test_1_var:', test_1_var, 'the_global_number:', the_global_number

if __name__ == '__pyld_reload__':
  test_1_var = 0
  print 'reloading pyld test ... test_1_var:', test_1_var, 'the_global_number:', the_global_number


if __name__ == '__pyld_tick__':
  test_1_var += 1
  ## better don't print stuff here ^^