Remove 'if __name__ == __main__' clauses in all python scripts

This commit is contained in:
Eric Torres 2019-01-22 10:31:04 -08:00
parent 24c4ae781b
commit 04aade74eb
4 changed files with 83 additions and 83 deletions

View File

@ -5,7 +5,7 @@ import argparse
import pathlib
import subprocess
if __name__ == '__main__':
# ========== Main Script ==========
parser = argparse.ArgumentParser()
parser.add_argument("-b", "--bs",
default=512,

View File

@ -17,8 +17,7 @@ DEFAULT_FILENAME = f"{pathlib.Path.home()}/Music/%(title)s.%(ext)s"
# ========== Error Codes ==========
E_NOURLS = 2
# =========== Functions ==========
if __name__ == '__main__':
# ========== Main Script ==========
parser = argparse.ArgumentParser()
parser.add_argument('-b', '--batchfile',
type=str,

View File

@ -51,7 +51,7 @@ def convert_to_celsius(mkel_temp):
return (mkel_temp/1000) - 273.15
if __name__ == '__main__':
# ========== Main Script ==========
parser = argparse.ArgumentParser()
parser.add_argument('device', help='device node to retrieve\
the temperature for', metavar='dev')

View File

@ -4,9 +4,10 @@
import argparse
import requests
# ========== Constants ==========
WTTR_URI = 'http://wttr.in'
if __name__ == '__main__':
# ========== Main Script ==========
parser = argparse.ArgumentParser()
parser.add_argument('location')