| | |
trouble with import module...
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2009
Posts: 1
Reputation:
Solved Threads: 0
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...
Python Syntax (Toggle Plain Text)
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
if possible, just include it in same folder as your script and do a simple import as you did to sys. Otherwise, if correctly installed, then it should respond to simple import. Did you write the module or installed it from someone/somewhere?
![]() |
Similar Threads
- 'import site' failed error, Python newbie (Python)
- trouble importing commons-io-1.3.2 (Java)
- Problem in import module (Python)
- package / module location (Python)
- 'import' wrinkles (Python)
- IE 6 Bookmark import problem (Web Browsers)
- Call to Module Won't Refresh (Python)
Other Threads in the Python Forum
- Previous Thread: Check if var exists
- Next Thread: My text game's file parser
| Thread Tools | Search this Thread |
Tag cloud for Python
abrupt ansi anti apache approximation array basic beginner book builtin calculator chmod code converter countpasswordentry curved dan08 dictionaries dictionary dynamic examples excel file filename float format ftp function gui heads homework import inches input java launcher library line lines linux list lists loop mouse mysql mysqlquery newb number numbers numeric output parsing path phonebook plugin port prime program programming progressbar projects py2exe pygame pyqt pysimplewizard python random recursion recursive redirect scrolledtext server software ssh stamp statictext statistics string strings table terminal text textarea thread threading time tkinter tlapse trick tuple tutorial twoup ubuntu unicode urllib urllib2 variable windows wordgame wxpython






