Psyco 64 bits

2009-07-09 Thread Luis P. Mendes
Hi, I used Psyco to speed up my Python code. Due to the great amount of data I have to proccess, I moved my Linux system to a 64 bits version with more RAM. It seems that Psyco cannot be used in such platforms. Or is there another version of Psyco for 64 bits platform? I googled and arrived to

Re: MemoryError c/vcompiler.h:745: Fatal Python error (Psycopg2)

2009-06-21 Thread Luis P. Mendes
Sun, 21 Jun 2009 13:04:59 +, Lie Ryan escreveu: > Luis P. Mendes wrote: >> Hi, >> >> I have a program that uses a lot of resources: memory and cpu but it >> never returned this error before with other loads: >> >> """ >> Memory

MemoryError c/vcompiler.h:745: Fatal Python error (Psycopg2)

2009-06-21 Thread Luis P. Mendes
Hi, I have a program that uses a lot of resources: memory and cpu but it never returned this error before with other loads: """ MemoryError c/vcompiler.h:745: Fatal Python error: psyco cannot recover from the error above Aborted """ The last time I checked physical RAM while the script was run

Re: psycopg2 error

2007-05-09 Thread Luis P. Mendes
Hello Martin, Em Wed, 09 May 2007 06:17:09 +0200, Martin v. Löwis escreveu: >> ImportError: libpq.so.5: cannot open shared object file: No such file or >> directory >> >> libpq files are readable by the world: [EMAIL PROTECTED] pgsql # ll lib/ -d >> drwxr-xr-x 3 postgres postgres 1528 2007-05-07

psycopg2 error

2007-05-08 Thread Luis P. Mendes
Hi, I've installed psycopg2 under Slacware 11.0 along with PostgreSQL 8.2.4. When I run the python shell I get the following error: [EMAIL PROTECTED] ~$ python Python 2.4.3 (#1, Jul 26 2006, 20:13:39) [GCC 3.4.6] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>

Re: psycopg2 faster way to retrieve last x records

2006-11-08 Thread Luis P. Mendes
tever > ORDER BY tempounix; Thank you Stuart, I'll try it. Luis P. Mendes -- http://mail.python.org/mailman/listinfo/python-list

psycopg2 faster way to retrieve last x records

2006-11-07 Thread Luis P. Mendes
s. And it brings some 'heavy' work on disk. The table 'seconds' has 54+ lines right now. Can I do something different in order to have a lighter load on the system and a quicker response? Luis P. Mendes -- http://mail.python.org/mailman/listinfo/python-list

Re: ancestor class' __init__ doesn't call other methods

2006-09-15 Thread Luis P. Mendes
Rob De Almeida escreveu: > Luis P. Mendes wrote: >> Method a() is not called. Why is this? What is the best option to >> solve this? Have Cotacoes returning values and not to be an ancestor >> class of CruzaEmas? > > It works for me, after rearranging your code a l

ancestor class' __init__ doesn't call other methods

2006-09-15 Thread Luis P. Mendes
Hi, I have the following problem: I instantiate class Sistema from another class. The result is the same if I import it to interactive shell. s = Sistema("par") class Sistema: def __init__(self, par): cruza_ema = CruzaEmas(par) class CruzaEmas(Ema, Cotacoes): def __init__(self

Re: pyXLWriter - grid lines and if formula

2006-07-10 Thread Luis P. Mendes
Waldemar Osuch escreveu: > Luis P. Mendes wrote: >> Gregory Piñero escreveu: >>> On 7/7/06, Luis P. Mendes <[EMAIL PROTECTED]> wrote: >>>> Hi, >>>> >>>> I know that pyExelerator is the supported project now, but I can't use >>&

Re: pyXLWriter - grid lines and if formula

2006-07-09 Thread Luis P. Mendes
Gregory Piñero escreveu: > On 7/7/06, Luis P. Mendes <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I know that pyExelerator is the supported project now, but I can't use >> it because I'd need it to generate files from a web platform. Since I >> can not

pyXLWriter - grid lines and if formula

2006-07-07 Thread Luis P. Mendes
2- I tried to build a simple 'if' formula but couldn't. Is it my problem or pyXLWriter's problem? If the former, is it possible to post an example? TIA Luis P. Mendes -- http://mail.python.org/mailman/listinfo/python-list

download file from intranet linux server to windows clients

2006-06-16 Thread Luis P. Mendes
work space. I use pyExcelerator to create the Excel files. How can I do it? Do I need another excel generator? Client's information about its working directory should be read, but how? I could only find the way to read the server environment variables, where data is processed. Luis

Re: ascii to latin1

2006-05-10 Thread Luis P. Mendes
on't want such > a fuzzy matching, keep it. > Thank you all for your help. That was what I did. That symbol 'º' is not needded for the field. It's working fine, now. Luis P. Mendes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/L

Re: ascii to latin1

2006-05-09 Thread Luis P. Mendes
"latin1_to_ascii.py", line 22, in converter print linha_ascii.encode("ascii") UnicodeEncodeError: 'ascii' codec can't encode character u'\xba' in position 11: ordinal not in range(128) The script converted the ÇÃ from the first line, but not the º

Re: ascii to latin1

2006-05-09 Thread Luis P. Mendes
ve to do a search and substitute using regular expressions for these cases. Or is there a better way to do it? Luis P. Mendes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEYINaHn4UHCY8rB8RAqLKAJ0cN7yRlzJS

ascii to latin1

2006-05-08 Thread Luis P. Mendes
guese) is successful. So, instead of only one search, there will be several used. Is there anything already coded, or will I have to try to do it all by myself? Luis P. Mendes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linu

Re: socket freezes

2006-03-04 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thank you all for your suggestions. Luis P. Mendes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFECb5AHn4UHCY8rB8RAmeLAKCmSVfTvgQ94NPnJlD2QqdbMwVFXACdGFAh

Re: socket freezes

2006-03-03 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 | Try setting a default timeout on the socket, and if it times out | recontact the other system on a new socket. See socket.setdefaultimeout() | | regards | Steve Thank you for your answers. I'm beggining to suspect that the problem has to do with

socket freezes

2006-03-03 Thread Luis P. Mendes
r I do a ^C, and even then, the socket doesn't start to acquire new input. Any clues you can give me about this? Luis P. Mendes -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFECEF8Hn4UHCY8r

Re: psycopg2 rounds unix time [solved]

2006-02-06 Thread Luis P. Mendes
e the Unix time? Thank you for your answer. In python, I use float data type to deal with time values (from time.time()), for example. In Postgresql, the unix time field was set up as real. I've changed it to double precision and it runs fine, now. Luis P. Mendes -BEGIN PGP SIGNATURE

psycopg2 rounds unix time

2006-02-05 Thread Luis P. Mendes
unix time field. example: unix time inserted at first row: 1138839839.64456 unix time as retrieved in psql: 1.13884e+09 unix time retrieved by psycopg2: 113884.0 Is this a bug? I'm using: Python 2.3.5 in a Debian Sarge box PostgreSQL 7.4.7 psycopg2-2.0b6 Luis P. Mendes -BEGIN PGP

Re: nested tuples

2005-09-10 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 | | Why? What is it about the list of tuples that you don't like? | Philosophically, it's more in line with Guido's separation of list and | tuple. I'm not saying that I don't like, I was just curious to know if there was a way to do it using exclusi

nested tuples

2005-09-09 Thread Luis P. Mendes
ue1, row2value2, row2value3),..., (rowNvalue1, rowNvalue2, rowNvalue3)] Then, I get what I want with tuple(a). Luis P. Mendes -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enig

Re: PostgreSQL & Python vs PHP

2005-07-25 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I would like to thank all of you. For what I've read, I'll be using python instead of Php. Luis -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC5RQ5Hn4UHCY8r

Re: PostgreSQL & Python vs PHP

2005-07-23 Thread Luis P. Mendes
gene tani wrote: > ok, to make this less open-ended, you should mention what O/S and web > server you have in mind, whether the web and DB servers will be under > your admin (big diff betw python and PHP, as far as finding shared > server accounts at web hosts), what kinds of queries, concurrent >

Re: PostgreSQL & Python vs PHP

2005-07-23 Thread Luis P. Mendes
gene tani wrote: > To be honest, this is a pretty open-ended question. Are there specific > issues (SQL injection/security, minimizing db connections, simplest > code, etc, your'e concerned with?) Simplest code with be an important factor, since the db will be used far from max capabilities. Eas

PostgreSQL & Python vs PHP

2005-07-23 Thread Luis P. Mendes
Hi, I don't know anything about PHP and I'm initiating right now with PostgreSQL. Could someone tell me the pros and cons of assessing the PostgreSQL databases with Python vs. PHP? I will need to build a database that has to be assessed by a dozen clients via a web page in an intranet (possibly

Re: Pyrex: step in for loop

2005-05-26 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 | so it's | | for i in range(8, 14, 1): ... | | http://enigmail.mozdev.org iD8DBQFClkmlHn4UHCY8rB8RAlUqAKCxSEkEKVIcoshTwmL7GQNK6d/j0wCgoC67 jOhuXQpnDt23SEAM9huKTQA= =8XO0 -END PGP SIGNATURE- -- http://mail.python.org/mailman/

Pyrex: step in for loop

2005-05-26 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm trying to improve speed in a module and substituted the pythonic 'for in range()' for 'for i from min < i < max:' But, I need to define a step for the i variable. How can I do it? for example, how do I iterate through 8 to 14 with s

Pyrex: TypeError: unsubscriptable object

2005-05-24 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm just transforming a Python module into Pyrex, and I get the following error: File "indicadorPyrex.pyx", line 37, in indicadorPyrex.volatilidade ~h1 = precoMax[barra] I made no changes to this module except including 'int' for two variable

Re: speeding up Python script

2005-05-18 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I appreciate everyone's help! I got some ideas that I'll try to put into practice. Regards, Luis -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCi7QQHn4UHCY8

Re: speeding up Python script

2005-05-18 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The reason why I'm using six nested for loops is because I need to find the best output using those six variables as input. Here's the simplified code: for per in range(): ~for s in range(): ~for t in range(): for v in range()

speeding up Python script

2005-05-17 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have a 1000 line python script that takes many hours to finish. It is running with six inside 'for' loops. I've searched the net for ways to speed up the proccess. Psyco improves performance around 3% in this case which is not good enough. H

speeding up Python

2005-05-17 Thread Luis P. Mendes
Hi, I have a 1000 line python script that takes many hours to finish. It is running with six inside 'for' loops. I've searched the net for ways to speed up the proccess. Psyco improves performance around 3% in this case which is not good enough. How can I dramatically improve speed? I tried

Dive into Python java equivalent

2005-05-13 Thread Luis P. Mendes
Hi, do you know if is there any 'Dive into Python' equivalent for the java language? DiP is the best I've seen and I would need to learn some basics of Java and also ways to interact between the two languages. (I'm already aware of Jpype and Jython) Luis -- http://mail.python.org/mailman/lis

Re: xml parsing escape characters

2005-01-21 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ~From your experience, do you think that if this wrong XML code could be meant to be read only by somekind of Microsoft parser, the error will not occur? I'll try to explain: xml producer writes the code in Windows platform and 'thinks' that every clie

Re: xml parsing escape characters

2005-01-21 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ~From your experience, do you think that if this wrong XML code could be meant to be read only by somekind of Microsoft parser, the error will not occur? I'll try to explain: xml producer writes the code in Windows platform and 'thinks' that every clie

Re: xml parsing escape characters

2005-01-20 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I would like to thank everyone for your answers, but I'm not seeing the light yet! When I access the url via the Firefox browser and look into the source code, I also get: ~ ~439 ~ should

Re: xml parsing escape characters

2005-01-20 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 this is the xml document: http://www..";> ~ ~ 439 (... others ...) ~ When I do: print xmldoc.toxml() it prints: http://www...";> ~ ~439

xml parsing escape characters

2005-01-19 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I only know a little bit of xml and I'm trying to parse a xml document in order to save its elements in a file (dictionaries inside a list). When I access a url from python 2.3.3 running in Linux with the following lines: resposta = urllib.u