Ciao a tutti,
vorrei catturare l'output di un comando del tipo:
our %lsdvd = (
device => '/dev/dvd',
title => 'CLOCKWORK_ORANGE_D4_4X3_MATTED',
vmg_id => 'DVDVIDEO-VMG',
provider_id => 'WARNER HOME VIDEO',
track => [
{
ix => 1,
length => 7868.060,
vts_id => 'DVDVIDEO-VTS',
vts => 1,
ttn => 1,
fps => 25.00,
format => 'PAL',
aspect => '4/3',
width => 720,
height => 576,
df => '?',
},
{
ix => 2,
length => 12.020,
vts_id => 'DVDVIDEO-VTS',
vts => 1,
ttn => 2,
fps => 25.00,
format => 'PAL',
aspect => '4/3',
width => 720,
height => 576,
df => '?',
},
{
ix => 3,
length => 60.000,
vts_id => 'DVDVIDEO-VTS',
vts => 1,
ttn => 3,
fps => 25.00,
format => 'PAL',
aspect => '4/3',
width => 720,
height => 576,
df => '?',
},
],
longest_track => 1,
);
Mi piacerebbe poter avere i dati strutturati nello stesso modo, cioè
avere una stringa device = '/dev/dvd', una lista di dizionari track,
ecc..
Sto provando con split ma con risultati scadenti.
Ci sono degli strumenti adatti allo scopo?
Grazie,
Mattia.
_______________________________________________
Python mailing list
[email protected]
http://lists.python.it/mailman/listinfo/python