Scanning through Windows registry...

Lie Lie.1296 at gmail.com
Fri May 16 15:06:22 EDT 2008


On May 9, 7:36 pm, Unknown Hero <unknown_hero... at hotmail.com> wrote:
> Ah, never mind, got it to work. Here's the code now. I hope I won't
> run into another problems later :D
>
> <code snippet>
> #Goes through all keys and subkeys in the selected hive (defined as
> root) and replaces the value 'old' with the value 'new'
> #
> #IMPORTANT! You should always back up the registry before attempting
> to modify it.
> #The author of this script CANNOT BE HELD RESPONSIVE for any damage
> caused by running this script.
(snip)

One thing though, the disclaimer should not said the author cannot be
held responsive, or you would be Windows that is not responsive all
the times. I think it should say "responsible".

I'm quite confused though, the code could be made simpler by dozens
using Python's high-level functionalities. Particularly the lengthy
code that checked whether the string contained a substring and replace
the substring with new could be done easily (and faster) using
python's in and replace function. I'll post the code later when I
finished checking places where the codes could be simplified, and I'll
also polish the entry code and a few other things (and pythonify the
code according to the PEP 8's guide lines).



More information about the Python-list mailing list