Hello everyone, I'm new to pyhton and this is my first post. Please help me understand how can I tell python where my parallel module is located. parallel module I think is located under parallel folder. Any help will be appreciated...
import sys
sys.path.append('C:\\Python26\\Lib\\site-packages\\parallel')
class HelloWorld:
_reg_clsid_ = '{BEA1AA48-1D0A-4D19-8E98-03C54F195B59}'
_reg_desc_ = "Python Test COM Server"
_reg_progid_ = "Python.TestServer"
_public_methods_ = ['hello']
_public_attrs_ = ['softspace', 'noCalls']
_readonly_attrs_ = ['noCalls']
def __init__(self):
self.softspace = 2
self.noCalls = 0
def hello(self, arg1):
if arg1==1:
sel="This is option 1 message from COM"
elif arg1==2:
sel="This is option 2 message from COM"
elif arg1==3:
sel="This is option 3 message from COM"
# THIS IS WHERE I GET THE ERROR (no module found)
import parallel
p=parallel.Parallel()
p.setData(arg1)
arg1=sel
return arg1
if __name__=='__main__':
import win32com.server.register
win32com.server.register.UseCommandLine(HelloWorld)
import pythoncom
print pythoncom.CreateGuid() # different each time