Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. if foo:
  2. data = read_data_from_somewhere()
  3. else:
  4. data = open("foo.pyc", 'rb').read()
  5.  
  6. code = bytes_to_code(data)
  7.  
  8. # call a method from the loaded code
  9. code.call_method()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement