这是我的代码:
try:
import clr, sys
from xml.dom.minidom import parse
import datetime
sys.path.append("C:\\teest")
clr.AddReference("TCdll")
from ClassLibrary1 import Class1
cl = Class1()
except ( ImportError ) :
print "Module may not be existing "
我的TCdll在C:\test中。我只是把它作为C:\t来测试错误。在
例外情况是:
^{pr2}$如何处理此异常??在
立即需要帮助
你需要知道怎么做clr.AddReference映射到文件名。在
编辑:
我想你是在问如何从AddReference调用中捕捉异常?在
替换:
有:
^{pr2}$相关问题 更多 >
编程相关推荐