JohnV -
Since OPC is based on COM, I'd look at Mark Hammond's Win32 extensions for Python (http://starship.python.net/crew/mhammond/win32/). There may not be a drop-in OPC class, but this material should give you the tools to create your own OPC client and/or server.
-- Paul
Why not just build yourself a dictionary that maps file type to class? Then you don't have to expose your parser class names.
# map strings to corresponding classes
parserClassMap = {
"FileType1" : File1Parser,
"FileType2" : File2Parser,
}
fileType = raw_input("Type of file:")
if...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.