__main__.py 505 B

12345678910111213141516171819
  1. #!/usr/bin/env python
  2. from __future__ import unicode_literals
  3. # Execute with
  4. # $ python youtube_upload/__main__.py (2.6+)
  5. # $ python -m youtube_upload (2.7+)
  6. import sys
  7. if __package__ is None and not hasattr(sys, 'frozen'):
  8. # direct call of __main__.py
  9. import os.path
  10. path = os.path.realpath(os.path.abspath(__file__))
  11. sys.path.insert(0, os.path.dirname(os.path.dirname(path)))
  12. import youtube_upload.main
  13. if __name__ == '__main__':
  14. youtube_upload.main.main(sys.argv[1:])