3

I have just started trying to automate the steps am trying to automate the steps listed in the Bad Blocks HOWTO for reallocating damaged sectors of a hard drive (after some unfortunate events).

Unfortunately, the method that I have so far is to use a pipe with programs from the e2fsprogs package and parse its output, which I think is not a robust solution to the problem.

To avoid such parsing, I tried to find python bindings for e2fslibs (the libraries that e2fsprogs use), but I was not successful in my quest.

So, short from me implementing the bindings myself (and contributing them back) or implementing parsing the output of the programs that I need the right way, are there any python bindings already available for this task?

rbrito
  • 2,398
  • 2
  • 21
  • 24

1 Answers1

0

You can try accessing them using ctypes. Depending on what you want to do, it might get a lot of work...

glglgl
  • 89,107
  • 13
  • 149
  • 217