open and shut case
Erik Heneryd
erik at heneryd.com
Sun Sep 12 07:11:53 EDT 2004
More information about the Python-list mailing list
Sun Sep 12 07:11:53 EDT 2004
- Previous message (by thread): open and shut case
- Next message (by thread): open and shut case
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Elaine Jackson wrote: > Can python close a web-browser window it opened itself? The window in question > will be displaying a webpage that resides on the local computer, which is > running Windows 98. Knowing a way to do this would really help me out. Not easily. I guess something like this could work, if you have Mark Hammonds win32 extensions installed: (very untested) import os, win32api # start browser pid = os.spawnlp(os.P_NOWAIT, "iexplore.exe", "iexplore.exe", r"c:\blabla\hej.html") # ... # kill browser win32api.TerminateProcess(pid, 0) HTH Erik
- Previous message (by thread): open and shut case
- Next message (by thread): open and shut case
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list