[Python] Medica2: videoguide 26-30
MEDICA2: [26] ESEMPIO DI UNA VISITA VERA ANONIMA http://www.youtube.com/watch?v=H__WWRCCMso MEDICA2: [27] RICERCHE http://www.youtube.com/watch?v=eQY9p32RetY A questo proposito un'avvertenza: consiglio di scaricare di nuovo Medica2.zip dal mio sito, perche' ho trovato difettoso il file nomerice.dbf, che ho provveduto a sostituire nell'archivio medica2.zip. Una volta scaricata la nuova versione corretta, basta estrarre solo il file nomerice.dbf, sostituirlo a quello vecchio (occhio ai linuxiani: dato che in linux NOMERICE.DBF convive con nomerice.dbf nella stessa cartella, consiglio di eliminare il vecchio nomerice.dbf esistente prima di copiarci il nuovo) e ricostruire gli indici nelle funzioni utilita' varie dalla copertina, prima di entrare in ricerche. Un'altra avvertenza: l'ambiente ricerche conviene farlo partire dalla copertina a programma appena lanciato e senza avere utilizzato altre funzioni. Purtroppo si tratta di un bug legato alla quantita' di memoria necessaria al funzionamento delle ricerche, che non e' sufficiente se si e' impegnata gia' in funzioni tipo visita o altro. Non ho approfondito ne' risolto questo punto, e, dato che quello che mi interessava di piu' era la gestione dei pazienti in visita, l'ho sempre lasciato in sospeso. Mea culpa! :-) MEDICA2: [28] I QUADERNI http://www.youtube.com/watch?v=gLibhxRkhhU Una piccola nota sui quaderni: si tratta di un sistema di gestione dati basato sullo schema, o sistema 36 BPV, applicabile ad un campo infinito di tipologie di applicazioni. E' di per se' un programma a se' stante, che puo' essere utile a tante categorie di persone, dalla casalinga al professionista. E' uno strumento per ordinare, catalogare, ricercare, mantenere, dati di ogni tipo. MEDICA2: [29] IL BILANCIO NEI QUADERNI http://www.youtube.com/watch?v=VVSY-CnXqfw Pipccola annotazione: in questa videoguida, al finale, si assiste alla scomparsa dell'importo relativo alla voce "stipendio", quando rimetto la data ad oggi, dopo averla spostata in avanti per dimostrare l'effetto di dati inseriti in piu' date. Non si tratta di un bug, ma e' dovuto al semplice fatto che, riportando la data ad un punto anteriore a quella dell'inserimento, il programma torna a non vedere ancora tutto quanto riguarda il futuro. MEDICA2: [30] FUNZIONI DI UTILITA' VARIE http://www.youtube.com/watch?v=e017Dl_uuwo ..e con questa videoguida termina il viaggio dentro medica2. Prossimamente conto di pubblicare una breve serie di videoguide illustrative della struttura dei files dei dati (*.dbf), descrivendone i campi dei records e le eventuali relazioni tra loro. Allo scopo mi serviro' della semplice utility dbu.exe, in dotazione a Clipper, gia' presente nella cartella medica2 ed utilizzabile da tutti in maniera intuitiva. mauro ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] Medica2: videoguide 26-30
On Sun, 24 Jan 2010 11:03:14 +0100, mauro wrote: > ..e con questa videoguida termina il viaggio dentro medica2. Mauro, è stato un ottimo lavoro, sia il programma che le sue guide. Complimenti! Penso tu stia offrendo una grande possibilità: il tuo programma è scritto con la massima cognizione di causa, visto che il destinatario eri te stesso, ed e provato in tanti anni di utilizzo: non immagino un punto di partenza migliore per chi volesse continuare questo lavoro. Spero che chi ha deciso di afferrare questa possibilità trovi un accordo sulla questioni tecniche e faccia buon uso di questo tesoro! A presto, buona giornata :) -- Daniele Varrazzo - Develer S.r.l. http://www.develer.com ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
[Python] psycopg2, utf8, sqlalchemy, etc.
Premessa: collegamento da SQLAlchemy a postgres con encoding UTF-8 A quanto ho capito, sia Django che SQLAlchemy operano la decodifica verso unicode all'interno dell'ORM Infatti, con le query sqlalchemy.select() e compagnia che non usano l'ORM, l'onere della decodifica e' lasciato all'applicazione. A mio avviso, il margine per l'errore umano (nessuna decodifica o tentativo di decodifica doppia) e' alto. Stavo pensando a un Proxy per ogni riga restituita (o meglio ancora un Proxy sull'oggetto ResultProxy) ma credo si possa trovare una soluzione piu' performante e meno complessa. Oggi sono pigro e vi chiedo: voi siete appagati da questa situazione? Come l'affrontate? grazie -- This e-mail (and any attachment(s)) is strictly confidential and for use only by intended recipient(s). Any use, distribution, reproduction or disclosure by any other person is strictly prohibited. The content of this e-mail does not constitute a commitment by the Company except where provided for in a written agreement between this e-mail addressee and the Company. If you are not an intended recipient(s), please notify the sender promptly and destroy this message and its attachments without reading or saving it in any manner. Any non authorized use of the content of this message constitutes a violation of the obligation to abstain from learning of the correspondence among other subjects, except for more serious offence, and exposes the person responsible to the relevant consequences. ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] psycopg2, utf8, sqlalchemy, etc.
On Sun, Jan 24, 2010 at 12:54 PM, Marco Mariani wrote: > Infatti, con le query sqlalchemy.select() e compagnia che non usano l'ORM, > l'onere della decodifica e' lasciato all'applicazione. > > A mio avviso, il margine per l'errore umano (nessuna decodifica o tentativo > di decodifica doppia) e' alto. > > Stavo pensando a un Proxy per ogni riga restituita (o meglio ancora un Proxy > sull'oggetto ResultProxy) ma credo si possa trovare una soluzione piu' > performante e meno complessa. Non basta mettere convert_unicode a True nell'engine? Non ho ben capito il problema. Dai un'occhiata anche a: http://www.sqlalchemy.org/trac/wiki/06Migration#NativeUnicodeMode -- Lawrence Oluyede [eng] http://oluyede.org - http://twitter.com/lawrenceoluyede [ita] http://www.neropercaso.it [flickr] http://www.flickr.com/photos/rhymes ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] Medica2: videoguide 26-30
Il giorno dom, 24/01/2010 alle 12.47 +0100, Daniele Varrazzo ha scritto: > è stato un ottimo lavoro, sia il programma che le sue guide. Complimenti! Grazie :-) > Penso tu stia offrendo una grande possibilità: il tuo programma è scritto > con la massima cognizione di causa, visto che il destinatario eri te > stesso, ed e provato in tanti anni di utilizzo: non immagino un punto di > partenza migliore per chi volesse continuare questo lavoro. ..infatti, e' veramente "rodato" bene, anche se purtroppo il tempo non mi ha permesso di sviluppare alcune altre funzioni che avrei voluto aggiungere, altre che avrei voluto perfezionare e arricchire, ecc.. > Spero che chi ha deciso di afferrare questa possibilità trovi un accordo > sulla questioni tecniche e faccia buon uso di questo tesoro! E' la speranza e l'augurio che faccio a chi ha deciso di raccogliere il testimone :-) > A presto, buona giornata :) Anche a te :-) ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] psycopg2, utf8, sqlalchemy, etc.
On 01/24/2010 01:14 PM, Lawrence Oluyede wrote: > Non basta mettere convert_unicode a True nell'engine? No, funziona solo se accedi ai dati attraverso il mapper. -- This e-mail (and any attachment(s)) is strictly confidential and for use only by intended recipient(s). Any use, distribution, reproduction or disclosure by any other person is strictly prohibited. The content of this e-mail does not constitute a commitment by the Company except where provided for in a written agreement between this e-mail addressee and the Company. If you are not an intended recipient(s), please notify the sender promptly and destroy this message and its attachments without reading or saving it in any manner. Any non authorized use of the content of this message constitutes a violation of the obligation to abstain from learning of the correspondence among other subjects, except for more serious offence, and exposes the person responsible to the relevant consequences. ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] psycopg2, utf8, sqlalchemy, etc.
Marco Mariani ha scritto: > Premessa: collegamento da SQLAlchemy a postgres con encoding UTF-8 > > A quanto ho capito, sia Django che SQLAlchemy operano la decodifica > verso unicode all'interno dell'ORM > No. Innanzitutto l'API esposta da Django è *solo* l'ORM. Per SQLAlchemy, invece, la codifica verso Unicode è applicato anche dal layer SQL. Però devi effettuare le query usando il "table/type system" di SQLAlchemy. Se vuoi forzare una codifica Unicode, puoi usare il tipo types.Unicode, che non fa altro che settare il parametro `convert_unicode` a True e `assert_unicode` a 'warn' per il tipo types.String. Questi due parametri possono anche essere impostati quando costruisci l'engine. > [...] Ciao Manlio ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] psycopg2, utf8, sqlalchemy, etc.
On Sun, Jan 24, 2010 at 1:45 PM, Marco Mariani wrote: > No, funziona solo se accedi ai dati attraverso il mapper. > Sicuro? se io uso il tipo Unicode nella table la conversione avviene. -- Lawrence Oluyede [eng] http://oluyede.org - http://twitter.com/lawrenceoluyede [ita] http://www.neropercaso.it [flickr] http://www.flickr.com/photos/rhymes ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] psycopg2, utf8, sqlalchemy, etc.
On 01/24/2010 01:53 PM, Manlio Perillo wrote: > Se vuoi forzare una codifica Unicode, puoi usare il tipo types.Unicode, > che non fa altro che settare il parametro `convert_unicode` a True e > `assert_unicode` a 'warn' per il tipo types.String. > Ok, allora specifico il tipo in override a quello che lui vede con l'autoload. grazie -- This e-mail (and any attachment(s)) is strictly confidential and for use only by intended recipient(s). Any use, distribution, reproduction or disclosure by any other person is strictly prohibited. The content of this e-mail does not constitute a commitment by the Company except where provided for in a written agreement between this e-mail addressee and the Company. If you are not an intended recipient(s), please notify the sender promptly and destroy this message and its attachments without reading or saving it in any manner. Any non authorized use of the content of this message constitutes a violation of the obligation to abstain from learning of the correspondence among other subjects, except for more serious offence, and exposes the person responsible to the relevant consequences. ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] psycopg2, utf8, sqlalchemy, etc.
On 01/24/2010 02:00 PM, Lawrence Oluyede wrote: > Sicuro? se io uso il tipo Unicode nella table la conversione avviene. > Beh, io uso l'autoload... quindi e' PGString. IMHO il tipo dovrebbe essere di default Unicode quando convert_unicode=True... e invece In [3]: metadata.tables['contratti'].c.oggetto Out[3]: Column(u'oggetto', PGString(length=250, convert_unicode=False, assert_unicode=None), table=, nullable=False) -- This e-mail (and any attachment(s)) is strictly confidential and for use only by intended recipient(s). Any use, distribution, reproduction or disclosure by any other person is strictly prohibited. The content of this e-mail does not constitute a commitment by the Company except where provided for in a written agreement between this e-mail addressee and the Company. If you are not an intended recipient(s), please notify the sender promptly and destroy this message and its attachments without reading or saving it in any manner. Any non authorized use of the content of this message constitutes a violation of the obligation to abstain from learning of the correspondence among other subjects, except for more serious offence, and exposes the person responsible to the relevant consequences. ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] psycopg2, utf8, sqlalchemy, etc.
On Sun, Jan 24, 2010 at 2:06 PM, Marco Mariani wrote: > Beh, io uso l'autoload... quindi e' PGString. IMHO il tipo dovrebbe > essere di default Unicode quando convert_unicode=True... e invece > > In [3]: metadata.tables['contratti'].c.oggetto > Out[3]: Column(u'oggetto', PGString(length=250, convert_unicode=False, > assert_unicode=None), table=, nullable=False) Ah, mai usato l'autoload, mi sa che ti conviene provare facendo l'override, fammi sapere! -- Lawrence Oluyede [eng] http://oluyede.org - http://twitter.com/lawrenceoluyede [ita] http://www.neropercaso.it [flickr] http://www.flickr.com/photos/rhymes ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python