Вы почти наверняка захотите поместить их в список:
kennel = []
for name in dog_names:
kennel.append(info(name,
random.randint(1, 5),
random.randint(1, 100),
random.randint(1, 10),
random.randint(1, 10)))
Когда вы закончите этот цикл, у вас будут все ваши собаки info
объекты в этом списке, и вы можете удобно переберите этот список.
for dog in kennel:
...
Я полагаю, что можно использовать команду "FC" и затем проверить errorlevel. Вот некоторый код:
@echo off
:main
fc c:\filename r:\filemame > nul
if errorlevel 1 goto error
:next
echo insert next CD
pause
goto main
:error
echo failed check
(Вытянутый от http://www.computing.net/answers/dos/batch-file-command/15753.html )
Кажется, что программа АККОМПАНЕМЕНТА на самом деле довольно проста в использовании. См. этот вопрос на ответах Yahoo.
Примечание, что выполнение comp /?
распечатает текст справки для программы (как делает определение /?
спор с любой собственной программой командной строки Windows). Это производит тот же текст, который Вы видите в ответе вопроса, связанного выше.
Содержание из Ответа Yahoo:
C:\>comp /?
Compares the contents of two files or sets of files.
COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C] [/OFF[LINE]]
data1 Specifies location and name(s) of first file(s) to compare.
data2 Specifies location and name(s) of second files to compare.
/D Displays differences in decimal format.
/A Displays differences in ASCII characters.
/L Displays line numbers for differences.
/N=number Compares only the first specified number of lines in each file.
/C Disregards case of ASCII letters when comparing files.
/OFF[LINE] Do not skip files with offline attribute set.
To compare sets of files, use wildcards in data1 and data2 parameters.