In the PyBluez source code I've noticed a couple things I haven't seen before. This file named widcomm.py starts with the following:
from .btcommon import *
import socket
import struct
import threading
import os
import _widcomm
In the previous directory, there is no _widcomm.py or another widcomm.py. I've read that modules with a leading underscore might be "private" or accelerated, but I can't find anything about a module seemingly importing itself with an underscore.
A few lines under that you get this interesting function:
def dbg (*args):
return
sys.stdout.write (*args)
sys.stdout.write ("\n")
Am I correct in thinking the code under return
has no way of ever being executed? As far as I can tell this function serves no purpose.
What exactly is going on here?