#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import time
import sys
import csv
import pandas as pd
import numpy as np
import datetime
import time
import random
import requests
import os
############查询是否列表里面已经有MAC分配给了这个SN,有的话直接拿出来上传,无需自加分配##
csvFile = open(‘C:\\Users\\1187206\\Music\\MAC_record.csv‘, ‘ab+‘)
reader = csv.reader(csvFile)
keywords = []
for row in reader:
keywords.append(row)
# print(keywords)
for i in range(len(keywords)):
# All_SN = ",".join(keywords[i][0])
if re.search(sys.argv[1],keywords[i][0])!=None:
# print All_SN
if sys.argv[1] in keywords[i][0]:
print(keywords[i][1])
csvFile.close
#######################################################################
原文地址:https://www.cnblogs.com/stevenliu1030/p/10700701.html
时间: 2024-09-29 17:51:43