WIN32 questions

Mark Hammond MarkH at ActiveState.com
Tue Oct 24 23:39:05 EDT 2000


"Drew Whitehouse" <Drew.Whitehouse at anu.edu.au> wrote in message
news:wly9zdwudv.fsf at anu.edu.au...

> I want to have a win2k system startup (and shutdown) a full-screen
GUI
> program on a dozen other win2k systems. Can I do this without having
> the operator logon to each of the systems manually (it's a kiosk
like
> facility) ? Should I be using an NT Service ?

The easiest way is to set the registry to auto logon.  This is quite
simple, and documented at the MS site.  "autoadminlogon" is the key
name IIRC, which may help your search.

A service wont really do what you want in the general case.

> Is there a way to trap the closing of a window from a command line
> python program ? ie a user double clicks on a python app icon, it
runs
> continuously in a console window and eventually they hit the kill
> button. (try: .. finally: .. doesn't handle this). I need to do

Nope.  You should wrap it in a simple GUI, like Tkinter.  This will
allow you to do this.  Alternatively, you could use a taskbar icon
program - you should find a demo that uses win32gui for this.

> I notice that win32com clients that don't exit normally don't
properly
> cleanup server instances ie there is a pythonw.exe left running in
the
> background (motivation for the previous question). How do I
clean-out
> these orphaned instances ?

There is no support in win32com for brutally closing objects.  You
have to ensure that the Python objects are cleaned up normally.  The
user killing the process will be a problem, and I'm not sure what to
do about that (other than wrapping it in a GUI).

Mark.






More information about the Python-list mailing list