[python-win32] Problems embedding in C++
Ishank Jain
ishank_jain@hotmail.com
Wed, 17 Jul 2002 15:27:55 +0000
I re-installed Python and its windows extensions and this has seemed to
solve the problem. It looks as if I had some compatibility problem between
Python libraries.
Also, Mark, I had the pywintypesxx.dll in the PATH but somehow the registry
entry for it was missing. I think that was another problem and re-installing
the extensions added back the registry entry.
Thanks Mark and Jens.
Will keep in touch.
-Ishank
>From: "Mark Hammond" <mhammond@skippinet.com.au>
>To: "Ishank Jain" <ishank_jain@hotmail.com>
>CC: <python-win32@python.org>
>Subject: RE: [python-win32] Problems embedding in C++
>Date: Wed, 17 Jul 2002 19:40:37 +1000
>
>Do any non-Win32 .pyd files import? If so, my guess is that a dependent
>DLL
>can not be found. Is pywintypesxx.dll on your PATH (not PYTHONPATH)?
>
>Re "-v" for embedded Python - set Py_VerboseFlag from your C++ code.
>
>Mark.
>
> > -----Original Message-----
> > From: python-win32-admin@python.org
> > [mailto:python-win32-admin@python.org]On Behalf Of Ishank Jain
> > Sent: Wednesday, 17 July 2002 3:47 AM
> > To: python-win32@python.org
> > Subject: [python-win32] Problems embedding in C++
> >
> >
> > Hi,
> >
> > I have been trying to run a simple python file from C++ using the
> > PyRun_SimpleFile C api call.
> >
> > Let the file I need to run be demo.py.
> > If the demo.py contains simple python commands such as:
> >
> > print "Hello World"
> >
> > my program works fine. But when i try to use something like:
> >
> > import win32com
> > print "Hello World"
> >
> > it gives me an error saying that it cannot find the win32api module. i
> > checked the sys.path and it has the required path entries.
> >
> > also if i run the demo.py file using the python win gui then it runs
> > correctly. only when i run the file using the PyRun_SimpleFile call, it
> > fails.
> >
> > here is the traceback of the error:
> > -----------------------------
> > Traceback (most recent call last):
> > File "..\hello.py", line 15, in ?
> > import win32com
> > File "C:\Python22\lib\site-packages\win32com\__init__.py", line 5, in
>?
> > import win32api, sys
> > ImportError: No module named win32api
> > [3929 refs]
> > -----------------------------
> >
> > any help would be appreciated.
> >
> > Ishank Jain
> > -----------------------------------------------
> > Graduate Student
> > Computer Engeering
> > University of Minnesota, Twin Cities
> > Voice: (Res) 612-331-9696 (Off) 612-626-0276
> > Email: ishank_jain@hotmail.com
> > -----------------------------------------------
> >
> > _________________________________________________________________
> > Send and receive Hotmail on your mobile device: http://mobile.msn.com
> >
> >
> >
> > _______________________________________________
> > Python-win32 mailing list
> > Python-win32@python.org
> > http://mail.python.org/mailman/listinfo/python-win32
Ishank Jain
-----------------------------------------------
Graduate Student
Computer Engeering
University of Minnesota, Twin Cities
Voice: (Res) 612-331-9696 (Off) 612-626-0276
Email: ishank_jain@hotmail.com
-----------------------------------------------
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com