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

[Python] [Announce] PyGooCanvas 0.10.0

2008-05-01 Per discussione Gian Mario Tagliaretti
I am pleased to announce version 0.10.0 of the Python bindings for Goocanvas. It is available at: https://developer.berlios.de/projects/pygoocanvas/ The bindings are updated with the new Goocanvas API PyGooCanvas 0.10.0 (May 01 2008) == o Install a .pc file (Gustavo) o A

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 = (

[Python] Parsing output dei comandi

2008-05-01 Per discussione Mattia
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 => 'DVDVIDE