__main__.py 467 B

1234567891011121314151617181920
  1. #!/usr/bin/env python
  2. from __future__ import unicode_literals
  3. # Execute with
  4. # $ python youtube_dl/__main__.py (2.6+)
  5. # $ python -m youtube_dl (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_dl
  13. if __name__ == '__main__':
  14. youtube_dl.main()