How do I start a .chm help file from my app?

1 view
Skip to first unread message

Marcus Stojek

unread,
Oct 10, 2003, 5:25:29 AM10/10/03
to wxPytho...@lists.wxwindows.org
Hi,

simple question. I have created a chm help file that I want
to start when the >help< button of my menubar is pressed.
(Windows)
How? I have tried spawn.. and execv.. without success.

thanks
marcus

www.stani.be

unread,
Oct 10, 2003, 8:33:03 AM10/10/03
to wxPytho...@lists.wxwindows.org
In spe (http://spe.pycs.net) I do it with the
webbrowser module...

import sys,webbrowser
if sys.platform='win32':
webbrowser.open('help.chm')
else:
webbrowser.open('help.html')

Stani


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

Thomas Heller

unread,
Oct 10, 2003, 6:34:36 AM10/10/03
to wxPytho...@lists.wxwindows.org, sto...@part-gmbh.de
"Marcus Stojek" <sto...@part-gmbh.de> writes:

os.startfile("myhelp.chm")

Thomas


Mike Wagman

unread,
Oct 10, 2003, 8:21:24 PM10/10/03
to wxpython list
I am writing a small "puzzle/strategy game". When it button is pressed
it runs the human players move, and then checks for AI's and runs them.
If I run a game with all AI's none of my calls to SetLabel ever take
effect. I believe it's because those are happening from a routine that
never exists that is called from within the event.

How do I reseove this. While it's unlikly someone will just play all
AI's it is useful for debugging ourposes.


Robin Dunn

unread,
Oct 10, 2003, 8:37:29 PM10/10/03
to wxPytho...@lists.wxwindows.org

You have to allow program control to return from the event handlers to
the MainLoop in order for screen updates and other things to occur.
Your AI loop probably needs to be unrolled and invoked one step at a
time from a timer or perhaps an EVT_IDLE handler. Each step should do
its thing and then return.


--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Mike Wagman

unread,
Oct 11, 2003, 7:33:31 AM10/11/03
to wxpython list
Need to figure out one more thing, how do I force an evt_idle event. But
thanks EVT_Idle seems to work well. However when the mouse is not moving
I am not calling the routine.

I am using this from a notebook window so I don't know if that is part
of the issue. It looks very promising at this point.
Thanks
Mike

John Hoffman

unread,
Oct 11, 2003, 11:48:31 AM10/11/03
to wxPytho...@lists.wxwindows.org
Hi folks. I need your help.

I maintain an experimental modded version of the BitTorrent reference
client at http://bt.degreez.net . For the past few weeks I've been
chasing a bug that seems to be corrupting data downloaded by the
client. It is very elusive, only striking certain Windows-based
machines (and not me directly, which certainly doesn't help my debugging
efforts), and doesn't seem to be related to the operating system
version (98, XP, etc) or disk format. One user who's been plagued by
the problem recently reported an application error; ' The instruction at
"0x1e041568" referenced memory at "0x05000054". The memory could not be
"read". ' I suspect a problem with certain system DLLs being accessed
via wxWindows.

I would appreciate if:

1. Someone could get me a list of the system DLLs wxWindows accesses in
its performance, so I can gather information about them and try to
correlate them with users with the problem.

2. Someone would go over my source code and make sure I'm not doing
something that's causing the window-building to go awry. The source is
available at
http://home.elp.rr.com/tur/BitTorrent-experimental-S-5.8.5.zip or
http://home.elp.rr.com/tur/BitTorrent-experimental-S-5.8.5.tar.gz and
the only file you'll need to audit is "btdownloadgui.py".

To anyone willing to help me, thanks in advance. :-)


Robin Dunn

unread,
Oct 11, 2003, 2:22:34 PM10/11/03
to wxPytho...@lists.wxwindows.org
Mike Wagman wrote:
> Need to figure out one more thing, how do I force an evt_idle event. But
> thanks EVT_Idle seems to work well. However when the mouse is not moving
> I am not calling the routine.

wxWakeUpIdle()

Robin Dunn

unread,
Oct 11, 2003, 2:22:41 PM10/11/03
to wxPytho...@lists.wxwindows.org
John Hoffman wrote:
> Hi folks. I need your help.
>
> I maintain an experimental modded version of the BitTorrent reference
> client at http://bt.degreez.net . For the past few weeks I've been
> chasing a bug that seems to be corrupting data downloaded by the
> client. It is very elusive, only striking certain Windows-based
> machines (and not me directly, which certainly doesn't help my debugging
> efforts), and doesn't seem to be related to the operating system
> version (98, XP, etc) or disk format. One user who's been plagued by
> the problem recently reported an application error; ' The instruction at
> "0x1e041568" referenced memory at "0x05000054". The memory could not be
> "read". ' I suspect a problem with certain system DLLs being accessed
> via wxWindows.
>
> I would appreciate if:
>
> 1. Someone could get me a list of the system DLLs wxWindows accesses in
> its performance, so I can gather information about them and try to
> correlate them with users with the problem.

Get a copy of DependencyWalker from http://www.dependencywalker.com/ and
run it on wxc.pyd.

John Hoffman

unread,
Oct 11, 2003, 2:44:30 PM10/11/03
to wxPytho...@lists.wxwindows.org

>> I would appreciate if:
>>
>> 1. Someone could get me a list of the system DLLs wxWindows accesses
>> in its performance, so I can gather information about them and try to
>> correlate them with users with the problem.
>
>
> Get a copy of DependencyWalker from http://www.dependencywalker.com/
> and run it on wxc.pyd.


GREAT tip. Thanks!


