Re: listing attributes

2006-02-13 Thread Evan Monroig
On Feb.13 18h37, Thomas Girod wrote :
> Hi there.
> 
> I'm trying to get a list of attributes from a class. The dir() function
> seems to be convenient, but unfortunately it lists to much - i don't
> need the methods, neither the built-in variables.

If you do something like this you should have a list of attributes:

l = dir(object)
l = [s for s in l if s[:2] != '__']
l = [s for s in l if not callable(getattr(object, s))]

cheers,

Evan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Encryption application/NEED A HACKER TO TRY IT

2006-02-15 Thread Evan Monroig
On Feb.15 18h18, atanas Cosmas Nkelame wrote :
> I got an idea to write a python application which ciphers and 
> enciphers informationation (converting it to a format which only the 
> person who changed it understands as he is the only one who has the 
> program to decode the information).

Hi,

It is likely that the strong encryption provided by pgp or gpg 
(www.gnupg.org) are exactly what you are looking for.

cheers,

Evan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python advocacy in scientific computation

2006-03-05 Thread Evan Monroig
> First there are a few things I don't like:

Hi, I will respond to things that others haven't responded yet

> 2. How good is matplotlib/pylab? I tried to install it but only get
> error messages so I haven't tested it. But plotting capabilities is
> really major issue.

I don't know because I haven't managed to get it working either. But
other people have and I guess it should not be so difficult.

I personally use gnuplot-py (gnuplot-py.sourceforge.net) which I adapted
to the new NumPy/SciPy (see below) by searching-and-replacing "Numeric"
by "numpy". It allows to use raw gnuplot commands.

> 4. Are there "easy to use" libraries containing other stuff important
> for scientific programs, e.q. linear algebra (LU, SVD, Cholesky),
> Fourier transforms, etc. E.g. in Matlab I can just type,
>
>[u,s,v] = svd(x) % which calls LAPACK linked to ATLAS or
> vendor-optimized BLAS

Yes !

There is the excellent SciPy package, which you can get at www.scipy.org

Personnally I use it a lot for linear algebra (linked to
LAPACK/ATLAS/BLAS), but there are also libraries for statistics,
optimization, signal processing, etc.

There has been many changes recently, including package names, so don't
get confused and be sure to get recent versions of NumPy and SciPy ;).

Evan
-- 
http://mail.python.org/mailman/listinfo/python-list