Re: [Python] LISTE E RANDOM

2024-02-12 Per discussione Esalando Prassi
s=random.choice(naz_eur) > pro_cas=random.choice(pro_ita) > cas_fin=random.choice(reg_cas+pro_cas+naz_cas) > Da errore. Non so come fare > > Credo tu voglia fare qualcosa tipo: ``` random.choice(reg_ita + naz_eur + pro_ita) ``` Ciao! -- http://alepisa.blogspot.com Esalando Prassi

Re: [Python] Questo, da Python, non me lo sarei mai aspettato

2024-02-12 Per discussione Esalando Prassi
``` andrebbe cambiato in: ``` def permutazioni1(head, tail='', result=None): if result is None: result = [] ``` Ciao! -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it https://lists.python.it/mailman/listinfo/python

Re: [Python] Consiglio su web framework

2023-05-23 Per discussione Esalando Prassi
pappa pronta questo progetto e' molto interessante: - https://github.com/coleifer/sqlite-web Ciao! -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it https://lists.python.it/mailman/listinfo/python

Re: [Python] Eseguire file creapdf.py in Debian

2020-05-29 Per discussione Esalando Prassi
/usr/games:/usr/local/games:/snap/bin ``` Ciao! -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it https://lists.python.it/mailman/listinfo/python

Re: [Python] Spezzare una stringa lunga.

2020-03-04 Per discussione Esalando Prassi
On Wed, 4 Mar 2020 at 16:09, Mario Zema wrote: > > Dannati correttori... > Speravo non ve ne foste accorti... > > Rinnovo le scuse. > Perdonato, tra l'altro il typo ha fatto da esca per l'esimio! Saluti :) -- http://alepisa.

Re: [Python] Spezzare una stringa lunga.

2020-03-03 Per discussione Esalando Prassi
= "Istruzione per l'uso ed avvertenze \ > per la sicurezza..." > > Si può? > Il modo migliore che incontra di piu' il mio gusto estetico e': man = ( "Istruzione per l'uso ed avvertenze " &q

Re: [Python] Generare Screenshot automatici per pagine web

2019-09-26 Per discussione Esalando Prassi
che dovrei usarlo in un cron job che parte più volte al giorno, > non vorrei finestre che si aprono.. > > Qualche idea? > Proverei questo: - https://pypi.org/project/pyppeteer/ Si basa su https://try-puppeteer.appspot.com Ciao -- http://

Re: [Python] Break in un generatore

2018-07-26 Per discussione Esalando Prassi
iao! -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it https://lists.python.it/mailman/listinfo/python

Re: [Python] uso di str.format

2018-05-03 Per discussione Esalando Prassi
import pi >>> template = '{:.%df}' >>> [(template % i).format(pi) for i in range(5)] ['3', '3.1', '3.14', '3.142', '3.1416'] Se tieni a te stesso e a quelli che leggeranno il tuo codice in futuro prova cosi': >>>

Re: [Python] Differenza fra 2 orari.

2017-11-16 Per discussione Esalando Prassi
te.min, o2) >>> hours = delta.seconds // 3600 >>> minutes = int(delta.seconds % (hours*3600) / 60) >>> dt.time(hours, minutes) datetime.time(3, 30) Valuta tu se ti conviene gestirlo con un oggetto diverso da dt.time (che magari imple

Re: [Python] Interview per lavoro su python (e django)

2017-09-12 Per discussione Esalando Prassi
sta feature perche' domani potrebbe non esserci piu' e il modo sano di avere dizionari ordinati e' usare i collections.OrderedDict. Ciao -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it https://lists.python.it/mailman/listinfo/python

Re: [Python] come fare il mocking di urlopen

2017-08-18 Per discussione Esalando Prassi
2017-08-18 13:53 GMT+02:00 Pietro : > Ciao Alessandro, > > 2017-08-18 12:39 GMT+02:00 Esalando Prassi : >> On 18 August 2017 at 11:07, Pietro wrote: >>> Cosa sto sbagliando? come fare a far si che usi mock_urlopen? >>> >>> Al momento mi interessa far

Re: [Python] come fare il mocking di urlopen

2017-08-18 Per discussione Esalando Prassi
71416031c29451be8ce9b379bbe80b18eac/src/ploneintranet/microblog/tests/test_urlpreview.py#L35 Good luck! -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it https://lists.python.it/mailman/listinfo/python

Re: [Python] pythonpath mancante nelle virtualenv

2017-07-03 Per discussione Esalando Prassi
ualmente, tutto funziona > > (test) mauri@bison:~$ export > PYTHONPATH="/home/mauri/envs/test/lib/python3.5/site-packages/" > (test) mauri@bison:~$ python -c "import django" > (test) mauri@bison:~$ env > XDG_VTNR=7 > LC_PAPER=cs_CZ.UTF-8 > LC_ADDRESS

