- 论坛徽章:
- 2
|
有一个文件内容如下:
"备份操作已取消。","8","2",,"2","0","0","4611686018427387904","5","Microsoft-Windows-Backup","1db28f2e-8f80-4027-8c5a-a11f7f10f62d","Microsoft-Windows-Backup","3244","1880","7FwaibaoAD.game.waibao.com","S-1-5-18","2015/9/15 19:50:32",,,"microsoft-windows-backup","System.Int32[]","System.Diagnostics.Eventing.Reader.EventBookmark","错误","信息",,"System.Collections.ObjectModel.ReadOnlyCollection`1[System.String]","System.Collections.Generic.List`1[System.Diagnostics.Eventing.Reader.EventProperty]"
"备份操作已启动。","1","1",,"4","0","1","4611686018427387904","4","Microsoft-Windows-Backup","1db28f2e-8f80-4027-8c5a-a11f7f10f62d","Microsoft-Windows-Backup","3244","1880","7FwaibaoAD.game.waibao.com","S-1-5-18","2015/9/15 19:49:36",,,"microsoft-windows-backup","System.Int32[]","System.Diagnostics.Eventing.Reader.EventBookmark","信息","启动",,"System.Collections.ObjectModel.ReadOnlyCollection`1[System.String]","System.Collections.Generic.List`1[System.Diagnostics.Eventing.Reader.EventProperty]"
"备份操作已完成。","14","2",,"4","0","2","4611686018427387904","3","Microsoft-Windows-Backup","1db28f2e-8f80-4027-8c5a-a11f7f10f62d","Microsoft-Windows-Backup","3244","3144","7FwaibaoAD.game.waibao.com","S-1-5-18","2015/9/15 19:47:06",,,"microsoft-windows-backup","System.Int32[]","System.Diagnostics.Eventing.Reader.EventBookmark","信息","停止",,"System.Collections.ObjectModel.ReadOnlyCollection`1[System.String]","System.Collections.Generic.List`1[System.Diagnostics.Eventing.Reader.EventProperty]"
通过以下读取文件
file_info=open(file_path)
for file_line in file_info:
如果想将文件内容分隔为以下的格式,应该如何写?
备份操作已启动。 1 1 4 0 1 4611686018427387904......
因为需要将文件内容按字段提取写入数据库的,是否可以先删除"号,再按,号来进行分隔? |
|