473,687 Members | 3,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I've broken PythonWin2.4 - Dialogs don't pop up!

I have broken PythonWin and I don't know how or why. It worked great
until recently. I have installed / removed several apps since it worked
last. I could have a virus unknown to my antivirus program, I guess.
I'm stumped.
---------- The Symptoms ---------------------

Here's what happens. I fire up PythonWin without opening a python file.
Everything looks good - the interactive window is at the bottom of the
main dialog and I can type python code into it and it seems to work
fine. But if I select anything from the menu or toolbar that requires a
new dialog box to pop up, either:

1. Nothing happens - it acts like it popped up the dialog, but it's not
there. At least I can't see it.

2. I get an error down in the interactive window

3. I get a windows error telling me that the program is now going to

4. PythonWin just disappears off my screen - all the processes seem to

Note: Sometimes I can't even get a menu item to respond, but that's not
very often.

--------- Examples -----------------

Example #1. If I select "Edit Python Path" I get the following message
in the interactive window:
Failed to execute command:

from pywin.tools import regedit;regedit .EditRegistry()
Traceback (most recent call last):
"C:\Python24\Li b\site-packages\python win\pywin\frame work\toolmenu.p y",
line 103, in HandleToolComma nd
exec "%s\n" % pyCmd
File "<string>", line 1, in ?
"C:\Python24\Li b\site-packages\python win\pywin\tools \regedit.py", line
323, in ?
template = RegTemplate()
"C:\Python24\Li b\site-packages\python win\pywin\tools \regedit.py", line
245, in __init__
docview.DocTemp late.__init__(s elf, win32ui.IDR_PYT HONTYPE, None,
SplitterFrame, None)
File "C:\Python24\Li b\site-packages\python win\pywin\mfc\d ocview.py",
line 71, in __init__
self._SetupShar edMenu_()
File "C:\Python24\Li b\site-packages\python win\pywin\mfc\d ocview.py",
line 74, in _SetupSharedMen u_
sharedMenu = self.GetSharedM enu()
win32ui: The template has no menu
Example #2. If I try to open a file by selecting "open" from the "file"
menu or by hitting the icon on the toolbar, I almost always get the
behavior in which it acts like the File Open dialog box was displayed,
but it's not.

Example #3. If I hit the "?" icon on the toolbar, I get the following
error message:

File "C:\Python24\Li b\site-packages\python win\pywin\frame work\app.py",
line 307, in OnHelpAbout
win32ui.InitRic hEdit()
win32ui: AfxInitRichEdit failed
win32ui: Error in Command Message handler for command ID 57664, Code 0

------------- Here's what I know --------------

My Machine:

+ I am on WinXP-Pro using Python 2.4:

+ In the interactive Window this is what is says: PythonWin 2.4 (#60,
Feb 9 2005, 19:03:27) [MSC v.1310 32 bit (Intel)] on win32.

+ The first item in my PATH env variable is: C:\Python24\.

+ From the PythonWin About box: Python 2.4 pywin32 extensions (build

+ In my system registry, In HKEY_LOCAL_MACH INE\SOFTWARE\Py thon, I have
one entry: PythonCore and it has two sub-entries: 2.3 and 2.4.
Everything looks similar between the two and the registry data for
Python2.4 seems fine:

InstallPath = c:\Python24\
InstallGroup = ActiveState ActivePython2.4
PythonPath = C:\Python24\Lib ;C:\Python24\DL Ls;C:\Python24\ Lib\lib-tk
The only dialog box that always correctly pops up is the About box from
the help menu.

I have Python 2.3 installed in an adjacent directory to my 2.4 version.
I can go down into the Python2.3 directories to PythonWin, which is
actually ver 2.3.4, and fire up PythonWin and I don't have any of these

After I have a problem with PythonWin2.4 I notice weird UI behavior
from my other apps until I kill PythonWin.
Any ideas?



Jul 18 '05 #1
3 1657
Michael Murdock:
I have broken PythonWin and I don't know how or why. It worked great
until recently. I have installed / removed several apps since it worked
last. I could have a virus unknown to my antivirus program, I guess.
I'm stumped.

You have tried rebooting? PythonWin can be upset by another non-
responding application. A simple thing to try is to remove and reinstall
in case you have modified one of the files in Pythonwin.

Jul 18 '05 #2
Rebooting does not help. I uninstalled and removed everything from
c:\python2.4 and then downloaded and installed the latest version.
Right after installing it, everything worked fine. But when I rebooted,
the problem came back. Sigh...


Jul 18 '05 #3
Michael Murdock:
Rebooting does not help. I uninstalled and removed everything from
c:\python2.4 and then downloaded and installed the latest version.
Right after installing it, everything worked fine. But when I rebooted,
the problem came back.

Do you have a copy of win32ui.pyd on the system path?

Jul 18 '05 #4

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

Similar topics

by: sebastien maraux | last post by:
Hello NG, I would like to display dialogs such as CDialog and CMenu in fullscreen exclusive mode. I noticed that CMenu always display under openGL drivers (my app is a 3D Renderer window) but seldomly under DirectX 8. Also, even by calling SetForegroundWindow or SetFocus, I don't manage to display a CDialog in foreground of my FS app.
by: Sean Burns | last post by:
Hello, does anybody know how to open a dialog window in opera? I use window.showModalDialog(....) for IE but Opera says "Expression did not evaluate to a function object: window.showModalDialog" Thanks. Sean.
by: Egbert Nierop \(MVP for IIS\) | last post by:
When I build some add-ins for the management console using C++, the add-ins made by me show a Win2000 interface while the rest of the add-ins made by MS are using XP themes. What am I missing? Cheers
by: Tony Johansson | last post by:
Hello! Assume I have 10 dialogs and these will be written in winforms C++.NET. Assume also that 30 % of these 10 dialogs are identical. What kind of component would be suitable to avoid to duplicate the identical code in all these 10 dialogs. I mean that this component should just contain this 30% and should be used in these 10 dialogs.
by: ljlevend2 | last post by:
I'm implementing the WebBrowser control in my app and I would like to be able to show the Add to Favorites and Organize Favorites dialogs that are used in Internet Explorer. Is this possible? Thanks, Lance
by: dwelch91 | last post by:
I'm trying unsuccessfully to do something in Tk that I though would be easy. After Googling this all day, I think I need some help. I am admittedly very novice with Tk (I started with it yesterday), so I am sure I am overlooking something simple. The basic idea is that my application will consist of a series of modal dialogs, that are chained together in "wizard" fashion. There will be some processing in between dialogs, but for the most...
by: hash | last post by:
Hello! I recently ported my project from VC6 to VC8. But while executing them I found that dialogs have not changed to XP style. These dialogs are being shown with same WIN98 style. However in an editor, dialogs are being shown with XP style only. Is there anything I need to do to get XP style dialogs. Thanks.
by: tbarto | last post by:
Hello, For some time I have been working on an application where a part of the solutuion is a class that is able to find all the system dialogs ( eg. openFileDialog ) that are currently open. Dependently on the system regional settings, the captions of such dialogs differ (e.g "Open" for en-En and "Otwieranie" for pl-Pl ). I neet do know what is the exact caption for the current system. To be more detailed I need to find a solution that...
by: vbdummy | last post by:
I am not able to use Dialogs.Item(wdDialogFileOpen) because of the way I'm using word inside of another application. The code below works outside of the application but not in it: Sub FileInsert() ChangeFileOpenDirectory _ "F:\Some\Folder\OnThe\Network" With Dialogs.Item(wdDialogFileOpen) .Name = "*.doc" If .Display = -1 Then
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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,...
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...
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...
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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...
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.