Commits

uniqx  committed 5096d86

created examples folder

  • Participants
  • Parent commits 190878f

Comments (0)

Files changed (4)

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

+
+
+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 ^^

File examples/simple/test-2-pyld.py

+
+
+if __name__ == '__pyld_init__':
+  test_2_var = 0
+  print 'initializing pyld test'
+
+if __name__ == '__pyld_unload__':
+  print 'unloading pyld test ... test_2_var:', test_2_var, 'the_global_number:', the_global_number
+
+if __name__ == '__pyld_reload__':
+  test_2_var = 0
+  print 'reloading pyld test ... test_2_var:', test_2_var, 'the_global_number:', the_global_number
+
+
+
+if __name__ == '__pyld_tick__':
+  test_2_var += 1
+  ## better don't print stuff here ^^

File test-1-pyld.py

-
-
-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 ^^

File test-2-pyld.py

-
-
-if __name__ == '__pyld_init__':
-  test_2_var = 0
-  print 'initializing pyld test'
-
-if __name__ == '__pyld_unload__':
-  print 'unloading pyld test ... test_2_var:', test_2_var, 'the_global_number:', the_global_number
-
-if __name__ == '__pyld_reload__':
-  test_2_var = 0
-  print 'reloading pyld test ... test_2_var:', test_2_var, 'the_global_number:', the_global_number
-
-
-
-if __name__ == '__pyld_tick__':
-  test_2_var += 1
-  ## better don't print stuff here ^^