Re: [Numpy-discussion] Numpy-discussion Digest, Vol 17, Issue 15

2008-02-08 Thread matthew yeomans
Thanks I been trying to compile a code that uses random,pylab and numpy with
py2exe
the code of setup.py(compiles mycode.py into mycode.exe) follows

#Start here
from distutils.core import setup
import py2exe
import pylab
import numpy
import glob
import scipy
import random
import os

setup( console=['mycode.py'],options={'py2exe':
{skip_archive:1,'packages':['matplotlib','pytz']',}},data_files=[
matplotlib.get_py2exe_datafiles()])

#End here

It works well for codes that uses pylab only. But It i add more modules i
get trouble

Is there any good books on how to use py2exe?
On 2/7/08, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:

 Send Numpy-discussion mailing list submissions to
numpy-discussion@scipy.org

 To subscribe or unsubscribe via the World Wide Web, visit
http://projects.scipy.org/mailman/listinfo/numpy-discussion
 or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

 You can reach the person managing the list at
[EMAIL PROTECTED]

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of Numpy-discussion digest...


 Today's Topics:

   1. f2py compiled module not found by python (Chris)
   2. Re: f2py compiled module not found by python (Pearu Peterson)
   3. Re: Bug in numpy all() function (Robert Kern)
   4. Re: f2py compiled module not found by python (Chris)
   5. Re: random enhancement (Robert Kern)
   6. Re: Bug in numpy all() function (Anne Archibald)
   7. Re: Bug in numpy all() function (Robert Kern)
   8. Re: Numpy-discussion Digest, Vol 17, Issue 13 (Steven H. Rogers)
   9. isn't it a bug? (matrix multiplication) (dmitrey)
 10. Re: isn't it a bug? (matrix multiplication) (Alan G Isaac)


 --

 Message: 1
 Date: Wed, 6 Feb 2008 18:35:35 + (UTC)
 From: Chris [EMAIL PROTECTED]
 Subject: [Numpy-discussion] f2py compiled module not found by python
 To: numpy-discussion@scipy.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=utf-8

 Hello,

 I'm trying to build a package on Linux (Ubuntu) that contains a fortran
 module, built using f2py. However, despite the module building and
 installing without error, python cannot seem to see it (see log below).
 This works fine on Windows and Mac; the problem only seems to
 happen on Linux:

 In [1]: import PyMC
 ---
 exceptions.ImportError   Traceback (most
 recent call last)

 /home/tianhuil/?ipython console

 /usr/lib/python2.4/site-packages/PyMC/__init__.py

 /home/tianhuil/?string

 /usr/lib/python2.4/site-packages/PyMC/MCMC.py

 ImportError: No module named flib
 /usr/lib/python2.4/site-packages/PyMC/MCMC.py

 Notice that the module exists in the site-packages
 directory:

 tianhuil at tianhuil:/usr/lib/python2.4/site-packages/PyMC$ ll
 total 432
 drwxr-xr-x 2 root root   4096 2008-02-03 17:24 Backends
 -rwxrwx--- 1 root root 195890 2008-02-03 17:24 flib.so
 -rwxrwx--- 1 root root259 2008-02-03 17:14 __init__.py
 -rw-r--r-- 1 root root473 2008-02-03 17:24 __init__.pyc
 -rwxrwx--- 1 root root  10250 2008-02-03 17:14 Matplot.py
 -rw-r--r-- 1 root root   7516 2008-02-03 17:24 Matplot.pyc
 -rwxrwx--- 1 root root  98274 2008-02-03 17:14 MCMC.py
 -rw-r--r-- 1 root root  79039 2008-02-03 17:24 MCMC.pyc
 drwxr-xr-x 2 root root   4096 2008-02-03 17:24 Tests
 -rwxrwx--- 1 root root   6631 2008-02-03 17:14 TimeSeries.py
 -rw-r--r-- 1 root root   5043 2008-02-03 17:24 TimeSeries.pyc



 --

 Message: 2
 Date: Wed, 6 Feb 2008 20:58:07 +0200 (EET)
 From: Pearu Peterson [EMAIL PROTECTED]
 Subject: Re: [Numpy-discussion] f2py compiled module not found by
python
 To: Discussion of Numerical Python numpy-discussion@scipy.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain;charset=iso-8859-1

 On Wed, February 6, 2008 8:35 pm, Chris wrote:
  Hello,
 
  I'm trying to build a package on Linux (Ubuntu) that contains a fortran
  module, built using f2py. However, despite the module building and
  installing without error, python cannot seem to see it (see log below).
  This works fine on Windows and Mac; the problem only seems to
  happen on Linux:

 Can you import flib module directly? That is, what happens if you
 execute
 cd .../PyMC
 PYTHONPATH=. python -c 'import flib'
 ?
 Pearu




 --

 Message: 3
 Date: Wed, 06 Feb 2008 14:03:20 -0600
 From: Robert Kern [EMAIL PROTECTED]
 Subject: Re: [Numpy-discussion] Bug in numpy all() function
 To: Discussion of Numerical Python numpy-discussion@scipy.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=UTF-8; format=flowed

 Dan Goodman wrote:
  Hi all,
 
  I think this is a bug (I'm running Numpy 1.0.3.1):
 
  from numpy import *
  def f(x): return False
 
  all(f(x) for x in range(10))
  True
 
  I guess the all function doesn't know about generators?

 Yup. It works on 

Re: [Numpy-discussion] Numpy-discussion Digest, Vol 17, Issue 15

2008-02-08 Thread Robert Kern
Matthew, please do not reply to the digests. Think of them as read-only. If you 
want to start a new thread, send your mail, with a descriptive Subject line, to 
numpy-discussion@scipy.org . If you want to reply to individual messages, 
please 
turn digest delivery *off* and receive and respond to messages normally.

Thank you.

-- 
Robert Kern

I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth.
   -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion