psycopg simplest problem

2005-07-08 Thread Glauco
all time check for none, empty string and so on... I've seen API of psycopg and some procedure for the solution but all are too spaghetti for me. I'm only with this problem ? Glauco

Re: psycopg simplest problem

2005-07-08 Thread Glauco
Gerhard Haering wrote: On Fri, Jul 08, 2005 at 04:23:50PM +0200, Glauco wrote: [...] My problem is to do a middle layer over pycopg for eliminate type casting problem in postgres in all direction. i've resolved this doing a C extension in python and manipulating only string and int in my

Dictionary, keys and alias

2005-07-18 Thread Glauco
mydict {'a':1, 'b':1} mydict['b'] = 2 print mydict {'a':2, 'b':2} The only idea i have is to implement two dictionary one for convert name, alias in two keys with the same value (eg.numeric) in the first dict. The second for store only one time the k, v . Any suggestion ? Glauco

Re: Dictionary, keys and alias

2005-07-19 Thread Glauco
Steven D'Aprano wrote: On Mon, 18 Jul 2005 12:17:37 +0200, Glauco wrote: I want to insert a concept of alias in a dict_based class. The idea is to have a facoltative name in the same dict that correspond at the same value. With this alias i can change original value. example: mydict

EOF occurred in violation of protocol

2006-01-17 Thread Glauco
occurred in violation of protocol') I'm in trouble because i've tryed some workaround on httplib.py and socket.py but they don't work never. Some soggestion or workaround for bypass this problem? Thank you anyway. Glauco -- http://mail.python.org/mailman/listinfo/python-list

Re: File to dict

2007-12-07 Thread Glauco
(':')) for x in open('/etc/virtual/domainowners','r').readlines()]) return cache.get(domain) Glauco -- http://mail.python.org/mailman/listinfo/python-list

Re: File to dict

2007-12-07 Thread Glauco
david ha scritto: On Fri, 07 Dec 2007 16:46:56 +0100, Glauco wrote: [EMAIL PROTECTED] ha scritto: Hello everyone, I have written this small utility function for transforming legacy file to Python dict: def lookupdmo(domain): lines = open('/etc/virtual/domainowners','r

Re: string in files

2008-12-30 Thread Glauco
', 'first': 'this', 'fo': 'python', 'second': 'is', 'si': 'group', 't': 'a'} Glauco -- http://mail.python.org/mailman/listinfo/python-list

Re: string in files

2008-12-31 Thread Glauco
Steven D'Aprano ha scritto: On Tue, 30 Dec 2008 11:53:17 +0100, Glauco wrote: thanks brother i mean how do i particularly assign (u = this) (y = is) in the strings up there. i have been able to split strings with any character sign. If i'm not wrong

Re: itertools question

2009-05-14 Thread Glauco
Neal Becker ha scritto: Is there any canned iterator adaptor that will transform: in = [1,2,3] into: out = [(1,2,3,4), (5,6,7,8),...] That is, each time next() is called, a tuple of the next N items is returned.

Re: Extract value and average

2009-06-09 Thread Glauco
('file.txt','r') if ' DIHED ' in l ] mean = sum(vals) / len(vals) print vals print mean Glauco -- http://mail.python.org/mailman/listinfo/python-list

Problem in Dictionaries

2005-03-01 Thread Glauco Silva
hundred twenty nine", 50: "fifty"} But i needdict sort : { 50: "fifty", 129: "a hundred twenty nine"} How can i do this ? Thanks, Glauco Buzini da Costa Silva -- http://mail.python.org/mailman/listinfo/python-list

problem with py2exe !

2005-04-15 Thread Glauco Silva
# promed2.0/ setup.cfg setup.pyicons/ docs/ python/ MyMainModule.py vtk-window/ vtkpython.py vtkpythontk.py vtk.pth vtkCommon.dll vtkCommonPython.dll vtkCommonTCL.dll ... vtk/ ### OS: win 2K Python

Problem using py2exe

2005-04-18 Thread Glauco Silva
## promed2.0/ setup.cfg setup.pyicons/ docs/ python/ MyMainModule.py vtk-window/ vtkpython.py vtkpythontk.py vtk.pth vtkCommon.dll vtkCommonPython.dll vtkCommonTCL.dll ... vtk/ ### OS: win 2K Pyth

How can i solve this problem with py2exe ?

2005-04-27 Thread Glauco Silva
dows;C:\promed2.0\python My dir: ## promed2.0/ setup.cfg setup.pyicons/ docs/ python/ MyMainModule.py vtk-window/ vtkpython.py vtkpythontk.py vtk.pth vtkCommon.dll vtkCommonPython.dll vtkCommonTCL.dll ... vtk/

problem in the compiler ?

2005-05-02 Thread Glauco Silva
when i creat a RadioButton and put a command = self.Function, this function is called inthe creation of RadioButton. It´s right this orit´s wrong ? Thank you Glauco No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.1 - Release Date

Re: problem in the compiler ?

2005-05-03 Thread Glauco Silva
. And i don´t want this. What´s wrong ? Thank you Glauco - Original Message - From: Delaney, Timothy C (Timothy) [EMAIL PROTECTED] To: Glauco Silva [EMAIL PROTECTED]; python-list@python.org Sent: Monday, May 02, 2005 8:50 PM Subject: RE: problem in the compiler ? Glauco Silva wrote

Re: problem in the compiler ?

2005-05-05 Thread Glauco Silva
() ... self.myButton.invoke('C1') - - Original Message - From: Delaney, Timothy C (Timothy) [EMAIL PROTECTED] To: Glauco Silva [EMAIL PROTECTED]; python-list@python.org Sent: Wednesday, May 04, 2005 8:20 PM Subject: RE: problem

Re: Multiple cmps chained one after another

2005-05-16 Thread Glauco Silva
You can try this : l = [(2001, 5, 2),(2111,3,3),(1984, 3, 1), (2001, 1, 1)] l.sort(lambda x = l[0],y = l[1] : cmp((x[1],x[2]),(y[1],y[2]))) - Original Message - From: Volker Grabsch [EMAIL PROTECTED] To: python-list@python.org Sent: Saturday, May 14, 2005 7:09 AM Subject: Multiple cmps