BaseTools/Scripts: Porting PackageDocumentTools code to use Python3

Porting PackageDocumentTools code to Python3
DoxyGen 1.8.6
wxpython 4.0.3

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yunhua Feng
2018-08-28 17:00:24 +08:00
committed by Yonghong Zhu
parent c9486c8c9d
commit 9d7e1e56a7
12 changed files with 62 additions and 67 deletions

View File

@ -13,7 +13,7 @@
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
import plugins.EdkPlugins.basemodel.doxygen as doxygen
from ...basemodel import doxygen
import os
try:
import wx
@ -21,9 +21,9 @@ try:
except:
gInGui = False
import re
import plugins.EdkPlugins.edk2.model.inf as inf
import plugins.EdkPlugins.edk2.model.dec as dec
from plugins.EdkPlugins.basemodel.message import *
from ..model import inf
from ..model import dec
from ...basemodel.message import *
_ignore_dir = ['.svn', '_svn', 'cvs']
_inf_key_description_mapping_table = {
@ -388,7 +388,7 @@ class PackageDocumentAction(DoxygenAction):
configFile.AddFile(path)
return
no = 0
for no in xrange(len(lines)):
for no in range(len(lines)):
if len(lines[no].strip()) == 0:
continue
if lines[no].strip()[:2] in ['##', '//', '/*', '*/']:
@ -1003,7 +1003,7 @@ class PackageDocumentAction(DoxygenAction):
#file = textfile.TextFile(path)
try:
file = open(path, 'rb')
file = open(path, 'r')
except (IOError, OSError) as msg:
return None