genetic algorithms package for python ?

2006-08-31 Thread Xiao Jianfeng
Hi all, I am looking for a genetic algorithms package for Python. I have googled the web before posting and found some links. The link of pygene(http://www.freenet.org.nz/python/pygene) cannot be opened. I also tried the recipe on ASPN, but it is too simple for my application, and the ga

Re: How can I do this with python ?

2006-05-08 Thread Xiao Jianfeng
Tim N. van der Leeuw wrote: Your question is insufficiently clear for me to answer. Do you want to know how to read from standard-input in a Python program? Do you want to know how to start an external program from Python, and then connect something to that programs standard input? Do you

How can I do this with python ?

2006-05-07 Thread Xiao Jianfeng
Dear all, In a shell script, I can run a command which need interactive input like this, #!/bin/sh A_Command-EOF a b c EOF But, how can I do this with python ? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

The difference between import package.module and from package import module(about pymol)

2005-12-15 Thread Xiao Jianfeng
Hello, In pymol I can use from chempy import Atom but import chempy.Atom doesn't work. It says,ImportError: No module named Atom. What is going wrong ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Has this problem been fiexed ?

2005-11-27 Thread Xiao Jianfeng
Hello, I'm trying to build python2.4.2 on IRIX6.5(cc version MIPSpro Compilers: Version 7.3.1.3m). But the socket module failed to compile. I found this in ./Modules/socketmodule.c, line 193: /* XXX Using _SGIAPI is the wrong thing, 194

python2.4.2 test_fpformat and test_locale failed on IRIX6.5

2005-11-23 Thread Xiao Jianfeng
Hello, I am trying to install python2.4.2 on IRIX6.5, but test_fpformat and test_locale failed when I ran smake test. The following is the detailed error message: prompt:\ ./python

Re: what happens when the file begin read is too big for all lines to be read with readlines()

2005-11-20 Thread Xiao Jianfeng
Steve Holden wrote: Xiao Jianfeng wrote: Steven D'Aprano wrote: On Sun, 20 Nov 2005 11:05:53 +0800, Xiao Jianfeng wrote: I have some other questions: when fh will be closed? When all references to the file are no longer in scope: def handle_file(name): fp

Re: what happens when the file begin read is too big for all lines to be read with readlines()

2005-11-20 Thread Xiao Jianfeng
[EMAIL PROTECTED] wrote: Xiao Jianfeng wrote: First, I must say thanks to all of you. And I'm really sorry that I didn't describe my problem clearly. There are many tokens in the file, every time I find a token, I have to get the data on the next line and do some operation

Re: what happens when the file begin read is too big for all lines to be read with readlines()

2005-11-20 Thread Xiao Jianfeng
[EMAIL PROTECTED] wrote: Xiao Jianfeng wrote: I have compared the two methods, (1). for x in fh: (2). read all the file into memory firstly. I have tested the two methods on two files, one is 80M and the second one is 815M. The first method gained a speedup of about 40

How to install python2.4.2 on IRIX6.5 ?

2005-11-20 Thread Xiao Jianfeng
Hello, I am trying to install python2.4.2 on a SGI origin3200 machine running IRIX6.5. The native c compiler was used to compile python. ./configure --prefix=/my/path/to/install runs ok, then, smake OPT= runs ok but smake test gets errors, here is the output:

Re: what happens when the file begin read is too big for all lines to be read with readlines()

2005-11-19 Thread Xiao Jianfeng
[EMAIL PROTECTED] wrote: newer python should use for x in fh:, according to the doc : fh = open(your file) for x in fh: print x which would only read one line at a time. I have some other questions: when fh will be closed? And what shoud I do if I want to explicitly close the file

Re: what happens when the file begin read is too big for all lines to be read with readlines()

2005-11-19 Thread Xiao Jianfeng
Steven D'Aprano wrote: On Sun, 20 Nov 2005 11:05:53 +0800, Xiao Jianfeng wrote: I have some other questions: when fh will be closed? When all references to the file are no longer in scope: def handle_file(name): fp = file(name, r) # reference to file now in scope

Re: Proposal: add sys to __builtins__

2005-09-04 Thread Xiao Jianfeng
Paul Watson wrote: This sounds pretty interesting. How about a switch to invoke this handling for the one-liner crowd and those who wish to use it? Somehow, I never heard any C programmers suggest that the default processing not include the need for: #include stdio.h I think it is

Are there free molecular libraries written in python ?

2005-09-02 Thread Xiao Jianfeng
Hi, Are there any free libraries for the analysis and manipulation of molecular structural models, implemented in the Python programming language ? Thanks. -- http://mail.python.org/mailman/listinfo/python-list