getting data off a CDrom

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • julien.lord@gmail.com

    #1

    getting data off a CDrom

    Hi there,

    I'm trying to load data from 2 different CD drives to compare the data
    on them to see if they are identical. I've found the WinCDRom module
    online but it doesn't seem to give access to the data at all. The only
    thing it seems to do is check if there is a readable cd in a specific
    drive.

    Any ideas/suggestions/flames?

    Thanks,

    Julien

  • Irmen de Jong

    #2
    Re: getting data off a CDrom

    julien.lord@gma il.com wrote:[color=blue]
    > Hi there,
    >
    > I'm trying to load data from 2 different CD drives to compare the data
    > on them to see if they are identical. I've found the WinCDRom module
    > online but it doesn't seem to give access to the data at all. The only
    > thing it seems to do is check if there is a readable cd in a specific
    > drive.
    >
    > Any ideas/suggestions/flames?[/color]

    If you're on Linux this should do the trick, i think:

    $ cmp /dev/scd0 /dev/scd1


    --Irmen

    Comment

    • Larry Bates

      #3
      Re: getting data off a CDrom

      julien.lord@gma il.com wrote:[color=blue]
      > Hi there,
      >
      > I'm trying to load data from 2 different CD drives to compare the data
      > on them to see if they are identical. I've found the WinCDRom module
      > online but it doesn't seem to give access to the data at all. The only
      > thing it seems to do is check if there is a readable cd in a specific
      > drive.
      >
      > Any ideas/suggestions/flames?
      >
      > Thanks,
      >
      > Julien
      >[/color]
      The two CDROMs should show up with drive letters attached (Windows) on
      your machine. Just open the files on both machines as you would any other
      file:

      fp1=open(r'D:\f ilename1', 'r')
      fp2=open(r'E:\f ilename2', 'r')

      You could:

      1) use md5 to calculate checksums on both files and compare

      or

      2) you could use difflib instead see:

      Source code: Lib/difflib.py This module provides classes and functions for comparing sequences. Most of them compare sequences of text lines (for example lists of strings, or file objects) and prod...


      difflib probably works best if the files are text files.

      3) do something custom to compare the files, but I would
      try 1) and 2) first.

      Larry Bates

      Comment

      Working...