[python-win32] Problems embedding in C++

Ishank Jain ishank_jain@hotmail.com
Tue, 16 Jul 2002 18:29:55 +0000


yes, thats how i checked the sys.path


>From: "Jorgensen, Jens" <jjorgensen@Tallan.com>
>To: "Ishank Jain" <ishank_jain@hotmail.com>, <python-win32@python.org>
>Subject: RE: [python-win32] Problems embedding in C++
>Date: Tue, 16 Jul 2002 14:24:03 -0400
>
>How did you check sys.path? Did you use PyRun_SimpleFile to run the script:
>
>import sys
>print sys.path
>
>?
>
>	-----Original Message-----
>	From: Ishank Jain [mailto:ishank_jain@hotmail.com]
>	Sent: Tue 7/16/2002 12:46 PM
>	To: python-win32@python.org
>	Cc:
>	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
-----------------------------------------------

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com