Re: [Python] [OT] Tester per espressioni regolari

2014-02-05 Per discussione Roberto Preziusi
http://www.regexr.com/ -- rob ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] parsing config file

2013-11-25 Per discussione Roberto Preziusi
Il giorno 25 novembre 2013 16:34, Roberto Preziusi < roberto.prezi...@gmail.com> ha scritto: > sed -n '/address-set ABC_DEF/,/}' myfilename.conf avevo perso un pezzo, il cmd è : sed -n '/address-set ABC_DEF/,/}/p' myfilename.co

Re: [Python] parsing config file

2013-11-25 Per discussione Roberto Preziusi
Il giorno 22 novembre 2013 20:55, Daniele Varrazzo ha scritto: > > Domanda mia: ve lo siete inventati voi quel formato? > > Perchè state reinventando l'acqua calda: non dovreste scrivere un nuovo > parser se potete usare un linguaggio diverso. Quale? Ce ne sono a > tonnellate pronti per essere us

[Python] parsing config file

2013-11-22 Per discussione Roberto Preziusi
Ciao, avrei bisogno di effettuare il parsing di un file così composto: ... address-set ABC_DEF { address ABC_PRO_1; address BCD_PRO_IP2; address AAA_ABC; address FFF_CHCD; } ...

Re: [Python] print question

2012-02-27 Per discussione Roberto Preziusi
Il giorno 26 febbraio 2012 18:48, Marco Mariani ha scritto: > > >>> g.encode('hex') > 'a0' > >>> Grazie, a questo non avevo pensato! Provero' e vi farò sapere. Saluti -- Preziusi Roberto ___ Python mailing list Python@lists.python.it http://lists.pyt

Re: [Python] print question

2012-02-26 Per discussione Roberto Preziusi
Il giorno 26 febbraio 2012 18:01, Carlo Miron ha scritto: > 2012/2/26 Roberto Preziusi : > >>>> print "come faccio a stampare g='a0'?" > > come faccio a stampare g='a0'? > in effetti mi rendo conto di non esser stato molto chiar

[Python] print question

2012-02-26 Per discussione Roberto Preziusi
>>> g '\xa0' >>> s = "A0" >>> g = s.decode("hex") >>> print g � >>> g '\xa0' >>> print "come faccio a stampare g='a0'?" come faccio a stampare g='a0'? >>> ::) -- Preziusi Roberto ___ Python mailing list Python@lists.python.it http://lists.python.it/mai

Re: [Python] string replace

2011-10-07 Per discussione Roberto Preziusi
On 10/07/2011 02:30 PM, Marco Beri wrote: >> Scusa ma la GPL non è ferma alla versione 3? scusate. è stato ovviamente un "errore di sbaglio" bye -- Preziusi Roberto ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/p

Re: [Python] string replace

2011-10-07 Per discussione Roberto Preziusi
On 10/07/2011 08:54 AM, Alessandro Dentella wrote: > In aggiunta ricorda che la sitassi delle regexp di python copia quella di > perl (aggiungendo alcuni elementi) non quella di sed. > > > >>> re.sub(r"(..)", r"\1:", "00A1B2AABBCC")[:-1] > come vedi qui Daniele ha scritto "(..)", non "\(..\)"