473,548 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Pythoncom and pywintypes

En Wed, 27 Aug 2008 21:17:22 -0300, Vistro <vi****@vistro. netescribi�:
Hey, there. I've been coding in python for about three weeks now. I have
made basic games, tools to check forum PMs for me, and other general
utilities with python, but I'm now encountering problems.

http://ubuntuforums.org/archive/index.php/t-511211.html

I want to do that, and I have installed both sets needed from source
forge,
but I always get this issue when I run the code, and there isn't a single
listing on the internet that addresses this.

****

Traceback (most recent call last):
File "C:/Documents and Settings/Guest Editor/Desktop/key.py", line 3,
in
<module>
import pythoncom
File "C:\Python25\li b\site-packages\python com.py", line 2, in <module>
import pywintypes
ImportError: No module named pywintypes

I've installed pythoncom right from the box. I don't know whats wrong,
but
I'm sure it has something to do with my stupidity.
Reinstalling the pywin32 package should fix that, I presume.
BUT, here is the strangest part.

# Magic utility that "redirects" to pythoncomxx.dll
import pywintypes
pywintypes.__im port_pywin32_sy stem_module__(" pythoncom", globals())
That is ALL that pythoncom.py seems to be. ALL that.

I think that it's trying to import something, THEN tell the interpreter
where it is. That seems kinda stupid.
In fact that __import_whatev er function does a rather complex task, it
must ensure that the *right* pywintypes25.dl l (or pythoncom25.dll ) is
loaded, even when it's implicitely loaded.

--
Gabriel Genellina

Aug 28 '08 #1
0 1694

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

Similar topics

2
17639
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
3
12289
by: Paul | last post by:
Hi I'm trying to build a standalone COM exe server using Python 2.2 + Mark Hammond's windows extensions + Py2Exe. I've built the example linked on the Py2Exe homepage and get this error when running the exe: I:\Program Files\Python22\dist\comtest>comtest --register Traceback (most recent call last): File "<string>", line 37, in ? File...
0
1540
by: Ashley | last post by:
I have quite a few COM servers implemented using Visual C++ 6.0 and I'm having trouble accessing all of them via Python. The problem is with the default being set to pythoncom.Empty while my servers require pythoncom.Missing. According to this article: http://mailman.pythonpros.com/pipermail/pycom-dev/1999q2/000127.html compatibility with...
2
5977
by: John J. Lee | last post by:
Dear, I have problems when I get the IDispatch with pythoncom.connect(). When I called the 'Excel.Application' with it, it worked. (At least I can see the pythoncom.connect() is working for the well-designed COM like Excel.) When I called my COM module which was derived from IDispatch interface, the pythoncom.connect() issued error like...
5
3959
by: Brian Hlubocky | last post by:
I'm have a fairly simple (in terms of COM) python program that pulls info from an Access database and creates Outlook contacts from that information. It uses wxPython for gui and works without problems. I want to be able to distribute this program using py2exe, but I am having some problems. I am using a simple setup.py like in the...
0
2090
by: Olaf Meding | last post by:
How does Python (version 23 on Windows) know what to import? I could not find a file or directory named "pythoncom". import pythoncom help(pythoncom) FILE c:\windows\system32\pythoncom23.dll Obviously Python knows to which DLL to load, but the DLL has a different name (pythoncom versus pythoncom32.dll). So how does this
1
8710
by: Lucas Machado | last post by:
I'm using the win32 api to map samba shares, and I'm having trouble handling some exceptions. In my script there are 2 possible exceptions when the script attempts to map a share: >>> win32net.NetUseAdd(None, 1, {'remote':r'\\foo\bar','local':'X Traceback (most recent call last): File "<stdin>", line 1, in ? pywintypes.error: (53,...
1
3727
by: fraca7 | last post by:
Hello. I got a little problem while using pythoncom to automate IE; for some reason, changing the 'selectedIndex' on an instance of IHTMLSelectElement doesn't fire the 'onchange' event (I guess this is a bug in mshtml). So, I tried to get the 'onchange' event handler and call it myself. According to the docs, this is a simple IDispatch...
6
2738
by: gcmartijn | last post by:
H! I using a script that opens a internet page in a small window (what I can control) In XP everything was working fine, but now I'm using Vista with IE7 and this is what happends now: First a small window opens at the postion x0 y0 (like I want) but then IE thinks "Hey lets open a other main window too". And that window opens the url...
0
7512
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7438
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...
0
7951
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3495
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...
0
3475
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
751
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...

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.