Mathan Kumar
Mathan Kumar

Reputation: 684

Communication between two different versions of python

I am using python 3.2 to build my windows application in which a DLL has to be created in addition to my application exe.

I googled and got py2exe can create a DLL from python script but supports till python 2.7 or 3.1 and not supported for python 3.2.

Hence I used python 2.7 py2exe to create DLL with pywin32. And while testing my app scripts with python 3.2 which also uses pywin32(py3.2) and sends some arguments to created DLL(py2.7) which uses py2win32(py2.7).

Got an execution error as follows
"pythoncom error: PythonCOM Server - The 'win32com.server.policy' module could no t be loaded.
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\win32com__init__.py", line 5, in
import win32api, sys, os
ImportError: Module use of python32.dll conflicts with this version of Python.
pythoncom error: CPyFactory::CreateInstance failed to create instance. (80004005 )"

My Questions are

  1. Can we create a dll from scripts using python 3.2
  2. How do we communicate b/w different versions of python which uses same modules like "pywin32"
  3. What about virtual Environment and will it be useful in this case and if it is how do we use tat

Upvotes: 0

Views: 1335

Answers (1)

Fred Foo
Fred Foo

Reputation: 363807

Pyro4 can be used to communicate between processes running different Python interpreters (even over a network).

Upvotes: 0

Related Questions