-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnd.py
More file actions
30 lines (25 loc) · 873 Bytes
/
Copy pathsnd.py
File metadata and controls
30 lines (25 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#Simple Radio Server
#A multithreaded application to record and serve a shoutcast radio stream from an SDR
# =( Coronavirus
import os
import threading
import time
import requests #Maybe i wont use this
import config
import logging
#class recordHour(threading.Thread):
def thread_function(name):
logging.info("Thread %s: starting", name)
time.sleep(2)
logging.info("Thread %s: finishing", name)
if __name__ == "__main__":
format = "%(asctime)s: %(message)s"
logging.basicConfig(format=format, level=logging.INFO,
datefmt="%H:%M:%S")
logging.info("Main : before creating thread")
x = threading.Thread(target=thread_function, args=(1,))
logging.info("Main : before running thread")
x.start()
logging.info("Main : wait for the thread to finish")
# x.join()
logging.info("Main : all done")