473,769 Members | 4,173 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"no module named win32api" using PyWin32-208

Hi.

I have Python 2.4 installed on my local machine in c:\Python24. I have
also downloaded the python for windows extensions installer
pywin32-208.win32-py2.4.exe and installed this to
C:\Python24\Lib \site-packages

Trying to run a python script through a C# console app is causing me
problems: the last line of code in the following block results in a no
module named win32ap error. I'm not sure if this is because there is no
win32api.py in the win32 fikder off site-packages, just a win32api.pyc
file.

m_engine = new PythonEngine();

m_engine.AddToP ath("C:\\Python 24\\DLLs");
m_engine.AddToP ath("C:\\Python 24\\lib");
m_engine.AddToP ath("C:\\Python 24\\lib\\plat-win");
m_engine.AddToP ath("C:\\Python 24\\lib\\lib-tk");

m_engine.AddToP ath("C:\\Python 24\\Lib\\site-packages\\pytho nwin");
m_engine.AddToP ath("C:\\Python 24");
m_engine.AddToP ath("C:\\Python 24\\lib\\site-packages");

m_engine.AddToP ath("C:\\Python 24\\lib\\site-packages\\win32 ");

m_engine.AddToP ath("C:\\Python 24\\lib\\site-packages\\win32 \\lib");

m_engine.Execut e("from win32api import win32api");

I have added all the addtopaths to get the path to match the sys.path I
see in a normal python console which can successfully import the
module.

Incidentally, I have tried making the last line
m_engine.Execut e("import win32api");
with no luck.

Can the win32 extensions handle compiled python modules? If not how can
I get it to work?

Thanks,
Mike

Jun 27 '06 #1
0 3816

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
10212
by: Copelandia Cyanescens | last post by:
Python Python 2.3.4, Windows, "clean" install, using the example code given in the documentation, I get this... Traceback (most recent call last): File "C:\projects\email\email.py", line 24, in ? server = smtplib.SMTP('mail.xxxxx.xxx') AttributeError: 'module' object has no attribute 'SMTP' I beg to differ, it most certainly does. Right? :)
134
7913
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that means that if I misspell a variable name, my program will mysteriously fail to work with no error message. If you don't declare variables, you can inadvertently re-use an variable used in an enclosing context when you don't intend to, or
0
2299
by: Loui Mercieca | last post by:
Hi, I have an Asp.net project and when I am trying to copy a project, using a FrontPage access method, I am receiving the following error: Unable to create Web project 'project name'. There is no web named"". Can somebody help me on this one??? Thanks,
4
4426
by: Ying Lu | last post by:
Hello, I have a table named "USER" under MySQL database. When I am trying to move tables from MySQL to PostgreSQL, I found that I could not create a table namely "USER". I guess "USER" is a key string used by PostgreSQL system so that we could not create a table named "USER". Is that true? Thanks a lot, Emi Lu
2
1316
by: Gabriele *darkbard* Farina | last post by:
Hi, I'm using Python 2.5 to develop a simple MVC framework based on mod_python. To load my controllers, I create new modules using the "new" module like this: # .... my_module = new.module("random_name") my_module.__file__ = module_path
0
2116
by: Robert Dailey | last post by:
I created a basic python file and made an attempt to execute it from the command line, however it gives me a weird error after the python file has been executed: Traceback (most recent call last): File "C:\Python25\lib\runpy.py", line 87, in run_module raise ImportError("No module named " + mod_name) ImportError: No module named compile.py
2
27775
by: whitsey | last post by:
Trying to concatenate two fields into one however I seem unable to do so. All I want is to execute the following SELECT MONTH(L.DATE) ||' '|| YEAR(L.DATE) as MTH_OF_YEAR FROM LOG L But I get this error:
1
4354
by: Prof Rodney Coates | last post by:
Although I have been using Macs for a quarter of a century and was doing scientific programming in the '60's I am VERY new to Python on the Mac. I have been writing some very simple applications and running them using IDLE. To start with the applications worked OK. However, as time has progressed, the error message "ImportError: No module named ****" has been generated with increasing frequency. It has now become impossible to use Python...
2
3771
by: emallove | last post by:
I'm running into the below "No modules named _sha256" issue, with a python installed in a non-standard location. $ python Python 2.5.2 (r252:60911, May 20 2008, 09:46:50) on linux2 Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/ws/ompi-tools/lib/python2.5/md5.py", line 6, in <module>
4
7564
by: Daniel | last post by:
Hello, I'm trying to build a very simple IPC system. What I have done is create Data Transfer Objects (DTO) for each item I'd like to send across the wire. I am serializing these using cPickle. I've also tried using pickle (instead of cPickle), but I get the same response. Below is the code. I'll put the rest of my comments after the code
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10222
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.