Re: [Python] protocollo x509 e web server

2017-05-11 Per discussione Esalando Prassi
ho usato curl per fare dei test). Tip per il testing. A volte, per vedere la richiesta sopa che genero, lancio il comando: nc -l 8000 (o la porta che vuoi) ed uso localhost:8000 come end point. Ciao. -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] Votazione Talk Europython 2017

2017-05-07 Per discussione Esalando Prassi
ks/plone-where-is-it-today-and-where-is-it-going Ciao! -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] Package scomparso da github

2017-04-30 Per discussione Esalando Prassi
3&q=django-wysiwyg-redactor&type= In bocca al lupo! -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] Dove pubblicare un sito in python (mantenendo anche il supporto a PHP)

2017-04-04 Per discussione Esalando Prassi
2017-04-04 11:23 GMT+02:00 Enrico Bianchi : > On 04/03/2017 11:18 PM, Esalando Prassi wrote: >> Come bug report non e' molto esaustivo. > Guarda, un find /usr -name pystone.py non ritorna nulla, facendo un yum > whatprovides "*/pystone.py" noto che si trova in un pac

Re: [Python] Dove pubblicare un sito in python (mantenendo anche il supporto a PHP)

2017-04-03 Per discussione Esalando Prassi
On 3 April 2017 at 22:06, Enrico Bianchi wrote: > On Thursday, March 30, 2017 8:41:19 AM CEST Esalando Prassi wrote: > >> ale@emily:~$ /usr/lib/python2.7/test/pystone.py > > File not found (e nemmeno sulla mia Fedora) > Come bug report non e' molto esaustivo. Se v

Re: [Python] Dove pubblicare un sito in python (mantenendo anche il supporto a PHP)

2017-03-29 Per discussione Esalando Prassi
:~$ /usr/lib/python2.7/test/pystone.py Pystone(1.1) time for 5 passes = 0.208602 This machine benchmarks at 239691 pystones/second ale@emily:~$ /usr/lib/python2.7/test/pystone.py 50 Pystone(1.1) time for 50 passes = 2.02856 This machine benchmarks at 246480 pystones/second Grazie! -- http:

Re: [Python] Comandi diversi per branch diversi

2017-03-03 Per discussione Esalando Prassi
2017-03-03 17:37 GMT+01:00 Fundor 333 : > Forse leggermente offtopic ma credo che sia comunque una cosa successa a più > di un pythonista. Io ho un repository pelican su github con più branches. > Quando committo su source io vorrei che travisci (ma potrebbe essere > qualunque cosa) eseguisse il

Re: [Python] Stampare testo barrato

2017-01-30 Per discussione Esalando Prassi
2017-01-30 17:14 GMT+01:00 Alessandro T. : > On 30/01/2017 16:36, Esalando Prassi wrote: >> 2017-01-30 16:12 GMT+01:00 Alessandro T. : >>> Ciao a tutti, >>> >>> esiste un modo semplice per scrivere del testo barrato sul terminale? >>> Ho provato combin

Re: [Python] Stampare testo barrato

2017-01-30 Per discussione Esalando Prassi
;) > # 12 con il 2 barrato - ok > print(' \u03362') > # 2 con il 2 barrato - ok > print('\u03362') > # 2 - non va bene > > Suggerimenti? > Probabilmente c'e' di meglio, ma se sei alla frutta... >>> print('\u03

Re: [Python] Leggere file stream

2016-12-07 Per discussione Esalando Prassi
onda di come mi fa > comodo). > Se sei risposto a rinunciare alla specifica iniziale ("in tempo reale") puoi usare script di pre o post rotate. -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] Leggere file stream

2016-12-07 Per discussione Esalando Prassi
2016-12-07 14:02 GMT+01:00 Roberto Polli : > Il 7 dicembre 2016 11:38, Esalando Prassi > ha scritto: >>... loggare su rsyslog per poi >> reindirizzare le righe di log su postgres: >> ..eviterei.. > Perché? > > Usando un log collector hai > - un buffer per

Re: [Python] Leggere file stream

2016-12-07 Per discussione Esalando Prassi
zione) scriverei direttamente sul DB. Ciao -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] un saluto e parto subito con una domanda...

2016-03-05 Per discussione Esalando Prassi
2016-03-05 14:36 GMT+01:00 Davide Olianas : > Ciao a tutti, > > è da un pezzo che uso python ma solo ora mi è venuto in mente di cercare una > maling list italiana :D > Benvenuto, porta rispetto alla netiquette che qui c'è gente che se la lega al dito peggio del padrino... > Allora partirei

