[Jack]
> > What commands can I use to have the program know a certain key has
> > been pressed while another program is in focus?
[Luke]
> I think Pygame and TKInter have a capture-all-keys function, but this
> might also prevent the keypresses from actually going to the target
> application.
If
> way. so I need to tell my program to set the working directory back to the
> installation directory... but where is this?
>
Here's what I do in my py2exe app:
installDir = os.path.dirname(os.path.abspath(sys.argv[0]))
and take a look at this link:
http://www.py2exe.org/index.cgi/WhereAmI
H
[Kent wrote]
> > OK, none of my suggestions gets you closer to this...the simplest way is
> > if you can read the whole file into memory. Then you can just replace
> > the strings in place and write it out again. For example:
> >
> > oldPolicies = '''<<
> > /Policies <<
> >/PageSize 3
> > >>