Tim Roberts

unread,
Oct 13, 2003, 1:07:25 PM10/13/03
to wxPytho...@lists.wxwindows.org
On Sat, 11 Oct 2003 09:48:31 -0600, John Hoffman <thes...@shambala.net>

wrote:
>
>Hi folks. I need your help.
>
>I maintain an experimental modded version of the BitTorrent reference
>client at http://bt.degreez.net . For the past few weeks I've been
>chasing a bug that seems to be corrupting data downloaded by the
>client. It is very elusive, only striking certain Windows-based
>machines (and not me directly, which certainly doesn't help my debugging
>efforts), and doesn't seem to be related to the operating system
>version (98, XP, etc) or disk format. One user who's been plagued by
>the problem recently reported an application error; ' The instruction at
>"0x1e041568" referenced memory at "0x05000054". The memory could not be
>"read". ' I suspect a problem with certain system DLLs being accessed
>via wxWindows.

1e041568 is inside python23.dll, somewhere around the PyArg_* and
PyObject_GC_* handlers. Maybe an argument issue in the Python/C
interface, or a garbage collection problem.

Have you used Dr. Watson to try to get a traceback?
--
- Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

John Hoffman

unread,
Oct 13, 2003, 1:16:17 PM10/13/03
to wxPytho...@lists.wxwindows.org

>>I maintain an experimental modded version of the BitTorrent reference
>>client at http://bt.degreez.net . For the past few weeks I've been
>>chasing a bug that seems to be corrupting data downloaded by the
>>client. It is very elusive, only striking certain Windows-based
>>machines (and not me directly, which certainly doesn't help my debugging
>>efforts), and doesn't seem to be related to the operating system
>>version (98, XP, etc) or disk format. One user who's been plagued by
>>the problem recently reported an application error; ' The instruction at
>>"0x1e041568" referenced memory at "0x05000054". The memory could not be
>>"read". ' I suspect a problem with certain system DLLs being accessed
>>via wxWindows.
>>
>>
>
>1e041568 is inside python23.dll, somewhere around the PyArg_* and
>PyObject_GC_* handlers. Maybe an argument issue in the Python/C
>interface, or a garbage collection problem.
>
>Have you used Dr. Watson to try to get a traceback?
>

Like I said, I've never experienced the problem myself; I've only gotten
reports from users. Further, these users almost never get that sort of
application crash; more often this manifests as data corruption. If
someone could give me some direction as to how to include debugging code
in with my distribution, I'd appreciate it...


Gilad Suberri

unread,
Oct 13, 2003, 3:29:06 PM10/13/03
to wxPytho...@lists.wxwindows.org
I am having trouble getting the wxEVT_WIZARD_FINISHED to work properly. For
some reason, when the user presses the finish button, this function never
gets called. Anybody run into the same thing?

Gilad

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-user...@lists.wxwindows.org
> For additional commands, e-mail: wxPython-...@lists.wxwindows.org
>


Robin Dunn

unread,
Oct 13, 2003, 4:51:56 PM10/13/03
to wxPytho...@lists.wxwindows.org
[if you are going to start a new subject then please make a new email,
not a reply]


Gilad Suberri wrote:
> I am having trouble getting the wxEVT_WIZARD_FINISHED to work properly. For
> some reason, when the user presses the finish button, this function never
> gets called. Anybody run into the same thing?

A quick tweak to the demo shows that it is working here.

Gilad Suberri

unread,
Oct 15, 2003, 4:27:36 PM10/15/03
to wxPytho...@lists.wxwindows.org
I tweaked my demo to look like this:
EVT_WIZARD_PAGE_CHANGED(self, self.ID_wiz, self.OnWizPageChanged)
EVT_WIZARD_PAGE_CHANGING(self, self.ID_wiz, self.OnWizPageChanging)
EVT_WIZARD_CANCEL(self, self.ID_wiz, self.OnWizCancel)
EVT_WIZARD_FINISHED(self, self.ID_wiz, self.fin)

def fin(self,evt):
self.log.write("OnFinished")

and updated my system to Python 2.2.3 with wxPython 2.4.2.4 on my PC. For
some reason it still doesnt work, but works on my Solaris install of Python
2.2.3 with wxPython2.4.1.2. Am I missing something stupid? Thanks.

Gilad


----- Original Message -----
From: "Robin Dunn" <ro...@alldunn.com>
To: <wxPytho...@lists.wxwindows.org>

Robin Dunn

unread,
Oct 15, 2003, 10:12:44 PM10/15/03
to wxPytho...@lists.wxwindows.org
Gilad Suberri wrote:
> I tweaked my demo to look like this:
> EVT_WIZARD_PAGE_CHANGED(self, self.ID_wiz, self.OnWizPageChanged)
> EVT_WIZARD_PAGE_CHANGING(self, self.ID_wiz, self.OnWizPageChanging)
> EVT_WIZARD_CANCEL(self, self.ID_wiz, self.OnWizCancel)
> EVT_WIZARD_FINISHED(self, self.ID_wiz, self.fin)
>
> def fin(self,evt):
> self.log.write("OnFinished")
>
> and updated my system to Python 2.2.3 with wxPython 2.4.2.4 on my PC. For
> some reason it still doesnt work, but works on my Solaris install of Python
> 2.2.3 with wxPython2.4.1.2. Am I missing something stupid? Thanks.
>

No, I tested on Linux before. When I do the same on Windows then I also
don't get the event. I've responded to a similar message in wx-users
with a patch to show the problem. It should get fixed for the next release.

Reply all
Reply to author
Forward
0 new messages