Re: [Python] Un ossimoro (piccolo OT)

2016-01-11 Per discussione Esalando Prassi
mente liberi di dissentire (come molti fanno). > E ho pensato che qualcuno (non faro' nomi se non sotto tortura) qui inlista > potrebbe commentare > > "Allora e' un libro con tutte le pagine bianche" ;) > No! Quello è "PHP: the good parts&quo

Re: [Python] Python Anagram Contest was Tesseract

2016-01-09 Per discussione Esalando Prassi
2016-01-09 19:32 GMT+01:00 Esalando Prassi : > 2016-01-09 18:31 GMT+01:00 Marco Beri : >> 2016-01-09 17:09 GMT+01:00 enrico franchi : >>> >>> Categorie: >>> - il piu' corto (lunghezza, wc -c del file) >>> - il piu' veloce >>> - il

Re: [Python] Python Anagram Contest was Tesseract

2016-01-09 Per discussione Esalando Prassi
$ wc anagram.py 20 49 600 anagram.py [ale@kenobi anagram]$ time ./anagram.py Marco Beri reimbarco real0m0.833s user0m0.812s sys 0m0.020s Stesso bug ma solide basi per il futuro... Si' può ottimizzare da subito evitando di riempire il dizionario all'inizio, ma il pr

Re: [Python] Tesseract

2016-01-09 Per discussione Esalando Prassi
2016-01-09 15:44 GMT+01:00 Marco Beri : > On Sat, Jan 9, 2016 at 3:33 PM, Carlo Miron wrote: >> >> 2016-01-09 15:23 GMT+01:00 Marco Beri : >> >> > 2016-01-09 15:15 GMT+01:00 Esalando Prassi >> > : >> > >> > Raffinaterrimo nickname :-) &g

Re: [Python] Tesseract

2016-01-09 Per discussione Esalando Prassi
uon punto per iniziare a fare di più... Poi se vuoi ulteriore supporto facci sapere *in maniera dettagliata* cosa non va... Ciao -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] [python] Re: R: domandona da quizzone.

2015-05-14 Per discussione Esalando Prassi
On May 14, 2015 15:45, "computer service" wrote: > > mi spiego meglio devo inviare una mail in html usando una lista di indirizzi senza usare cc o > ccn in quanto il server smtp se ha una lista troppo lunga pensa sia spam. Quindi ogni tot di > tempo t pari a x minuti il software python invia la ma

Re: [Python] Aiuto con l'installazione di Eric 5.5

2014-12-03 Per discussione Esalando Prassi
obabilmente ottieni tutte le librerie che ti servono per compilare l'ultima versione di eric con - sudo apt-get build-dep eric -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] Come pubblico il mio progetto django?

2014-04-06 Per discussione Esalando Prassi
dei file sotto /var/www. Se risolve il tuo caso d'uso approfondisco. Ciao. -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] Come si fa ad importare una variabile di un file localizzato in un'altra directory?

2014-02-08 Per discussione Esalando Prassi
icense" for more information. >>> from fileA import TEST >>> print TEST 1 Ciao -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] Non andare a capo

2014-01-03 Per discussione Esalando Prassi
Python2: for x in range(1,5):print x, # virgola alla fine -- http://alepisa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] Stampa su prestampati

2013-12-17 Per discussione Esalando Prassi
; Se devi usare PDF gia' esistenti prova a dare un'occhiata a questo: - http://blog.redturtle.it/2011/11/18/come-compilare-un-modulo-pdf-in-python Per creare un PDF da zero convergo su latex o RML (Report Markup Language). Ciao! -- http://al

[Python] Verifica presenza firma digitale su di un pdf

2012-07-20 Per discussione Esalando Prassi
sa.blogspot.com Esalando Prassi ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python

Re: [Python] SOAP Testing

2011-07-06 Per discussione Esalando Prassi
> Io di solito lancio in una console: netcat -l e imposto come endpoint http://localhost: Da qui vedo la request che andrebbe al server soap. Presa la richiesta la sbatto in soapui e ci gioco. Non il max ma funziona. Ciao -- http://alepisa.blogspot.c

Re: [Python] Ripartire 'da capo'

2008-10-25 Per discussione Esalando Prassi
atto; per cui ho > agito così: > > for i in dir()[:]: > del i > > Mi sembrava ragionevole e così l'ho fatto girare: > >>> dir() > ['__builtins__', '__doc__', '__name__', 'a', 'b', 'c', 'rand

Re: [Python] Strano comportamento di list

2008-10-13 Per discussione Esalando Prassi
Grazie > > > ___ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python > > Come ti hanno detto l'errore e' modificare la lista durante il ciclo. Probabilmente la soluzione migliore pe