> I was unable to figure out to get the button to work on
> register-leo.leox, so I built another script:
> register-leo-elevated.leox: a wrapper which runs register-leo.leox
> after asking for UAC Elevation. I don't like splitting it into 2 files
> like this, but at least it works. I'm sure there's room for
> improvement. :)
>
...like making a single general purpose elevation script which can be fed
any python script, not relying on Leo at all. r5182 -3 introduces
`elevate.py` (and removes the wrapper mentioned above), which:
''' Open a new python intepreter after asking for elevated UAC permissions,
and feed it the python script specified on the command line.
python elevate.py d:\full\path\to\some-script.py {args for some-script}
'''
At one point I had a version which also accepted python commands on the
command line: `python elevate.py -c "print 40+2"`, but that's not working
now. I think because the quotes don't get passed all the way through to the
end interpreter properly.
The fact that I couldn't find any ready made python privilege escalation
tools leaves me thinking this whole line of inquiry must have something
truly weird about it, that I'm climbing the mountain instead of using the
track running over the pass, just a few metres off to the right. Still,
having followed the goats up and over the scree I do see the valley below
on the other side, so am nearing my destination in any case. :)
cheers,
-matt
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.