回答編集履歴

2

修正

2021/02/20 00:43

投稿

ppaul
ppaul

スコア24670

test CHANGED
@@ -44,7 +44,7 @@
44
44
 
45
45
  ps = get_pos([0], hyphens)
46
46
 
47
- with open(outfile, 'w', encoding='utf-8-sig') as f_out:
47
+ with open(outfile, 'w', encoding='utf-8') as f_out:
48
48
 
49
49
  f_out.write(','.join(split_record(ps, head)))
50
50
 

1

結果を追加

2021/02/20 00:43

投稿

ppaul
ppaul

スコア24670

test CHANGED
@@ -84,4 +84,30 @@
84
84
 
85
85
  $ python table2csv.py table.txt table.csv
86
86
 
87
+ $ cat table.csv
88
+
89
+ IP,MAC,Name,Role,Age(d:h:m),Auth,VPN link,AP name,Roaming,Essid/Bssid/Phy,Profile,Forward mode,Type,Host Name
90
+
91
+ 00.00.00.00,00:00:00:00:00:00,xxxxxxxxxxxxxxxx,full-access,00:00:03,Web,,tunnel 1,xxxxx,,xxxxx,tunnel,,
92
+
93
+ 00.00.00.00,00:00:00:00:00:00,xxxxxxxxxxxxxxxx,full-access,00:00:03,Web,,tunnel 1,xxxxx,,xxxxx,tunnel,,
94
+
95
+ 00.00.00.00,00:00:00:00:00:00,xxxxxxxxxxxxxxxx,full-access,00:00:02,Web,,tunnel 1,xxxxx,,xxxxx,tunnel,,
96
+
97
+ 00.00.00.00,00:00:00:00:00:00,,full-access,00:00:04,,,tunnel 1,xxxxx,,xxxxx,tunnel,,
98
+
99
+ 00.00.00.00,00:00:00:00:00:00,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@xxxxxx@xxx,full-access,00:00:08,Web,,tunnel 1,xxxxx,,xxxxx,tunnel,,
100
+
101
+ 00.00.00.00,00:00:00:00:00:00,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@xxxxxx@xxxx,full-access,00:00:08,Web,,tunnel 1,xxxxx,,xxxxx,tunnel,,
102
+
103
+ 00.00.00.00,00:00:00:00:00:00,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@xxxxxx@xxxx,full-access,00:00:08,Web,,tunnel 1,xxxxx,,xxxxx,tunnel,,
104
+
105
+ 00.00.00.00,00:00:00:00:00:00,,x-access,00:00:06,,,tunnel 1,xxxxx,,xxxxx,tunnel,,
106
+
107
+ 00.00.00.00,00:00:00:00:00:00,,x-access,00:00:00,,,tunnel 1,xxxxx,,xxxxx,tunnel,,
108
+
109
+ 00.00.00.00,00:00:00:00:00:00,,x-access,00:00:03,,,tunnel 1,xxxxx,,xxxxx,tunnel,,
110
+
111
+ 00.00.00.00,00:00:00:00:00:00,,x-access,00:00:02,,,tunnel 1,xxxxx,,xxxxx,tunnel,,
112
+
87
113
  ```