Re: [Python] Parsing output dei comandi

2008-05-05 Per discussione Mattia
On Sun, 4 May 2008 16:15:32 +0200 "enrico franchi" <[EMAIL PROTECTED]> wrote: > 2008/5/1 Mattia <[EMAIL PROTECTED]>: > > > Vorrei provare questa strada. Se hai dei link da passare che hai > > trovato particolarmente interessanti... > > Io userei PLY. Ma mi sa che sono biased, eh. Stavo guarda

Re: [Python] Parsing output dei comandi

2008-05-04 Per discussione enrico franchi
2008/5/1 Mattia <[EMAIL PROTECTED]>: > Vorrei provare questa strada. Se hai dei link da passare che hai > trovato particolarmente interessanti... Io userei PLY. Ma mi sa che sono biased, eh. -- -enrico ___ Python mailing list Python@lists.python.it

Re: [Python] Parsing output dei comandi

2008-05-01 Per discussione Mattia
On Thu, 1 May 2008 18:21:08 +0200 "enrico franchi" <[EMAIL PROTECTED]> wrote: > On Thu, May 1, 2008 at 4:08 PM, Mattia <[EMAIL PROTECTED]> wrote: > > > Ci sono degli strumenti adatti allo scopo? > > Io prenderei in considerazione un mini-parser. E' roba che scrivi in > mezz'oretta per quel ling

Re: [Python] Parsing output dei comandi

2008-05-01 Per discussione Mattia
On Thu, 1 May 2008 21:27:35 +0200 Andrea Gasparini <[EMAIL PROTECTED]> wrote: > Confermo: e' (ahime') ben conosciuta sintassi Perl. In effetti l'output per Perl è pressoché identico a Python se non per dei ":". ___ Python mailing list Python@lists.pyth

Re: [Python] Parsing output dei comandi

2008-05-01 Per discussione Andrea Gasparini
> > Mi sembra strano però che sia più facile fare il parsing di un xml > > piuttosto che di un testo fatto apposta per python. > Il testo che hai mostrato non mi sembra fatto apposta per python: sembra > piu' ruby. Confermo: e' (ahime') ben conosciuta sintassi Perl. La cosa piu' comoda sarebbe u

Re: [Python] Parsing output dei comandi

2008-05-01 Per discussione enrico franchi
On Thu, May 1, 2008 at 4:08 PM, Mattia <[EMAIL PROTECTED]> wrote: > Ci sono degli strumenti adatti allo scopo? Io prenderei in considerazione un mini-parser. E' roba che scrivi in mezz'oretta per quel linguaggetto. -- -enrico ___ Python mailing list P

Re: [Python] Parsing output dei comandi

2008-05-01 Per discussione Daniele Varrazzo
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> X-Sender: [EMAIL PROTECTED] Received: from i-195-137-118-176.freedom2surf.net [195.137.118.176] with HTTP/1.1 (POST); Thu, 01 May 2008 18:07:48 +0200 User-Agent: RoundCube Webmail/0.1 Content-Type: text/plain; charset="

Re: [Python] Parsing output dei comandi

2008-05-01 Per discussione Mattia
On Thu, 01 May 2008 16:32:55 +0200 Daniele Varrazzo <[EMAIL PROTECTED]> wrote: > Questo e' un super-hack, ma: [snip] > fa esattamente quello che chiedi. Grazie per la risposta ma pensavo ci fosse qualcosa di più semplice. Ho visto che il comando (lsdvd, se interessa) converte l'output in xml. Qui

Re: [Python] Parsing output dei comandi

2008-05-01 Per discussione Daniele Varrazzo
On Thu, 1 May 2008 16:08:18 +0200, Mattia <[EMAIL PROTECTED]> wrote: > Ciao a tutti, > > vorrei catturare l'output di un comando del tipo: ... > Sto provando con split ma con risultati scadenti. > Ci sono degli strumenti adatti allo scopo? Questo e' un super-hack, ma: s = """our %lsdvd = (