def get_port_number(port_name):
for number, name in scan_ports():<EOL><INDENT>if name == port_name:<EOL><INDENT>return number<EOL><DEDENT><DEDENT>return None<EOL>
Scans for the given port name and return its numeric value.
If port name cannot be found, returns ``None``. Not that the port name is
case-sensitive.