A note of phrases that you often use (yourself) in Python scripts.
#!/usr/bin/env python3
It can be executed directly in a Unix-like environment.
[Additional correction]
#coding: utf-8
It seems that it is not necessary to specify the character code.
import sys
argv_list = [sys.argv[i] for i in range(1,len(sys.argv))]
if __name__ == '__main__':
import os
basename_without_ext = os.path.splitext(os.path.basename(filepath))[0]
Recommended Posts