Home > other >  A great god, please help have a look, I was hoping to generate new. Smu, but in fact although the re
A great god, please help have a look, I was hoping to generate new. Smu, but in fact although the re

Time:09-20

F='
Smudata []=https://bbs.csdn.net/topics/
For file in p.r glob (' * ') :
F=STR (file)
If 'test. The smu in f:
X=open (f)
Smudata=(https://bbs.csdn.net/topics/x.readlines)

F1=STR (file)
If 'Value_Former4_Haokai. TXT in f1:
With the open (f1, 'r') as filereader3:
For the row in filereader3:
If re search (r 'Channel \ s + \ d +', row, re. I) :
ChannelNum=row. Strip (). The split (', ') [4]
Phase=0 to float (row. Strip (). The split (', ') [2])
For I, v in enumerate (smudata) :
If v. trip ()==ChannelNum:
Smudata. Insert (I + 8, 'AdjustmentPhase=' + STR (phase) + 'deg \ n')

With the open (f.r eplace (' smu ', '_new. Smu'), 'w') as filewriter3:
For the line in smudata:
Filewriter3. Write (line)
  • Related