[matplotlib-devel] [ANN] ESCO2012 and PyHPC2011: Python in science in major computational science conference

2011-09-11 Thread Gael Varoquaux
ESCO 2012 - European Seminar on Coupled Problems
=

ESCO2012 http://esco2012.femhub.com/ is the 3rd event in a series of
interdisciplineary meetings dedicated to computational science challenges
in multi-physics and PDEs.

I was invited as ESCO last year. It was an aboslute pleasure, because it
is a small conference that is very focused on discussions. I learned a
lot and could sit down with people who code top notch PDE libraries such
as FEniCS and have technical discussions. Besides, it is hosted in the
historical brewery where the Pilsner was invented. Plenty of great beer.

Application areas
--

Theoretical results as well as applications are welcome. Application
areas include, but are not limited to: Computational electromagnetics,
Civil engineering, Nuclear engineering, Mechanical engineering,
Computational fluid dynamics, Computational geophysics, Geomechanics and
rock mechanics, Computational hydrology, Subsurface modeling,
Biomechanics, Computational chemistry, Climate and weather modeling, Wave
propagation, Acoustics, Stochastic differential equations, and
Uncertainty quantification.

Minisymposia
* Multiphysics and Multiscale Problems in Civil Engineering
* Modern Numerical Methods for ODE
* Porous Media Hydrodynamics
* Nuclear Fuel Recycling Simulations
* Adaptive Methods for Eigenproblems
* Discontinuous Galerkin Methods for Electromagnetics
* Undergraduate Projects in Technical Computing

Software afternoon
---

Important part of each ESCO conference is a software afternoon featuring
software projects by participants. Presented can be any computational
software that has reached certain level of maturity, i.e., it is used
outside of the author's institution, and it has a web page and a user
documentation. 

Proceedings
---

For each ESCO we strive to reserve a special issue of an international
journal with impact factor. Proceedings of ESCO 2008 appeared in Math.
Comput. Simul., proceedings of ESCO 2010 in CiCP and Appl. Math. Comput.
Proceedings of ESCO 2012 will appear in Computing.

Important Dates
* December 15, 2011: Abstract submission deadline.
* December 15, 2011: Minisymposia proposals.
* January 15, 2012: Notification of acceptance.

PyHPC: Python for High performance computing


If you are doing super computing, SC11, (
http://sc11.supercomputing.org/) the Super Computing conference is the
reference conference. This year there will a workshop on high performance
computing with Python: PyHPC
(http://www.dlr.de/sc/desktopdefault.aspx/tabid-1183/1638_read-31733/).

At the scipy conference, I was having a discussion with some of the
attendees on how people often still do process management and I/O with
Fortran in the big computing environment. This is counter productive.
However, has success stories of supercomputing folks using high-level
languages are not advertized, this is bound to stay. Come and tell us
how you use Python for high performance computing!

Topics
* Python-based scientific applications and libraries
* High performance computing
* Parallel Python-based programming languages
* Scientific visualization
* Scientific computing education
* Python performance and language issues
* Problem solving environments with Python
* Performance analysis tools for Python application

Papers

We invite you to submit a paper of up to 10 pages via the submission
site. Authors are encouraged to use IEEE two column format.

Important Dates
* Full paper submission: September 19, 2011
* Notification of acceptance: October 7, 2011
* Camera-ready papers: October 31, 2011


--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Hiring a junior developer on the scikit-learn

2011-09-02 Thread Gael Varoquaux
Hi list,

Once again, we are looking for a junior developer to work on the
scikit-learn. Below is the official job posting. Unofficially I would
like to stress that this is a unique opportunity to be payed for two
years to work on learning and improving the scientific Python toolstack. 

Gael



**Job Description**

INRIA is looking to hire a young graduate on a 2-year position to help
with the community-driven development of the open source machine learning
in Python library, scikit-learn. The scikit-learn is one of the major
machine-learning libraries in Python. It aims to be state-of-the-art on
mid-size to large datasets by harnessing the power of the scientific
Python toolstack.

Speaking French is not a requirement, as it is an international team.

**Requirements**

* Programming skills in Python and C/C++
* Understanding of quality assurance in software development: test-driven 
programming, version control, technical documentation.
* Some knowledge of Linux/Unix
* Software design skills
* Knowledge of open-source development and community-driven environments
* Good technical English level
* An experience in statistical learning or a mathematical-oriented mindset is a 
plus
* We can only hire a young-graduate that has received a masters or equivalent 
degree at most a year ago.

**About the company**

INRIA is the French computer science research institute. It recognized
word-wide as one of the leading research institutions and has a strong
expertise in machine learning. You will be working in the `Parietal team
`_ that makes a heavy use of Python
for brain imaging analysis.

Parietal is a small research team (around 10 people) with an excellent
technical knowledge of scientific and numerical computing in Python as
well as a fine understanding of algorithmic issues in machine learning
and statistics. Parietal is committed to investing in scikit-learn.

Working at Parietal is a unique opportunity to improve your skills in
machine learning and numerical computing in Python. In addition, working
full time on the scikit-learn, a very active open-source project, will
give you premium experience of open source community management and 
collaborative project development.

 
**Contact Info:**

* **Technical Contact**: Bertand Thirion
* **E-mail contact**: bertrand.thir...@inria.fr
* **HR Contact**: Marie Domingues
* **E-mail Contact**: marie.doming...@inria.fr 
* **No telecommuting**


--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] [ANN] FEMTEC: Trac on open source scientific software

2011-01-30 Thread Gael Varoquaux
Hi list,

This is just a note that an extra track at FEMTEC, a conference for
computational methods in engineering and science, is open for open source
scientific software. The organisers have a taste for Python, so if you
want to submit a paper on numerical methods with Python, this is an
excellent venue. Abstract submission is open till end of February. To
submit you need to create an account and edit you profile.

Gael



The 3rd International Conference on Finite Element Methods in Engineering
and Science (FEMTEC 2011, http://hpfem.org/events/femtec-2011/) will have
a track on Open-source projects and Python in scientific computing. 

FEMTEC 2011 is co-organized by the University of Nevada (Reno), Desert
Reseach Institute (Reno), Idaho National Laboratory (Idaho Falls, Idaho),
and U.S. Army Engineer Research and Development Center (Vicksburg,
Mississippi). The objective of the meeting is to strengthen the
interaction between researchers who develop new computational methods,
and scientists and engineers from various fields who employ numerical
methods in their research. Specific focus areas of FEMTEC 2011 include,
but are not limited to, the following: 

*   Computational methods in hydrology, atmospheric
  modeling, and other earth sciences.
* Computational methods in nuclear, mechanical,
  civil, electrical, and other engineering fields.
* Mesh generation and scientific visualization.
* Open-source projects and Python in scientific computing.

Part of the conference will be a software afternoon featuring open source
projects of participants.

Proceedings

Proceedings of FEMTEC 2011 will appear as a special issue of Journal of
Computational and Applied Mathematics (2008 SCI impact factor 1.292), and
additional high-impact international journals as needed.



--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] [Ann] EuroScipy 2011 - Call for papers

2011-01-20 Thread Gael Varoquaux
=
Announcing EuroScipy 2011
=

-
The 4th European meeting on Python in Science
-

**Paris, Ecole Normale Supérieure, August 25-28 2011**

We are happy to announce the 4th EuroScipy meeting, in Paris, August
2011.

The EuroSciPy meeting is a cross-disciplinary gathering focused on
the use and development of the Python language in scientific
research. This event strives to bring together both users and
developers of scientific tools, as well as academic research and
state of the art industry.


Main topics
===
- Presentations of scientific tools and libraries using the
  Python language, including but not limited to:
  - vector and array manipulation
  - parallel computing
  - scientific visualization
  - scientific data flow and persistence
  - algorithms implemented or exposed in Python
  - web applications and portals for science and engineering.
- Reports on the use of Python in scientific achievements or ongoing
  projects.
- General-purpose Python tools that can be of special interest to the
  scientific community.


Tutorials
=
There will be two tutorial tracks at the conference, an introductory one,
to bring up to speed with the Python language as a scientific tool, and
an advanced track, during which experts of the field will lecture on
specific advanced topics such as advanced use of numpy, scientific
visualization, software engineering...


Keynote Speaker: Fernando Perez
===
We are excited to welcome Fernando Perez (UC Berkeley, Helen Wills
Neuroscience Institute, USA) as our keynote speaker. Fernando Perez
is the original author of the enhanced interactive python shell
IPython and a very active contributor to the Python for Science
ecosystem.


Important dates
===
Talk submission deadline: Sunday May 8
Program announced:Sunday May 29
Tutorials tracks: Thursday August 25 - Friday August 26
Conference track: Saturday August 27 - Sunday August 28


Call for papers
===
We are soliciting talks that discuss topics related to scientific
computing using Python. These include applications, teaching, future
development directions, and research. We welcome contributions from
the industry as well as the academic world. Indeed, industrial
research and development as well academic research face the
challenge of mastering IT tools for exploration, modeling and
analysis.  We look forward to hearing your recent breakthroughs
using Python!


Submission guidelines
=
- We solicit talk proposals in the form of a one-page long abstract.
- Submissions whose main purpose is to promote a commercial product or
  service will be refused.
- All accepted proposals must be presented at the EuroSciPy conference
  by at least one author.

The one-page long abstracts are for conference planing and selection
purposes only. We will later select papers for publication of
post-proceedings in a peer-reviewed journal.


How to submit an abstract
=
To submit a talk to the EuroScipy conference follow the instructions
here:
http://www.euroscipy.org/card/euroscipy2011_call_for_papers

Organizers
==
Chairs:
 - Gaël Varoquaux (INSERM, Unicog team, and INRIA, Parietal team)
 - Nicolas Chauvat (Logilab)

Local organization committee:
 - Emmanuelle Gouillart (Saint-Gobain Recherche)
 - Jean-Philippe Chauvat (Logilab)

Tutorial chair:
 - Valentin Haenel (MKP, Technische Universität Berlin)

Program committee:
 - Chair: Tiziano Zito (MKP, Technische Universität Berlin)
 - Romain Brette (ENS Paris, DEC)
 - Emmanuelle Gouillart (Saint-Gobain Recherche)
 - Eric Lebigot (Laboratoire Kastler Brossel, Université Pierre et
   Marie Curie)
 - Konrad Hinsen (Soleil Synchrotron, CNRS)
 - Hans Petter Langtangen (Simula laboratories)
 - Jarrod Millman (UC Berkeley, Helen Wills NeuroScience institute)
 - Mike Müller (Python Academy)
 - Didrik Pinte (Enthought Inc)
 - Marc Poinot (ONERA)
 - Christophe Pradal (CIRAD/INRIA, Virtual Plantes team)
 - Andreas Schreiber (DLR)
 - Stéfan van der Walt (University of Stellenbosch)


Website
===
http://www.euroscipy.org/conference/euroscipy_2011


--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Backend for Pyside

2011-01-18 Thread Gael Varoquaux
On Tue, Jan 18, 2011 at 11:13:47PM -0700, Jed Ludlow wrote:
>Please forgive me if I'm raising a heretical question with this since I
>understand the�topic of competing Qt bindings for Python gets a little
>touchy in and of itself.
>[...]
>Has there been any additional discussion among the developers about
>creating a formal backend for Pyside?

Actually, I think that your question is not heretical at all, since the
GPL license (viral) on PyQt is somewhat in contradiction with the BSD
license (non viral) of matplotlib.

That said, somebody needs to do the work, and I can only offer cheers,
but not help.

Ga�l

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] A small fix for backend specification...

2010-08-25 Thread Gael Varoquaux
On Wed, Aug 25, 2010 at 02:57:50PM -0700, Fernando Perez wrote:
> [1] teaser for the curious:
> http://fperez.org/tmp/ipython_qt_pylab.png.  All code is in the
> 'newkernel' github branch.  Special credits to Evan Patterson from
> Enthought, the Qt brains behind the magic.

Freeking awesome!

Go go team!

Gaël

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] EuroScipy abstract submission deadline extended

2010-05-17 Thread Gael Varoquaux
Given that we have been able to turn on registration only very late, the
EuroScipy conference committee is extending the deadline for abstract
submission for the 2010 EuroScipy conference.

On Thursday May 20th, at midnight Samoa time, we will turn off the
abstract submission on the conference site. Up to then, you can modify
the already-submitted abstract, or submit new abstracts.

We are very much looking forward to your submissions to the conference.

Ga�l Varoquaux
Nicolas Chauvat

-- 
 
EuroScipy 2010 is the annual conference for scientists using Python. It
will be held July 8-11 2010, in ENS, Paris, France.
 
Links: 
Conference website: http://www.euroscipy.org/conference/euroscipy2010
Call for papers: http://www.euroscipy.org/card/euroscipy2010_call_for_papers
Practical information: 
http://www.euroscipy.org/card/euroscipy2010_practical_information
 


--

___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] [sympy] EuroScipy abstract submission deadline extended

2010-05-16 Thread Gael Varoquaux
Given that we have been able to turn on registration only very late, the
EuroScipy conference committee is extending the deadline for abstract
submission for the 2010 EuroScipy conference.

On Thursday May 20th, at midnight Samoa time, we will turn off the
abstract submission on the conference site. Up to then, you can modify
the already-submitted abstract, or submit new abstracts.

We are very much looking forward to your submissions to the conference.

Gaël Varoquaux
Nicolas Chauvat

-- 
 
EuroScipy 2010 is the annual European conference for scientists using
Python. It will be held July 8-11 2010, in ENS, Paris, France.
 
Links: 
Conference website: http://www.euroscipy.org/conference/euroscipy2010
Call for papers: http://www.euroscipy.org/card/euroscipy2010_call_for_papers
Practical information: 
http://www.euroscipy.org/card/euroscipy2010_practical_information
 


--

___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] EuroScipy is finally open for registration

2010-05-13 Thread Gael Varoquaux


 Registration for EuroScipy
  is finally open

To register, go to the website 
, create an account, 
and you will see a /‘register to the conference’/ button on the left. 
Follow it to a page which presents a /’shoping cart’/. Simply submitting 
this information registers you to the conference, and on the left of the 
website, the button will now display /‘You are registered for the 
conference’/.


The registration fee is 50 euros for the conference, and 50 euros for 
the tutorial. Right now there is no payment system: you will be 
contacted later (in a week) with instructions for paying.


We apologize for such a late set up. We do realize this has come as an 
inconvenience to people.


*Do not wait to register: the number of people we can host is limited.*


 An exciting program


   Tutorials: from beginners to experts

We have two tutorial tracks:

   * *Introductory tutorial* : to
 get you to speed on scientific programming with Python.
   * *Advanced tutorial* : experts
 sharing their knowledge on specific techniques and libraries.

 We are very fortunate to have a top notch set of presenters.


   Scientific track: doing new science in Python

Although the abstract submission is not yet over, We can say that we are 
going to have a rich set of talks, looking at the current submissions. 
In addition to the contributed talks, we have:


   * *Keynote speakers*
 : Hans Petter
 Langtangen and Konrard Hinsen, two major player of scientific
 computing in Python.
   * *Lightning talks* : one hour
 will be open for people to come up and present in a flash an
 interesting project.


   Publishing papers

We are talking with the editors of a major scientific computing journal, 
and the odds are quite high that we will be able to publish a special 
issue on scientific computing in Python based on the proceedings of the 
conference. The papers will undergo peer-review independently from the 
conference, to ensure high quality of the final publication.



 Call for papers

Abstract submission is still open, though not for long. We are 
soliciting contributions on scientific libraries and tools developed 
with Python and on scientific or engineering achievements using Python. 
These include applications, teaching, future development directions, and 
current research. See the call for papers 
.


*We are very much looking forward to passionate discussions about Python 
in science in Paris*


*Nicolas Chauvat and Gaël Varoquaux*



--

___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [Numpy-discussion] Announcing toydist, improving distribution and packaging situation

2010-01-03 Thread Gael Varoquaux
On Sun, Jan 03, 2010 at 03:05:54AM -0800, Nathaniel Smith wrote:
> What I do -- and documented for people in my lab to do -- is set up
> one virtualenv in my user account, and use it as my default python. (I
> 'activate' it from my login scripts.) The advantage of this is that
> easy_install (or pip) just works, without any hassle about permissions
> etc. This should be easier, but I think the basic approach is sound.
> "Integration with the package system" is useless; the advantage of
> distribution packages is that distributions can provide a single
> coherent system with consistent version numbers across all packages,
> etc., and the only way to "integrate" with that is to, well, get the
> packages into the distribution.

That works because either you use packages that don't have much hard-core
compiled dependencies, or these are already installed.

Think about installing VTK or ITK this way, even something simpler such
as umfpack. I think that you would loose most of your users. In my lab,
I do lose users on such packages actually.

Beside, what you are describing is possible without package isolation, it
is simply the use of a per-user local site-packages, which now semi
automatic in python2.6 using the '.local' directory. I do agree that, in
a research lab, this is a best practice.

Gaël

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [Numpy-discussion] [SciPy-dev] Announcing toydist, improving distribution and packaging situation

2010-01-01 Thread Gael Varoquaux
On Sat, Jan 02, 2010 at 11:32:00AM +0900, David Cournapeau wrote:
> [snip]
>   - supporting different variants of the same package in the
> dependency graph at install time

> [snip]

> The second issue is more challenging. It complicates the dependency
> handling quite a bit, and may cause difficult situations to happen at
> dependency resolution time. This becomes particularly messy if you mix
> packages you build yourself with packages grabbed from a repository. I
> wonder if there is a simpler solution which would give a similar
> feature set.


AFAICT, in Debian, the same feature is given via virtual packages: you
would have:

python-matplotlib
python-matplotlib-basemap

for instance.

It is interesting to note that the same source package may be used to
generate both binary, end-user, packages.

And happy new year!

Gaël

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [Numpy-discussion] Announcing toydist, improving distribution and packaging situation

2009-12-29 Thread Gael Varoquaux
On Tue, Dec 29, 2009 at 11:34:44PM +0900, David Cournapeau wrote:
> Buildout, virtualenv all work by sandboxing from the system python:
> each of them do not see each other, which may be useful for
> development, but as a deployment solution to the casual user who may
> not be familiar with python, it is useless. A scientist who installs
> numpy, scipy, etc... to try things out want to have everything
> available in one python interpreter, and does not want to jump to
> different virtualenvs and whatnot to try different packages.

I think that you are pointing out a large source of misunderstanding
in packaging discussion. People behind setuptools, pip or buildout care
to have a working ensemble of packages that deliver an application (often
a web application)[1]. You and I, and many scientific developers see
libraries as building blocks that need to be assembled by the user, the
scientist using them to do new science. Thus the idea of isolation is not
something that we can accept, because it means that we are restricting
the user to a set of libraries.

Our definition of user is not the same as the user targeted by buildout.
Our user does not push buttons, but he writes code. However, unlike the
developer targeted by buildout and distutils, our user does not want or
need to learn about packaging.

Trying to make the debate clearer...

Gaël

[1] I know your position on why simply focusing on sandboxing working
ensemble of libraries is not a replacement for backward compatibility,
and will only create impossible problems in the long run. While I agree
with you, this is not my point here.

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [SciPy-dev] Announcing toydist, improving distribution and packaging situation

2009-12-28 Thread Gael Varoquaux
On Mon, Dec 28, 2009 at 02:29:24PM -0500, Neal Becker wrote:
> Perhaps this could be useful:
> http://checkinstall.izto.org/

Yes, checkinstall is really cool. However, I tend to prefer things with
no magic that I don't have to sandbox to know what they are doing. This
is why I am also happy to hear about toydist.

Gaël

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Typo in matplotlib/image.py

2009-12-24 Thread Gael Varoquaux
On Thu, Dec 24, 2009 at 03:53:29PM -1000, Eric Firing wrote:
> It looks like someone already has, as part of additional changes.  SVN  
> is now at 8052, and I don't see the problem in either the maintenance  
> branch or the trunk.

Indeed, my mistake. I thought that I had svn uped, but seems like not.

Thanks, and merry Christmas!

Gaël

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Typo in matplotlib/image.py

2009-12-24 Thread Gael Varoquaux
Line 157 of image.py, there is a typo:

Index: matplotlib/image.py
===
--- matplotlib/image.py (revision 8036)
+++ matplotlib/image.py (working copy)
@@ -144,7 +144,7 @@
 sy = dyintv/viewlim.height
 numrows, numcols = A.shape[:2]
 if sx > 2:
-x0 = (viewim.x0-xmin)/dxintv * numcols
+x0 = (viewlim.x0-xmin)/dxintv * numcols
 ix0 = max(0, int(x0 - self._filterrad))
 x1 = (viewlim.x1-xmin)/dxintv * numcols
 ix1 = min(numcols, int(x1 + self._filterrad))

Could someone with check in rights fix this in SVN, please.

Cheers,

Gaël

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] [Ann] EuroScipy 2010

2009-12-13 Thread Gael Varoquaux
==
Announcing EuroScipy 2010
==

---
The 3rd European meeting on Python in Science
---

**Paris, Ecole Normale Supérieure, July 8-11 2010**

We are happy to announce the 3rd EuroScipy meeting, in Paris, July 2010.

The EuroSciPy meeting is a cross-disciplinary gathering focused on the
use and development of the Python language in scientific research.
This event strives to bring together both users and developers of
scientific tools, as well as academic research and state of the art
industry.


Important dates
==

== ===
**Registration opens**   Sunday March 29   

**Paper submission deadline**Sunday May 9 

**Program announced**Sunday May 22

**Tutorials tracks** Thursday July 8 - Friday July 9

**Conference track** Saturday July 10 - Sunday July 11  
 
== ===

Tutorial
=

There will be two tutorial tracks at the conference, an introductory one,
to bring up to speed with the Python language as a scientific tool, and
an advanced track, during which experts of the field will lecture on
specific advanced topics such as advanced use of numpy, scientific
visualization, software engineering...

Main conference topics


We will be soliciting talks on the follow topics:

- Presentations of scientific tools and libraries using the
  Python language, including but not limited to:

  - Vector and array manipulation

  - Parallel computing

  - Scientific visualization

  - Scientific data flow and persistence
   
  - Algorithms implemented or exposed in Python

  - Web applications and portals for science and engineering

- Reports on the use of Python in scientific achievements or ongoing  
  projects.

- General-purpose Python tools that can be of special interest to the
  scientific community.

Keynote Speaker: Hans Petter Langtangen 
==

We are excited to welcome Hans Petter Langtangen as our keynote speaker.

- Director of scientific computing and bio-medical research at Simula
  labs, Oslo
- Author of the famous book Python scripting for computational science
  http://www.springer.com/math/cse/book/978-3-540-73915-9


-- 
 
Gaël Varoquaux, conference co-chair
Nicolas Chauvat, conference co-chair
 
Program committee
.
Romain Brette (ENS Paris, DEC)
Mike Müller (Python Academy)
Christophe Pradal (CIRAD/INRIA, DigiPlantes team)
Pierre Raybault (CEA, DAM)
Jarrod Millman (UC Berkeley, Helen Wills NeuroScience institute)

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Gael Varoquaux
On Mon, Nov 09, 2009 at 08:21:30AM -0800, Andrew Straw wrote:
> Hi All,
>
> I have addressed what I think is a long-standing wart: zorder is mostly  
> ignored for imshow(). (See e.g.  
> http://old.nabble.com/Re%3A--Matplotlib-users--imshow-zorder-tt19047314.html#a19047314
>  
> ) The question is whether I should apply the attached patch.

IMHO: go for it!

Gaël

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] default "q" shortcut?

2009-10-21 Thread Gael Varoquaux
On Wed, Oct 21, 2009 at 09:23:54AM +0200, Georg Brandl wrote:
> Hi,

> one thing I missed when I switched from Gnuplot to matplotlib was that I
> can't press "q" to close a window but have to use the window manager; in
> one environment I work in that means I have to use the mouse to close a
> window.

I am +1 on that feature request. I don't have time to code it, though
:).

Gaël

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Can't save pdfs with MPL devel under Jaunty

2009-08-30 Thread Gael Varoquaux
On Sun, Aug 30, 2009 at 01:35:47PM +0300, Jouni K. Seppänen wrote:
> Gael Varoquaux  writes:

> > ImportError: /home/varoquau/dev/matplotlib/lib/matplotlib/ttconv.so:
> > undefined symbol: _ZN14TTStreamWriter7putcharEi

> > Does anybody know what I am doing wrong?

> I just had a similar problem, and nuking the build directory and
> rebuilding matplotlib fixed it. Have you tried "rm -rf build"?

Hey Jouni,

Yes, that did fix the problem. I suspect it might be trivial :). Thanks a
lot.

Gaël

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] ginput default mouse configuration

2009-08-30 Thread Gael Varoquaux
On Sat, Aug 29, 2009 at 10:45:31PM -0500, John Hunter wrote:
> I've tried to apply your code properly.  Because it was not a patch,
> but a simple code file submission (and the original files have changed
> since your submission) and because I did not write the original ginput
> code, it was touch sledding to apply the patch.  I think I got it
> right, but I would like people who use ginput and blocking input to
> give it a test drive (I did what basic tests I could, not being a
> power user).

Thank John you for doing the grunt work. It pushed me enough to do the
review that you had asked for. I am attaching a patch correcting a bug,
as well as improving the docs, and fixing a few unecessary imports.

As a side note, you guys should run pyflakes on your codebase every once
in a while. You have a lot of unused imports. Also, there seems to be
bigger problems such as

finance.py:169: undefined name 'url'
font_manager.py:221: undefined name 'WindowsError'
config/checkdep.py:67: undefined name 'verbose'
cbook.py:787: undefined name '__Full'
cbook.py:1414: undefined name 'glob'
cbook.py:1577: undefined name 'x'
cbook.py:1577: undefined name 'y'
cbook.py:1577: undefined name 'xi'
cbook.py:1577: undefined name 'extrap'

And many others that I am passing.

These might be bugs, or might not. I didn't take the time to check.

Cheers,

Gaël
Index: blocking_input.py
===
--- blocking_input.py	(revision 7596)
+++ blocking_input.py	(working copy)
@@ -17,9 +17,6 @@
 Note: Subclass of BlockingMouseInput.  Used by clabel
 """
 
-import time
-import numpy as np
-
 from matplotlib import path, verbose
 from matplotlib.cbook import is_sequence_of_strings
 
@@ -151,7 +148,7 @@
 button = event.button
 
 if button == self.button_pop:
-self.mouse_event_pop(event,-1)
+self.mouse_event_pop(event)
 elif button == self.button_stop:
 self.mouse_event_stop(event)
 else:
@@ -162,7 +159,7 @@
 Process a key click event.  This maps certain keys to appropriate
 mouse click events.
 '''
-
+
 event = self.events[-1]
 key = event.key.lower()
 
Index: figure.py
===
--- figure.py	(revision 7596)
+++ figure.py	(working copy)
@@ -12,12 +12,11 @@
 
 """
 import numpy as np
-import time
 
 import artist
 from artist import Artist, allow_rasterization
 from axes import Axes, SubplotBase, subplot_class_factory
-from cbook import flatten, allequal, Stack, iterable, dedent
+from cbook import flatten, allequal, Stack, iterable
 import _image
 import colorbar as cbar
 from image import FigureImage
@@ -1114,6 +1113,12 @@
 
 Right clicking cancels last input.
 
+The buttons used for the various actions (adding points, removing
+points, terminating the inputs) can be overriden via the
+arguments *mouse_add*, *mouse_pop* and *mouse_stop*, that give
+the associated mouse button: 1 for left, 2 for middle, 3 for
+right.
+
 The keyboard can also be used to select points in case your mouse
 does not have one or more of the buttons.  The delete and backspace
 keys act like right clicking (i.e., remove last point), the enter key
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Can't save pdfs with MPL devel under Jaunty

2009-08-30 Thread Gael Varoquaux
It must be me being stupid build MPL under the latest Ubuntu (has it
become harder lately? I have this impression), but I can't save pdfs with
a development version of MPL:

/home/varoquau/dev/matplotlib/lib/matplotlib/backends/backend_pdf.py in
()
 42 from matplotlib.transforms import Affine2D, Bbox, BboxBase,
TransformedPath
 43 from matplotlib.path import Path
---> 44 from matplotlib import ttconv
 45 
 46 # Overview


ImportError: /home/varoquau/dev/matplotlib/lib/matplotlib/ttconv.so:
undefined symbol: _ZN14TTStreamWriter7putcharEi

Does anybody know what I am doing wrong?

Thanks,

Gaël

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] writing plain text to multi page pdf

2009-08-27 Thread Gael Varoquaux
On Thu, Aug 27, 2009 at 04:57:55PM -0500, John Hunter wrote:
> One of my colleagues want to use PdfPages to create several mpl
> figures in one pdf document.  It would be nice to be able to write
> some text in there directly.  One could use the matplotlib.text.Text
> and add it to your figure, and maybe this is the way to go, but is it
> possible or desirable to expose a simple bulk text field in PdfPage
> and PdfPages

I could use that too :).

Gaël

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Building matplotlib on os x

2009-08-13 Thread Gael Varoquaux
On Thu, Aug 13, 2009 at 11:54:56AM -0500, Dave Peterson wrote:
>That depends.  When doing a  "python setup.py install" where setup.py's
>setup() function is imported from setuptools instead of distutils, then
>the setuptools install command deactivates any other eggs in the python
>environment, installs a "distutils" style install of the project in
>question, creates an .egg-info file in the install directory which acts
>just like a .egg, and finally updates the easy-install.pth in that install
>directory to reflect that the new install is active.

>If the setup.py uses the setup() function from distutils, then none of
>that happens and Gael is right.  Any previous install of matplotlib via
>setuptools will go to the front of the sys.path and the new install won't
>be seen.

matplotlib's setup.py does not import from setuptools, and I can't blame
them :p.

Gaël

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] ginput default mouse configuration

2009-08-13 Thread Gael Varoquaux
On Tue, Aug 11, 2009 at 07:53:29PM -0400, Jack Sankey wrote:
>Sorry for spamming, but I have another addition to
>BlockingMouseInput.add_click, that fixes the problem of the graphics
>jumping around while ginputting. This makes it much easier to zoom in on
>an imshow() plot and click a bunch of points, for example (it used to zoom
>all the way out!):

Hey Jack,

If you cannot send an 'svn diff' of your changes, would you mind sending
the modified files all together? It is hard to review changes when
gathering them from various mails: so easy to forget a change.

Cheers,

Ga�l

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Building matplotlib on os x

2009-08-13 Thread Gael Varoquaux
On Thu, Aug 13, 2009 at 09:30:22AM -0600, Jeff Whitaker wrote:
> Ariel Rokem wrote:
> > Resending with CC to list:

> > D'oh. I forgot to do that. OK - now I went back and ran:

> > env ARCHFLAGS='-arch i386' python setup.py install

> > That also went with no hitches

> > Then, in Python:


>  import matplotlib
>  matplotlib.__version__

> > '0.98.5.2'


> Ariel:  This tells me you really didn't install it, or you installed it 
> in a different version of python than you are trying to import it with.

> > So - still no version update. I ran:

> > 'easy_install matplotlib', which somehow seems to change the path
> > setting to find the most recent version of things (maybe someone here
> > can tell me how this happens?) now:


I am not sure that Ariel didn't install things right. He might be a
victim of setuptools' monkey patching of sys.path. Ariel, you should go
around in the various easy_install.pth in the different folder on you
Python path (that is the system ones as well as the ones in your
$PYTHONPATH) and make sure that any reference to matplotlib is removed.

Gaël

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] kwdoc processing with decorators

2009-08-13 Thread Gael Varoquaux
On Thu, Aug 13, 2009 at 10:52:24AM -0400, Darren Dale wrote:
> I am aware of functools.wraps and have used it myself. So far we are
> only modifying and returning the original function, not a wrapped
> version of the original, so functools.wraps is not necessary.

OK, as I suspected, I was not reading the code properly.

Thanks for your answer.

Gaël

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] kwdoc processing with decorators

2009-08-13 Thread Gael Varoquaux
On Thu, Aug 13, 2009 at 10:12:23AM -0400, Darren Dale wrote:
> I appreciate how much time has gone into the patch, but this impacts
> so much code I think it is important to really nail the
> implementation. I think everything should be rolled up into a single
> high level decorator if possible. I offered a suggestion in the
> tracker. Consider:

> with_doc(*args, **kwargs):
> mod_doc(f):
> if args:
> if not isinstance(args[0], str):
> # inherit docstring from first argument
> inherit = args.pop(0).__doc__
> if f.__doc__ is None:
> f.__doc__ = inherit
> else:
> f.__doc__ = inherit + '\n\n' +  f.__doc__
> if kwargs:
> # mapping interpolation
> f.__doc__ = f.__doc__ % kwargs
> if args:
> try:
> # inserting
> f.__doc__ = f.__doc__ % args
> except TypeError:
>  # appending
>  if f.__doc__ is None:
>  f.__doc__ = ''
>  f.__doc__ = f.__doc__ + '\n\n'+ '\n\n'.join(args)
> return f
> return mod_doc

I have not followed the conversation, so please forgive me if I am
talking bull**, but why are you not using functools.wraps? I have found
it is useful to make really sure that you are keeping all the
properties of a function that you want to decorate.

Gaël

PS: Some of the mayavi codebase should be changed to use wraps, so don't
take this as a blame, but more as a question :).

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [IPython-dev] [Enthought-Dev] Ctypes based prototype of PyOS_InputHook for wx 2.8 and 2.9

2009-07-17 Thread Gael Varoquaux
On Fri, Jul 17, 2009 at 02:13:08PM -0600, Ondrej Certik wrote:
> so I also reduced the sleep in #3 from 0.05 to 0.01 and then #3 is
> absolutely smooth for me and also pasting to ipython is immediate e.g.
> this looks like a perfect solution to me.

Polling at 100Hz is a horrendous solution from a technical point of view.
I typical have a dozen IPython instances opened, where I have been
working a while ago, but not doing anything right now, because I am
planning to come back to it. Having these all poll at a 100Hz wil keep my
laptop hot, make it switch context all the time, and drain the battery.
Adobe Flash works that way. I use it as seldom as possible.

One trick I play sometimes when I am developping software that needs to
poll and cannot be event-driven, is to unable polling when there is
activity, but turn it off when there is None. I am not sure how you can
adapt the idea here, though.

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [IPython-dev] [Enthought-Dev] Ctypes based prototype of PyOS_InputHook for wx 2.8 and 2.9

2009-07-16 Thread Gael Varoquaux
On Thu, Jul 16, 2009 at 11:27:51PM -0600, Ondrej Certik wrote:
> and I didn't notice any speed difference --- e.g. it's as slow as
> regular mayavi with ipython -wthread. :)

Nice, nice!

Test the volume_slicer example, with latest release, please. That should
be a good test.

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Ctypes based prototype of PyOS_InputHook for wx 2.8 and 2.9

2009-07-16 Thread Gael Varoquaux
On Thu, Jul 16, 2009 at 03:26:23PM -0700, Brian Granger wrote:
>I am attaching a working ctypes based prototype of a module that allows wx
>to be used interactively from *both* python and ipython.� It uses
>PyOS_InputHook and has been tested on wx 2.8 and 2.9 (trunk) on Mac OS X
>(python 2.5).

>It can be used with an existing wx install and all versions of ipython,
>but ***don't use the -pylab or -wthread flag***.� At this point, I need
>help testing the heck out of this (window and linux users esp).� I have
>run most matplotlib pylab_examples and they work fine.� I also need people
>to try out things like ETS/Mayavi.� The current plan is to replace the
>existing threaded shells in IPython with this (much simpler) code.

I won't be able to do that reliably before two weeks, I am travelling and
have deadlines on top of that. Maybe somebody else can try this?

Cheers,

Ga�l

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [IPython-dev] IPython proposal: getting rid of "ipython -pylab\-wthread\etc."

2009-07-16 Thread Gael Varoquaux
On Thu, Jul 16, 2009 at 02:34:01PM -0700, Brian Granger wrote:
>Yes, 2.8 is latest stable, so we should support it.� How many people would
>complain if 2.6 were not supported?� I take it that all of ETS is 2.8
>based?

ETS works better on wx 2.8, but it also works on 2.6, with small bugs.

Ga�l

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [IPython-dev] IPython proposal: getting rid of "ipython -pylab\-wthread\etc."

2009-07-16 Thread Gael Varoquaux
On Thu, Jul 16, 2009 at 01:36:21PM -0700, Brian Granger wrote:
>What versions of what GUI toolkits do we realistically need to support
>moving forward (today and beyond)?� By this, I mean that:

>"unsupported" = older versions of GUIs toolkits that will have to use
>older versions of IPython.
>�"supported" = versions of GUIS that will be able to use the
>PyOS_InputHook approach in newer releases of IPython.

For Wx, we would obviously need to support 2.8. We can toy with the idea
of not supporting 2.6, I believe. A lot of people are starting to feel
that 2.6 is depreciated.

Ga�l

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [IPython-dev] IPython proposal: getting rid of "ipython -pylab\-wthread\etc."

2009-07-16 Thread Gael Varoquaux
On Thu, Jul 16, 2009 at 10:45:04AM -0700, Brian Granger wrote:
>Obviously, the creation of the IApp object should be put into the GUI
>toolkit initialization code in mpl/mayavi/etc.� I will work with Robin to
>get a version of wx posted that has the patched applied so people can
>begin to test this.

OK, that's great. It enlightens me. So, it seems you guys are on the
right track. I'll just wait for the new versions of wx to come out. You
are doing great work on that.

One piece of warning: Wx has a terrible upgrade path. Upgrading it breaks
stuff. As a consequence, people don't upgrade it often, and my experience
is that we have to maintain compatibility with old version for years (at
least 3 years: in Ubuntu, latest release, installing SPE drags along
wxPython 2.6, and thus people find themselves importing this version
without realizing it).

Ga�l

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [IPython-dev] IPython proposal: getting rid of "ipython -pylab\-wthread\etc."

2009-07-16 Thread Gael Varoquaux
On Thu, Jul 16, 2009 at 10:38:56AM -0700, Brian Granger wrote:
>But, at some point, we will have to say "if you want the old threaded
>shells, you will have to use an older version of IPython".� We just have
>to figure out what the transition looks like.

As long as the packages sitting outside of IPython have a way of dealing
with both reasonnably easily that fine. What we don't want to happen is
having confusing errors or instructions depending on the version of
IPython people use.

As Michael points out, there will be people using the old model for a
long time.

Ga�l

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [IPython-dev] IPython proposal: getting rid of "ipython -pylab\-wthread\etc."

2009-07-16 Thread Gael Varoquaux
On Thu, Jul 16, 2009 at 08:28:11PM +0300, Ville M. Vainio wrote:
> On Thu, Jul 16, 2009 at 8:20 PM, Gael
> Varoquaux wrote:

> > Would it be possible for IPython to expose both solutions for a while
> > (say 6 month to a year), so that we all have time to adapt?

> You can start adapting already, as indicated in previous post. Just
> adjust the embedding code, and any old version of ipython will work.

So, ... I am dumb, and I haven't been following things well enough (not
enough time). Concretely, what do I need to do to be able to launch
IPython, and pop up a wx dialog not blocking IPython with the new
technology?

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [IPython-dev] IPython proposal: getting rid of "ipython -pylab\-wthread\etc."

2009-07-16 Thread Gael Varoquaux
On Thu, Jul 16, 2009 at 10:04:33AM -0700, Brian Granger wrote:
>So, how does affect your project?

>* People will be able to use your project interactive from the regular
>python prompt.
>* You will need to make small changes to your GUI toolkits initialization
>code.
>* All of us will need to coordinate version transitions to make sure that
>there is a clean transition to this new approach.
>* I need help testing the new approach (especially with wxPython) to make
>sure that your project actually works with the new approach.

Would it be possible for IPython to expose both solutions for a while
(say 6 month to a year), so that we all have time to adapt?

Ga�l

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] [ANN] Announcing the SciPy conference schedule

2009-07-15 Thread Gael Varoquaux
The SciPy conference committee is pleased to announce the schedule of the
conference:

http://conference.scipy.org/schedule

This year’s program is very rich. In order to limit the number of
interesting talks that we had to turn down, we decided to reduce the
length of talks. Although this results in many short talks, we hope that
it will foster discussions, and give new ideas. Many subjects are
covered, both varying technical subject in the scientific computing
spectrum, and covering a lot of different research areas.

I would personally like to thank the members of the program committee,
who spent time reviewing the proposed abstracts and giving the chairs
feedback.

Fernando Perez and the tutorial presenters are hard at work finishing
planning all the details of the two-day tutorial session that will
precede the conference. An introduction tutorial track and an advanced
tutorial track, both covering various aspect of scientific computing in
Python, presented by experts in the field, should help many people
getting up to speed on the amazing technology driving this community.

The SciPy 2009 program committee

* Co-Chair Gaël Varoquaux, Applied Mathematics and Neuroscience,
* Neurospin, CEA - INRIA Saclay (France)
* Co-Chair Stéfan van der Walt, Applied Mathematics, University of
* Stellenbosch (South Africa)
* Michael Aivazis, Center for Advanced Computing Research, California
* Institute of Technology (USA)
* Brian Granger, Physics Department, California Polytechnic State
* University, San Luis Obispo (USA)
* Aric Hagberg, Theoretical Division, Los Alamos National Laboratory
* (USA)
* Konrad Hinsen, Centre de Biophysique Moléculaire, CNRS Orléans
* (France)
* Randall LeVeque, Mathematics, University of Washington, Seattle
* (USA)
* Travis Oliphant, Enthought (USA)
* Prabhu Ramachandran, Department of Aerospace Engineering, IIT
* Bombay (India)
* Raphael Ritz, International Neuroinformatics Coordinating Facility
* (Sweden)
* William Stein, Mathematics, University of Washington, Seattle (USA)

Conference Chair: Jarrod Millman, Neuroscience Institute, UC Berkeley
(USA)


--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Fixing matplotlib for wxPython 2.8

2009-07-11 Thread Gael Varoquaux
On Sat, Jul 11, 2009 at 08:18:25AM -1000, Eric Firing wrote:
> Thank you for the testing and reporting.  I don't normally use wx and I  
> am not willing to fiddle with multiple versions of it, so I am working  
> almost blind on this.

I use wx a lot, and with MPL embedded in other programs, so I am a good
test bed, and will hopefully catch major problems. However, I of course
cover only the configurations I have installed on the various boxes I
work on.

One of the really nice things with MPL, is that there is a significant
user base working from SVN, and thus catching problems early.

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Fixing matplotlib for wxPython 2.8

2009-07-11 Thread Gael Varoquaux
On Sat, Jul 11, 2009 at 08:10:23AM -1000, Eric Firing wrote:
> OK, I tried again in svn 7256.  I think this is a little cleaner.  More  
> diagnostic information could still be added to the exception messages if  
> this is going to be a continuing problem.

It seems to work for me in all the configurations I can think of (and
does raises the error when 2.6 is imported instead of 2.8.). I could be
forgetting configurations, as the combinatory is high.

These things are hard problems, thanks for your work.

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Fixing matplotlib for wxPython 2.8

2009-07-11 Thread Gael Varoquaux
On Sat, Jul 11, 2009 at 12:49:03PM -0500, John Hunter wrote:
> > Can you do an 'import wxversion; print wxversion.__file__', so that we
> > understand better why you are getting these warnings.

> In [1]: import wxversion

> In [2]: print wxversion.__file__
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wxversion.pyc

Hell, sorry, I don't understand why you are getting the warning.

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Fixing matplotlib for wxPython 2.8

2009-07-11 Thread Gael Varoquaux
On Sat, Jul 11, 2009 at 12:38:13PM -0500, John Hunter wrote:
> If I can speak for the typical user, these kinds of warnings are
> usually annoying and not that helpful.  I am a naive wx user -- I
> installed it many moons ago from a binary when I installed python and
> haven't thought about it since.  I don't know what wxversion is or how
> to upgrade it.  All I know is mpl was working fine, still works fine,
> and now generates an annoying warning.   So I am not sure this is
> progress, but may help someone who has a complicated wx setup avoid
> difficult to trackdown bug.   So I would prefer to silence this, but
> am not sure what the right solution is. Here is my wx installation

I am a bit like you. I believe these warning are not terribly helpful.

Can you do an 'import wxversion; print wxversion.__file__', so that we
understand better why you are getting these warnings.

Cheers,

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Fixing matplotlib for wxPython 2.8

2009-07-10 Thread Gael Varoquaux
On Fri, Jul 10, 2009 at 11:05:24PM +0200, Gael Varoquaux wrote:
> > Committed to svn.  Please check it.

> Certainly does work betters. 

Actually, I beg your pardon, but it does not really work: if you have
2.6 and 2.8 installed, it will still import 2.6, which is not what you
want.

Here is a patch that works a bit better: it does import 2.8 even when 2.6
is installed:

Index: lib/matplotlib/backends/backend_wx.py
===
--- lib/matplotlib/backends/backend_wx.py   (revision 7251)
+++ lib/matplotlib/backends/backend_wx.py   (working copy)
@@ -124,6 +124,12 @@
 else:
 warnings.warn(
 "Update your wxversion.py to one including
AlreadyImportedError")
+try:
+wxversion.ensureMinimal('2.8')
+except wxversion.VersionError:
+pass
+
+
 
 try:
 import wx

Thanks for your work,

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Fixing matplotlib for wxPython 2.8

2009-07-10 Thread Gael Varoquaux
On Fri, Jul 10, 2009 at 09:41:30AM -1000, Eric Firing wrote:
>> OK, but right now MPL is broken with my version of wxversion, which is the
>> one shipped by default in Ubuntu. So it is broken for a lot of user.
>
> Are you sure?  Could you be pulling in some other wxversion?  The only  
> other person reporting this problem so far is Tony Yu. I am now on  
> jaunty, and my wxversion has AlreadyImportedError.  What version of  
> ubuntu are you using, and what is the full wx version that it includes?

Ha, interesting:

$ ipython   
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) 
Type "copyright", "credits" or "license" for more information.

IPython 0.10.bzr.r1163 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import wxversion

In [2]: wxversion.__file__
Out[2]: '/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode/wxversion.pyc'

So, if wx2.6 is installed (I have 2.8 installed too), we run into these
problem.

Also, it is interesting to see that the older wxversion gets imported.
That does defeat the purpose of wxversion :). It means that you can't
have multiple versions of wx installed.

>> It seems wrong for me to require the users to upgrade wxversion while
>> there is a solution that works, eventhough it may not be exactly what you
>> want.
>
> The solution you propose doesn't work.  It completely defeats the  
> version check.

In a way it does. So we can add a check:

"if 'wx' in sys.module:"

to replace the "AlreadyImportedError", it is clearly bug ware.

>> One solution is to do bugware with hasattr(wxversion, 'AlreadyImportedError')
>
> Committed to svn.  Please check it.

Certainly does work betters. Also, the "AlreadyImported" problem is
caught elsewhere if I preimport an older version of wx:

File "/home/varoquau/dev/matplotlib/lib/pylab.py", line 1, in 
from matplotlib.pylab import *
  File "/home/varoquau/dev/matplotlib/lib/matplotlib/pylab.py", line 244,
in 
from matplotlib.pyplot import *
  File "/home/varoquau/dev/matplotlib/lib/matplotlib/pyplot.py", line 76,
in 
new_figure_manager, draw_if_interactive, show = pylab_setup()
  File
"/home/varoquau/dev/matplotlib/lib/matplotlib/backends/__init__.py", line
25, in pylab_setup
globals(),locals(),[backend_name])
  File
"/home/varoquau/dev/matplotlib/lib/matplotlib/backends/backend_wxagg.py",
line 23, in 
import backend_wx# already uses wxversion.ensureMinimal('2.8')
  File
"/home/varoquau/dev/matplotlib/lib/matplotlib/backends/backend_wx.py",
line 137, in 
raise ImportError(missingwx)
ImportError: Matplotlib backend_wx and backend_wxagg require wxPython >=2.8

Thanks for your fix.

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Fixing matplotlib for wxPython 2.8

2009-07-10 Thread Gael Varoquaux
On Fri, Jul 10, 2009 at 08:12:14AM -1000, Eric Firing wrote:
> Gael Varoquaux wrote:
>> It seems that matplotlib needs the following patch for wxPython 2.8
>> (traceback hard to replicate, as you need to import wx before importing
>> matplotlib):

>> Index: lib/matplotlib/backends/backend_wx.py
>> ===
>> --- lib/matplotlib/backends/backend_wx.py   (revision 7250)
>> +++ lib/matplotlib/backends/backend_wx.py   (working copy)
>> @@ -117,7 +117,7 @@
>>   try:
>>  wxversion.ensureMinimal('2.8')
>> -except wxversion.AlreadyImportedError:
>> +except wxversion.VersionError:
>>  pass
>>   try:
>
> No, that is not a good solution:
> http://www.mail-archive.com/matplotlib-devel@lists.sourceforge.net/msg05003.html

OK, but right now MPL is broken with my version of wxversion, which is the
one shipped by default in Ubuntu. So it is broken for a lot of user.

It seems wrong for me to require the users to upgrade wxversion while
there is a solution that works, eventhough it may not be exactly what you
want.

One solution is to do bugware with hasattr(wxversion, 'AlreadyImportedError')

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Fixing matplotlib for wxPython 2.8

2009-07-10 Thread Gael Varoquaux
It seems that matplotlib needs the following patch for wxPython 2.8
(traceback hard to replicate, as you need to import wx before importing
matplotlib):

Index: lib/matplotlib/backends/backend_wx.py
===
--- lib/matplotlib/backends/backend_wx.py   (revision 7250)
+++ lib/matplotlib/backends/backend_wx.py   (working copy)
@@ -117,7 +117,7 @@
 
 try:
 wxversion.ensureMinimal('2.8')
-except wxversion.AlreadyImportedError:
+except wxversion.VersionError:
 pass
 
 try:

And, by the way, I just had a brain fart, and sent a stupid e-mail on the
same subject. I am not sure where it went, but please disregard it.

Cheers;

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Fixing matplotlib for wxPython 2.8

2009-07-10 Thread Gael Varoquaux
It seems that the following fix is necessary for matplolitb to work
wxPython 2.8.

Index: lib/matplotlib/backends/backend_wx.py
===
--- lib/matplotlib/backends/backend_wx.py   (revision 7250)
+++ lib/matplotlib/backends/backend_wx.py   (working copy)
@@ -117,7 +117,7 @@
 
 try:
 wxversion.ensureMinimal('2.8')
-except wxversion.AlreadyImportedError:
+except wxversion.VersionError()
 pass

Cheers,

Gaël

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] crazy ideas for MPL (was: scipy conference)

2009-07-01 Thread Gael Varoquaux
On Wed, Jul 01, 2009 at 08:39:30AM -0500, John Hunter wrote:
> Anyone interested?  And if so, feel free to suggest topics or weigh in
> on some I listed.

Actually, I have something I would like to discuss, but never really
could pull myself together to do it. I don't have time right now, but I
am still going to jot down the ideas.

The axes and figure paradigm inherited from matlab works well for simple
things, but when I want to more complex layouts, I actually end up
struggling with calls to axes with numerical parameters to adjust. In
addition, if I have a function that creates a plot with multiple axes,
like the figure on:
http://neuroimaging.scipy.org/site/doc/manual/html/neurospin/activation_map.html
I may want to reuse that function to create more complex figures,
stacking several of these views, with possibly other plots.

It seems to me having a level of granularity between the figure, and the
axes would help me a lot achieving these goals. I haven't had time to
hash out an API, or even solid concepts. For people who know LaTeX well,
let me draw an analogy: the figure is the page, the axis is the
character, what we are lacking in a 'minipage'. I would like a container
that can be stacked into a figure, and that can either hold axes, or
similar containers. That way, I could specify subplot, or axis relative
to this container, rather than relative to the whole figure, and it makes
it really easy for me to insert figures in larger figures.

One possible API would be 'subfigure', which would have a signature
similar to 'axes', but of course things would need to be thought a bit
more in detail: do we want clf to erase the figure and not the subfigure?
I believe so. Do we want subplot to divide the subfigure, rather than the
figure? I believe so too. How do we go back to full figure without
erasing the subfigures it contains? I think subfigure(None) might work.
How do I select a subfigure I already created? Maybe by passing it a
subfigure instance, like the way axes work.

Also, Chaco has the notion of containers, in which you can stack plots or
other containers. They have an additional feature which is that they
enable you to stack plot (these would be axes, in matplotlib terms) and
do an automatic layout of the plots. Very handy to have an extensible
canvas to display information on. Some sparse documentation:
http://code.enthought.com/projects/chaco/docs/html/api/containers.html

I have been trying to find time to think about this for more than a year,
and haven't. This is why I am sending unfinished thoughts. I do believe
more thinking has to be done, and the subfigure proposition may not hold
at all. Also, I fear I do not have time to implement this.

My 2 cents,

Gaël

--
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] SciPy abstract submission deadline extended

2009-06-27 Thread Gael Varoquaux
Greetings,

The conference committee is extending the deadline for abstract
submission for the Scipy conference 2009 one week. 

On Friday July 3th, at midnight Pacific, we will turn off the abstract
submission on the conference site. Up to then, you can modify the
already-submitted abstract, or submit new abstracts.

Submitting Papers
-

The program features tutorials, contributed papers, lightning talks, and
bird-of-a-feather sessions. We are soliciting talks and accompanying
papers (either formal academic or magazine-style articles) that discuss
topics which center around scientific computing using Python. These
include applications, teaching, future development directions, and
research. A collection of peer-reviewed articles will be published as
part of the proceedings.

Proposals for talks are submitted as extended abstracts. There are two
categories of talks:

Paper presentations

These talks are 35 minutes in duration (including questions). A
one page abstract of no less than 500 words (excluding figures and
references) should give an outline of the final paper. Proceeding papers
are due two weeks after the conference, and may be in a formal academic
style, or in a more relaxed magazine-style format.

Rapid presentations

These talks are 10 minutes in duration. An abstract of between
300 and 700 words should describe the topic and motivate its relevance to
scientific computing.

In addition, there will be an open session for lightning talks during
which any attendee willing to do so is invited to do a
couple-of-minutes-long presentation.

If you wish to present a talk at the conference, please create an account
on the website (http://conference.scipy.org). You may then submit an
abstract by logging in, clicking on your profile and following the
"Submit an abstract" link.


Submission Guidelines

* Submissions should be uploaded via the online form.
* Submissions whose main purpose is to promote a commercial product
  or service will be refused.
* All accepted proposals must be presented at the SciPy conference by
  at least one author.
* Authors of an accepted proposal can provide a final paper for
  publication in the conference proceedings. Final papers are limited
  to 7 pages, including diagrams, figures, references, and
  appendices. The papers will be reviewed to help ensure the
  high-quality of the proceedings.

For further information, please visit the conference homepage:
http://conference.scipy.org.


The SciPy 2009 executive committee
---

 * Jarrod Millman, UC Berkeley, USA (Conference Chair)
 * Gaël Varoquaux, INRIA Saclay, France (Program Co-Chair)
 * Stéfan van der Walt, University of Stellenbosch, South Africa (Program 
Co-Chair)
 * Fernando Pérez, UC Berkeley, USA (Tutorial Chair)



--
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] [Correction] Re: [ANN] SciPy 2009 conference opened up for registration

2009-06-19 Thread Gael Varoquaux
Please excuse me for incorrect information in my announcement:

On Fri, Jun 19, 2009 at 04:01:58PM +0200, Gael Varoquaux wrote:
> We are very happy to announce that this year registration to the
> conference will be only $150, sprints $100, and students get half price!

This should read that the tutorials are $100, not the sprints. The
sprints are actually free, off course. We will be very please to see as
many people as possible willing to participate at the sprint in making
the SciPy ecosystem thrive.

Thanks to Travis Oliphant for pointing out the typo.

Gaël Varoquaux

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] [ANN] SciPy 2009 conference opened up for registration

2009-06-19 Thread Gael Varoquaux
We are finally opening the registration for the SciPy 2009 conference. It
took us time, but the reason is that we made careful budget estimations
to bring the registration cost down.

We are very happy to announce that this year registration to the
conference will be only $150, sprints $100, and students get half price!
We made this effort because we hope it will open up the conference to
more people, especially students that often have to finance this trip
with little budget. As a consequence, however, catering at noon is not
included.

This does not mean that we are getting a reduced conference. Quite on the
contrary, this year we have two keynote speakers. And what speakers:
Peter Norvig and Jon Guyer! Peter Norvig is the director of research at
Google and Jon Guyer is a research scientist at NIST, in the
Thermodynamics and Kinetics Group, where he leads a fiPy, a finite
element project in Python.

The SciPy 2009 Conference
==

SciPy 2009, the 8th Python in Science conference
(http://conference.scipy.org), will be held from
August 18-23, 2009 at Caltech in Pasadena, CA, USA.

Each year SciPy attracts leading figures in research and scientific
software development with Python from a wide range of scientific and
engineering disciplines. The focus of the conference is both on
scientific libraries and tools developed with Python and on scientific or
engineering achievements using Python.

Call for Papers


We welcome contributions from the industry as well as the academic world.
Indeed, industrial research and development as well academic research
face the challenge of mastering IT tools for exploration, modeling and
analysis.

We look forward to hearing your recent breakthroughs using Python! Please
read the full call for papers
(http://conference.scipy.org/call_for_papers).

Important Dates


* Friday, June 26: Abstracts Due
* Saturday, July 4: Announce accepted talks, post schedule
* Friday, July 10: Early Registration ends
* Tuesday-Wednesday, August 18-19: Tutorials
* Thursday-Friday, August 20-21: Conference
* Saturday-Sunday, August 22-23: Sprints
* Friday, September 4: Papers for proceedings due


The SciPy 2009 executive committee
---

 * Jarrod Millman, UC Berkeley, USA (Conference Chair)
 * Gaël Varoquaux, INRIA Saclay, France (Program Co-Chair)
 * Stéfan van der Walt, University of Stellenbosch, South Africa
 * (Program Co-Chair)
 * Fernando Pérez, UC Berkeley, USA (Tutorial Chair)




--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] mplot3d update

2009-06-08 Thread Gael Varoquaux
On Mon, Jun 08, 2009 at 10:30:09AM -0700, Fernando Perez wrote:
> Reinier, I'm sure if you ping Gael he'd be happy to share some
> thoughts with you, he's very interested in code reusability (he may be
> on this list for all I know, but I did CC him just to be safe).

I am around. :)

Have a look at 
http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/mlab.html
for an overview on the mlab API. 
You might also be interested in
http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/mlab_reference.html#module-enthought.mayavi.mlab
for the reference of all functions.

Indeed, it would be great if mayavi.mlab and the 3D plotting module of
matplotlib were drop-in replacements, with regards to the simple API. We
really designed mlab's API looking at matplotlib's API and used the
similar API where possible.

Gaël

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] traits?

2009-05-18 Thread Gael Varoquaux
On Mon, May 18, 2009 at 10:41:22PM -0400, Darren Dale wrote:
>I had tried to work things out so mpl would only install traits if traits
>wasn't already installed, or if the installed version had also been
>provided by mpl. That turned out to be insufficient to avoid the problems
>[...]

>To make a long story short, it won't happen again.

Excellent. 

I do agree with both of you that shipping Traits with matplotlib is very
likely to get all of us in trouble.

If there are issue with having Traits as a dependency, they must be
adressed in the Traits codebase.

Gaël

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Colormaps modifying inplace the input argument?

2009-04-19 Thread Gael Varoquaux
It seems that the colormaps are now modifying inplace the input
arguments:

resting ~ $ ipython -pylab
Python 2.5.2 (r252:60911, Oct  5 2008, 19:24:49) 
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

  Welcome to pylab, a matplotlib-based Python environment.
  For more information, type 'help(pylab)'.

In [1]: import numpy as np

In [2]: from pylab import cm

In [3]: values = np.linspace(0., 1., 3)

In [4]: values
Out[4]: array([ 0. ,  0.5,  1. ])

In [5]: _ = cm.summer(values)

In [6]: values
Out[6]: array([   0.   ,  128.   ,  255.744])

I think this is very bad. I don't see where it is mentionned in the
docstring, but even if it were, I still would disapprove.

My 2 cents,

Ga�l

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] [patch] fix for sphinxext on recent versions of sphinx

2009-03-27 Thread Gael Varoquaux
Here is a patch to fix a trivial problem I am having using the plot
directive under recent versions of sphinx (0.6b1).

Ga�l
Index: lib/matplotlib/sphinxext/plot_directive.py
===
--- lib/matplotlib/sphinxext/plot_directive.py  (revision 7005)
+++ lib/matplotlib/sphinxext/plot_directive.py  (working copy)
@@ -17,6 +17,7 @@
 """
 
 import sys, os, glob, shutil, hashlib, imp, warnings, cStringIO
+import re
 try:
 from hashlib import md5
 except ImportError:
@@ -33,7 +34,10 @@
 import sphinx
 
 sphinx_version = sphinx.__version__.split(".")
-sphinx_version = tuple([int(x) for x in sphinx_version[:2]])
+# The split is necessary for sphinx beta versions where the string is
+# '6b1'
+sphinx_version = tuple([int(re.split('[a-z]', x)[0]) 
+for x in sphinx_version[:2]])
 
 import matplotlib
 import matplotlib.cbook as cbook
--
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Gael Varoquaux
On Thu, Mar 05, 2009 at 07:03:00PM +0100, Cohen-Tanugi Johann wrote:
> Nevertheless, I hate to think of matplotlib sending people to mayavi2 each 
> time 3D plotting is needed. Basic functionalities built-in would still be 
> highly desirable.

Absolutely. I think we need basic 3D plotting functionnality that work
without any 3D rendering library, both for robustess and for simplicity.

I used to think different, because I believe that this approach is bound
to fail on anything but very simple problems (my experience with gnuplot
:>). I fear people are going to try and pull too far the simple 3D
implementation.

Nevertheless, it would be great to have some 3D in matplotlib, for easier
mixing of 2D and 3D (I do this with Mayavi2 by saving to a temporary
file, loading the result with matplotlib's imread, and displaying it with
an imshow -- ugly!), and to have backend-universal, robust, 3D plotting.

Gaël

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Gael Varoquaux
On Thu, Mar 05, 2009 at 11:44:16AM -0500, Rob Clewley wrote:
> If I have a set of scalar sample data on a rectangular 2D mesh that I
> want to plot in the 3D I'd want a simple wireframe rectangular surface
> plot. Can it do that?

My experience from trying to design a simple API to do simple 3D plotting
of data stored as numpy array is that everybody has his own usecase (that
he often believes is universal and obvious), and that designing an API to
make a particular usecase simple is easy, but keeping reasonnably
versatile and powerful API while making it easy to use for all the
'simple' usecases is terribly hard.

That said, Mayavi2 is incredibly powerful and with time (thanks to
feedback from users) we are getting better at having a simple and
powerful API, and a documentation that tries to 'solve your problem'.

I know Mayavi2 has its problems (mainly difficult to instal because of
historical reasons, and big dependencies), but for non trivial 3D
plotting problems, especially with large datasets, keep it in mind. (It
also works well for trivial problems, it is just that if it is not
packaged, I understand that the hassle of installing it may be higher
than the gain of using it).

By the way, I am happy to take feedback on any problems with Mayavi2 (I
am not pretending I will solve them :>). I believe that we have made huge
progress in usability recently, and that it is no longer a monster hard
to master and useless for simple problems, but I may be mistaken.

Cheers,

Gaël

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] File format for plots

2009-03-02 Thread Gael Varoquaux
On Mon, Mar 02, 2009 at 01:49:38PM -0600, Ryan May wrote:
>Other than the automatic regeneration from latex, what you want sounds
>like what we already have: small python scripts.

>In general, I'm completely amazed by how many people want to develop a new
>markup/script language to wrap what is already a simple and expressive
>language, both for plots and (at least around here) analyses.� If there
>are some spots that require too many lines of code to accomplish something
>really simple, then maybe we need to API additions. But in general, I
>think we have a format for specifying how to make a plot: python.�

Although I agree with you that reinventing an extra scripting layer is
often a bad solution to a problem which should simply be solved by having
a good scripting API in Python, I believe there is here a fundamental
misconception.

Python is an imperative, Turing-complete. This is a very good thing for a
scripting language. For making a description of a static object as a
plot, this is not a good thing. For instance, if I want to make a plot,
save it, and later blow up all the fonts, I really don't want to be using
an imperative, Turing-complete language for the persistence model, as
static analysis of this persisted object is going to be next to
impossible. Same thing if I want to change colormaps, or just about
anything in my persisted object, for the same reason.

A good rule for most software design is that the state of the
application, or of the object of interest, in our case the plot, should
be fully represented by a fully-static set of values, that I like to call
the model. Although this sounds like a tautology, this design rule is
more often broken than followed. For instance the status of an
application may be entirely dependent on its past, or the important state
variables may be hidden in places where you can't get hold of them (eg
the status of a GUI widget, or inside a generator).

Having a very clean separation between your (fully-static) model, and the
logics around is a very important part of good application design, and I
believe I know this because I have so often made an error and violated
this rule :).

If you have this static model, rather than an imperative language, then
you can have persistence. By the way, Mayavi2 achieves its code
generation by introspection on the model. The generated lines of code are
just a way of expressing the changes.

Sorry for being fussy, I am just trying to pass on what I believe I am
learning painfully :).

Ga�l

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Sphinx custom extension mess, and patches

2009-02-16 Thread Gael Varoquaux
On Tue, Feb 17, 2009 at 12:17:17AM +0100, Georg Brandl wrote:
> I'm all for it.  In the case of autosummary, I'm guilty of not getting it
> in sooner.  This will change soon.  In other cases, I don't even know of
> the extension, probably because those who write it deem it as too
> project-specific to contribute it.

> I don't ask for too much if an extension is contributed, so by all means
> do at least post about your extensions!

I am not blaming anyone, just pointing out a non ideal situation. It has
already improved a lot with the matplotlib guys and the scipy guys
merging some changes in extensions and publishing the extensions in an
importable part of their source tree.

It is true that I'll be happier when I will be able to import the
only_directive, and the auto_summary from sphinx :).

Thanks for your great work,

Gaël

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] plot directive in reST tutorials

2009-02-16 Thread Gael Varoquaux
On Mon, Feb 16, 2009 at 01:26:40PM -0500, Michael Droettboom wrote:
> > The "official" version of the plot directive should IMO end up either
> > in Sphinx or matplotlib repository. It's probably OK to require matplotlib
> > SVN version to build Scipy docs for a while...

> I think it makes the most sense for this to be part of matplotlib, since 
> it fundamentally requires matplotlib -- that prevents Sphinx from 
> growing a matplotlib dependency.

Yeah, I am +1 for that too. 

Thank you for exposing the plot_directive in the MPL importable tree,
Michael. It is going to take a little while for a new MPL release to
trickle down to enough installed computers for people to be abe to throw
away their local copy, but this is clearly the good solution.

Gaël

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Sphinx custom extension mess, and patches

2009-02-15 Thread Gael Varoquaux
Hi all,

Sorry for the multiple posting, this concerns various groups, and I'd
rather the information not be lost.

While working on getting our in-lab library ready to be merged with NiPy,
I ran into some sort of 'sphinx extension mess' where various sphinx
extension would have side effects on each other, and most important, the
extensions did not work with sphinx trunk.

I got the side effects to be limited by cleaning up the generated code
from autosummary before each run: I added the following code in my
sphinx conf.py:


# Hack: run the autosummary generation script 
import shutil
if os.path.exists('generated'):
shutil.rmtree('generated')
os.system('%s sphinxext/autosummary_generate.py -o generated *.rst' %
sys.executable)


I am attaching a diff of all the modifications I made to get the various
extensions to work. I hope you can use it to get your various extensions
working on sphinx trunk quicker. For the NiPy guys, I will be committing
these changes in the fff2 tree soon, and we can go over this at the
sprint.

This does raise a problem: this extension code is all over the place, in
various repository. Some of the code cannot live in the sphinx repo, as
it introduces dependencies. However, as the extensions are not importable
from Python (I can't do 'from matplotlib.sphinxext import mathmpl'), the
different projects using them end up copying them in their repo, and thus
there are several versions floating around not updated. Some of the
extensions would do not add externa dependencies to sphinx. These should
be pushed into sphinx, with tests. That way as sphinx evolves, they do
not break.

Gaël
=== modified file 'doc/sphinxext/autosummary.py'
--- doc/sphinxext/autosummary.py2009-02-14 18:36:49 +
+++ doc/sphinxext/autosummary.py2009-02-15 13:41:08 +
@@ -56,7 +56,7 @@
 from docutils.statemachine import ViewList
 from docutils import nodes
 
-import sphinx.addnodes, sphinx.roles, sphinx.builder
+import sphinx.addnodes, sphinx.roles
 from sphinx.util import patfilter
 
 from docscrape_sphinx import get_doc_object
@@ -160,6 +160,7 @@
 tocnode['includefiles'] = docnames
 tocnode['maxdepth'] = -1
 tocnode['glob'] = None
+tocnode['entries'] = [] 
 
 tocnode = autosummary_toc('', '', tocnode)
 return warnings + [node] + [tocnode]

=== modified file 'doc/sphinxext/inheritance_diagram.py'
--- doc/sphinxext/inheritance_diagram.py2009-02-14 18:36:49 +
+++ doc/sphinxext/inheritance_diagram.py2009-02-15 12:53:28 +
@@ -40,7 +40,10 @@
 
 from docutils.nodes import Body, Element
 from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
+try:
+from sphinx.latexwriter import LaTeXTranslator
+except ImportError:
+from sphinx.writers.latex import LaTeXTranslator
 from docutils.parsers.rst import directives
 from sphinx.roles import xfileref_role
 

=== modified file 'doc/sphinxext/mathmpl.py'
--- doc/sphinxext/mathmpl.py2009-02-14 18:36:49 +
+++ doc/sphinxext/mathmpl.py2009-02-15 12:45:33 +
@@ -7,7 +7,10 @@
 from docutils import nodes
 from docutils.parsers.rst import directives
 from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
+try:
+from sphinx.latexwriter import LaTeXTranslator
+except ImportError:
+from sphinx.writers.latex import LaTeXTranslator
 import warnings
 
 # Define LaTeX math node:

=== modified file 'doc/sphinxext/only_directives.py'
--- doc/sphinxext/only_directives.py2009-02-14 18:36:49 +
+++ doc/sphinxext/only_directives.py2009-02-15 12:54:47 +
@@ -5,7 +5,10 @@
 
 from docutils.nodes import Body, Element
 from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
+try:
+from sphinx.latexwriter import LaTeXTranslator
+except ImportError:
+from sphinx.writers.latex import LaTeXTranslator
 from docutils.parsers.rst import directives
 
 class html_only(Body, Element):

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Interactive wx/pylab with no threads (PyOS_InputHook)

2009-02-08 Thread Gael Varoquaux
On Sun, Feb 08, 2009 at 04:08:31PM -0800, Brian Granger wrote:
> * In the current matplotlib backend wx.Yield() is called in a way that
> is not safe as far as protecting against recursive calls to Yield.  I
> think it should be called in this way:

> app = wx.GetApp()
> if app is not None:
>   app.Yield(True)

The problem I see with this approach is that arbitrary wx programs will
always be doing this. The matplotlib guys can fix matplotib not to do
this. I can fix Mayavi not to do this, but there are many more wx
programs. And anyhow, most of the time, Yield should not be called, as it
is a hack. Unfortunately, you often end up having to call it. :(

Gaël

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] What would you like to see in a book about Matplotlib?

2009-02-02 Thread Gael Varoquaux
On Mon, Feb 02, 2009 at 03:47:32PM +, Chris Walker wrote:
> One of the things I liked about Gael's article was its discussion of
> threading - separating the gui from the calculations from the data
> acquisition.

Thanks. Be aware that this is a rats nest, though, as threading is the
best way to reveal all the subtleties of an event loop, and the various
race conditions that you can have with it. The strong model/view
separation that is implicit in Traits allows to hide the code making the
view thread-safe in the Traits code updating implicitly the view. You can
build these constraints in your multi-threaded application (I believe I
touch a couple of words on this in my tutorial), but you have to be aware
of the problems and the good patterns to answer them.

To sum up, I am not saying this is uninteresting, on the contrary, I am
just saying that such text is hard to write (which makes a good text even
more interesting).

My 2 cents,

Gaël

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Doc changes

2008-12-17 Thread Gael Varoquaux
On Wed, Dec 17, 2008 at 12:25:12PM -0600, John Hunter wrote:
> Thanks again, sorry that was such a bear.  Hopefully the plot
> directive emerges stronger from the carnage.

Talking about that, last time I looked, the plot directive, and the other
MPL sphinx extension were not in the matplotlib namespace, and thus not
importable by other programs. This is a pity, because they can be useful
for other projects (I wrote for instance some lecture notes using sphinx
to doctest them, and I wanted to use the plot directive).

It seems it would be very easy to put them in a matplotlib submodule, and
have the sphinx conf.py import from there. Nothing urgent, but if there
is no reason no to, I would make me a happy man.

Cheers,

Gaël

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Automated test harness discussion...

2008-12-16 Thread Gael Varoquaux
On Tue, Dec 16, 2008 at 09:12:24AM -0800, Drain, Theodore R wrote:
> Continued from: requesting permission to remove traits and configobj...

> Gael,
> There might be ways to handle these problems.  A lot of depends on what we're 
> trying to test.  I agree that if we take the example scripts, run them, and 
> save the plots, we'll never get an automated test harness to figure things 
> out because of machine differences.

Absolutely. I was just saying that we where giving up because, in our
case the cost was bigger than the benefit. However, we rely strongly on
hardware acceleration, so we don't control completely our rendering
pipeline, and images can vary by a huge amount (eg when the z-ordering is
screwed up). You can always design more robust test by proper analysis of
the images, but that could also be a PhD research program :).

I am not saying MPL shouldn't be going down that way, though.

Gaël

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] error installing matplotlib-0.98.5

2008-12-14 Thread Gael Varoquaux
On Sun, Dec 14, 2008 at 07:33:57PM -0800, fraka6 wrote:
> It is a little annoying because I wast thinking of using Extension module
> from distutils.core to create my library setup.py that seems to use
> easy_install.

AFAIK, Extension doesn't need setuptools (setuptools is the libraryy
providing easy_install). If you have a problem here, you'll have to tell
us a bot more about it.

Cheers,

Gaël

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] error installing matplotlib-0.98.5

2008-12-14 Thread Gael Varoquaux
On Sun, Dec 14, 2008 at 07:30:19AM -0800, fraka6 wrote:

> I  have experienced the same problem with easy_install on ubuntu-8.4.10 but
> it is working with aptitude, so I have done :
> sudo aptitude install python-matplotlib

Yes, but unfortunately, not every OS has a good packaging system like
apt-get/aptitude (and this is actually the reason I use Ubuntu, but
people should be free to choose their OS).

Gaël

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] requesting permission to remove traits and configobj

2008-12-11 Thread Gael Varoquaux
On Thu, Dec 11, 2008 at 01:37:01PM -0800, Andrew Straw wrote:
> Prabhu Ramachandran has also done similar things for mayavi2 using VTK's
> image comparison (see compare_image_with_saved_image in
> https://svn.enthought.com/enthought/browser/Mayavi/trunk/integrationtests/mayavi/common.py
> ).

Yeah, and it always fails due to the hardware rendering being slightly
different on different computers :). I think we are giving up on this
approach.

Gaël

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] wx tweak

2008-09-15 Thread Gael Varoquaux
On Mon, Sep 15, 2008 at 07:38:01PM -0400, Paul Kienzle wrote:
> It does not poll.

> draw_idle() triggers a timer with a 5ms delay.  This timer is reset for
> each draw_idle() call.  At timeout the timer is restarted if there are more
> events on the wx event queue, otherwise the graph is rendered.  This means
> you can do as many draw_idle commands as you want while processing your
> data, but the expensive rendering will only happen once.

OK, very nice. This is indeed a very efficient pattern for dealing with
too agressive refresh. I've seen it used with a lot of success in many
places. Thanks for enlighting me on this. I guess I could (should?) have
looked at the code base.

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] wx tweak

2008-09-15 Thread Gael Varoquaux
On Mon, Sep 15, 2008 at 04:06:45PM -0400, Paul Kienzle wrote:
> Hi,

> I tweaked the wx backend so that the idle delay is 5 ms rather than 50 ms.
> This allows the idle delay to kick in between mouse move events so
> the graph will be updated during a drag operation.

> Users can override the idle delay using:

> mpl.backends.backend_wx.IDLE_DELAY = n

I don't know what the context is here, but if I understand it properly,
to be doing polling on a 5ms timescale is not very nice. This means a
wake up of the CPU every 5ms for this specific app. If everybody starts
doing that (I am looking at you, flash) my battery life goes down and my
laptop starts heating up.

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Include python-enthought-traits when building matplotlib + build patch

2008-08-28 Thread Gael Varoquaux
On Thu, Aug 28, 2008 at 08:17:26AM -0500, John Hunter wrote:
> On Thu, Aug 28, 2008 at 6:19 AM, Sandro Tosi <[EMAIL PROTECTED]> wrote:

> > Enthought suite is used a lot in scientific area, so mpl and enth
> > almost share their users, so have it enabled would be a plus, but we
> > are mainly interested in generate "no harm", so we'd like to ask you
> > to confirm that enabling that support won't brake anything (but indeed
> > provide a valuable asset for users).

> Well, one thing to make sure of is that you do not install the version
> of traits that ships with matplotlib, since it will break other
> enthought packages.

Debian and Ubuntu are doing the right thing here currently. This is very
nice, as it provides a clean upgrade path for traits under Debian
derivatives.

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] clabel improvements

2008-07-23 Thread Gael Varoquaux
On Wed, Jul 23, 2008 at 09:14:46AM -0500, John Hunter wrote:
> > Related: while I am digging around in there, now is probably the moment
> > for me to integrate Paul Kienzle's comments on start/stop_event_loop in
> > FigureCanvasBase, etc.  I am not sure there is a consensus on this.  I
> > am currently thinking that the best way to integrate this, while
> > minimizing repeated code, is a mixin plus a couple of new classes,
> > FigureCanvasBaseGUI and FigureCanvasGUIAgg.  These new classes would
> > inherit the mixin and the base classes without "GUI".  Interactive
> > backends would then inherit these.  Non-interactive backends would
> > inherit versions that throw errors from FigureBaseCanvas.  Complex, but
> > this assures clean inheritance.  Thoughts welcome.

> See my response in the original thread.  I'm not sure we ever reached
> a consensus on this one, and I'm still uncomfortable with a more
> complex hierarchy.  I'm willing to be convince if you and Paul and
> Gael disagree, but I have yet to see why a flat implementation will
> not work here.

I actually lean on the simple side for now. If we find as we improve the
event-loop related stuff that we need this, we can easily add an
abstraction, but right now I don't see a big benefit. Anyhow, whoever
does the work gets to decide, as usual.

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Progress on interactive backend detection

2008-07-21 Thread Gael Varoquaux
On Mon, Jul 21, 2008 at 05:30:00AM -0500, John Hunter wrote:
> On Mon, Jul 21, 2008 at 4:07 AM, Gael Varoquaux
> <[EMAIL PROTECTED]> wrote:

> > Could somebody review this patch and possibly check it in? It is not
> > perfect but is, IMHO, a good start that works on everything I have thrown

> OK, looks good; I've committed it to svn r5798.  I have commented out
> the tkinter import until we figure out what if anything we need to do
> in that case.

Thanks John. Sorry for leaving the tk part behind. It should indeed be
commented out.

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Progress on interactive backend detection

2008-07-21 Thread Gael Varoquaux
On Sat, Jul 19, 2008 at 08:05:52AM +0200, Gael Varoquaux wrote:
> On Sat, Jul 19, 2008 at 07:31:19AM +0200, Gael Varoquaux wrote:
> >   - show starts a mainloop and is blocking even if there are not windows
> > open. This basically leads to a deadlock where the user cannot
> > interrupt the mainloop. This can probably be easily fixed, and I'll
> > look into it.

> It turns out it was only in the GTK backend, and quite trivial to
> correct. Attached is a new patch, including this correction.

Could somebody review this patch and possibly check it in? It is not
perfect but is, IMHO, a good start that works on everything I have thrown
at it. I have not been able to abstract in more by pushing the relevant
code in the backends, as in introduces coupling that induces the
selection of the wrong backend.

Debian freeze is close, and I would really like this to go in before. We
do need to work on a vendor registry for the long run, to allow
application builders to override this mechanism on a per-application
basis. However to be able to have a roper view of what this registry, I
need to wip up an app to use it. I am busy doing that, but it won't be
ready before Debian freeze, whereas the attached patch fixes all my
problems.

Cheers,

Gaël
Index: pyplot.py
===
--- pyplot.py   (revision 5791)
+++ pyplot.py   (working copy)
@@ -1,12 +1,13 @@
 import sys
 
 import matplotlib
-from matplotlib import _pylab_helpers
+from matplotlib import _pylab_helpers, interactive
 from matplotlib.cbook import dedent, silent_list, is_string_like, is_numlike
 from matplotlib.figure import Figure, figaspect
 from matplotlib.backend_bases import FigureCanvasBase
 from matplotlib.image import imread as _imread
 from matplotlib import rcParams, rcParamsDefault, get_backend
+from matplotlib.rcsetup import interactive_bk as _interactive_bk
 from matplotlib.artist import getp, get, Artist
 from matplotlib.artist import setp as _setp
 from matplotlib.axes import Axes
@@ -32,7 +33,41 @@
MaxNLocator
 
 
+## Backend detection ##
+def _backend_selection():
+""" If rcParams['backend_fallback'] is true, check to see if the
+current backend is compatible with the current running event
+loop, and if not switches to a compatible one.
+"""
+backend = rcParams['backend']
+if not rcParams['backend_fallback'] or \
+ backend not in _interactive_bk:
+return
+is_agg_backend = rcParams['backend'].endswith('Agg')
+if 'wx' in sys.modules and not backend in ('WX', 'WXAgg'):
+import wx
+if wx.App.IsMainLoopRunning():
+rcParams['backend'] = 'wx' + 'Agg' * is_agg_backend
+elif 'qt' in sys.modules and not backend == 'QtAgg':
+import qt
+if not qt.qApp.startingUp():
+# The mainloop is running.
+rcParams['backend'] = 'qtAgg'
+elif 'PyQt4.QtCore' in sys.modules and not backend == 'Qt4Agg':
+import PyQt4.QtGui
+if not PyQt4.QtGui.qApp.startingUp():
+# The mainloop is running.
+rcParams['backend'] = 'qt4Agg'
+elif 'gtk' in sys.modules and not backend in ('GTK', 'GTKAgg',
+'GTKCairo'):
+import gobject
+if gobject.MainLoop().is_running():
+rcParams['backend'] = 'gtk' + 'Agg' * is_agg_backend
+elif 'Tkinter' in sys.modules and not backend == 'TkAgg':
+import Tkinter
 
+_backend_selection()
+
 ## Global ##
 
 from matplotlib.backends import pylab_setup
Index: backends/backend_gtk.py
===
--- backends/backend_gtk.py (revision 5791)
+++ backends/backend_gtk.py (working copy)
@@ -67,7 +67,8 @@
 for manager in Gcf.get_all_fig_managers():
 manager.window.show()
 
-if mainloop and gtk.main_level() == 0:
+if mainloop and gtk.main_level() == 0 and \
+len(Gcf.get_all_fig_managers())>0:
 gtk.main()
 
 def new_figure_manager(num, *args, **kwargs):
Index: rcsetup.py
===
--- rcsetup.py  (revision 5791)
+++ rcsetup.py  (working copy)
@@ -305,6 +305,7 @@
 # a map from key -> value, converter
 defaultParams = {
 'backend'   : ['Agg', validate_backend], # agg is certainly present
+'backend_fallback'  : [True, validate_bool], # agg is certainly present
 'numerix'   : ['numpy', validate_numerix],
 '

Re: [matplotlib-devel] Progress on interactive backend detection

2008-07-20 Thread Gael Varoquaux
On Sat, Jul 19, 2008 at 03:42:27PM -0500, John Hunter wrote:
> On Sat, Jul 19, 2008 at 1:05 AM, Gael Varoquaux
> <[EMAIL PROTECTED]> wrote:

> > It turns out it was only in the GTK backend, and quite trivial to
> > correct. Attached is a new patch, including this correction.

> Hey Gael, this is starting to look reasonable.  I know implementing
> these checks, such as detecting whether the mainloop is active, can be
> a hassle, so thanks for taking the time to write against so many
> environments.  We may want to make take the logic you've provided and
> encapsulate them in the backend methods to make them more easily
> recognizable, fixable and reusable.  Eg, each unser interface backend
> would provide a "mainloop_running" method.  You could then access this
> in pyplot to support your fallback logic, and also we could use it in
> "show" to make sure we don't try and start mainloops that are already
> running.

In theory this could work, but the problem is that the logics for
selecting the backend gets executed when matplotlib.backends is imported,
ie before importing any backend. I tried implementing your suggestion,
but it failed because I had to imports from backends. Am I missing
something obvious?

> One thing notice in your patch is that when it comes time to check for
> tk, you import tkinter and then do nothing with it.  I assume this is
> a placeholder until you figure out what you want to do?

I have actually given up on that, so you should probably remove these two
lines. If somebody knows how to check accurately for tk, I am interested.

Cheers,

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Progress on interactive backend detection

2008-07-18 Thread Gael Varoquaux
On Sat, Jul 19, 2008 at 07:31:19AM +0200, Gael Varoquaux wrote:
>   - show starts a mainloop and is blocking even if there are not windows
> open. This basically leads to a deadlock where the user cannot
> interrupt the mainloop. This can probably be easily fixed, and I'll
> look into it.

It turns out it was only in the GTK backend, and quite trivial to
correct. Attached is a new patch, including this correction.

Gaël
Index: pyplot.py
===
--- pyplot.py   (revision 5791)
+++ pyplot.py   (working copy)
@@ -1,12 +1,13 @@
 import sys
 
 import matplotlib
-from matplotlib import _pylab_helpers
+from matplotlib import _pylab_helpers, interactive
 from matplotlib.cbook import dedent, silent_list, is_string_like, is_numlike
 from matplotlib.figure import Figure, figaspect
 from matplotlib.backend_bases import FigureCanvasBase
 from matplotlib.image import imread as _imread
 from matplotlib import rcParams, rcParamsDefault, get_backend
+from matplotlib.rcsetup import interactive_bk as _interactive_bk
 from matplotlib.artist import getp, get, Artist
 from matplotlib.artist import setp as _setp
 from matplotlib.axes import Axes
@@ -32,7 +33,41 @@
MaxNLocator
 
 
+## Backend detection ##
+def _backend_selection():
+""" If rcParams['backend_fallback'] is true, check to see if the
+current backend is compatible with the current running event
+loop, and if not switches to a compatible one.
+"""
+backend = rcParams['backend']
+if not rcParams['backend_fallback'] or \
+ backend not in _interactive_bk:
+return
+is_agg_backend = rcParams['backend'].endswith('Agg')
+if 'wx' in sys.modules and not backend in ('WX', 'WXAgg'):
+import wx
+if wx.App.IsMainLoopRunning():
+rcParams['backend'] = 'wx' + 'Agg' * is_agg_backend
+elif 'qt' in sys.modules and not backend == 'QtAgg':
+import qt
+if not qt.qApp.startingUp():
+# The mainloop is running.
+rcParams['backend'] = 'qtAgg'
+elif 'PyQt4.QtCore' in sys.modules and not backend == 'Qt4Agg':
+import PyQt4.QtGui
+if not PyQt4.QtGui.qApp.startingUp():
+# The mainloop is running.
+rcParams['backend'] = 'qt4Agg'
+elif 'gtk' in sys.modules and not backend in ('GTK', 'GTKAgg',
+'GTKCairo'):
+import gobject
+if gobject.MainLoop().is_running():
+rcParams['backend'] = 'gtk' + 'Agg' * is_agg_backend
+elif 'Tkinter' in sys.modules and not backend == 'TkAgg':
+import Tkinter
 
+_backend_selection()
+
 ## Global ##
 
 from matplotlib.backends import pylab_setup
Index: backends/backend_gtk.py
===
--- backends/backend_gtk.py (revision 5791)
+++ backends/backend_gtk.py (working copy)
@@ -67,7 +67,8 @@
 for manager in Gcf.get_all_fig_managers():
 manager.window.show()
 
-if mainloop and gtk.main_level() == 0:
+if mainloop and gtk.main_level() == 0 and \
+len(Gcf.get_all_fig_managers())>0:
 gtk.main()
 
 def new_figure_manager(num, *args, **kwargs):
Index: rcsetup.py
===
--- rcsetup.py  (revision 5791)
+++ rcsetup.py  (working copy)
@@ -305,6 +305,7 @@
 # a map from key -> value, converter
 defaultParams = {
 'backend'   : ['Agg', validate_backend], # agg is certainly present
+'backend_fallback'  : [True, validate_bool], # agg is certainly present
 'numerix'   : ['numpy', validate_numerix],
 'maskedarray'   : [False, validate_bool],
 'toolbar'   : ['toolbar2', validate_toolbar],
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Progress on interactive backend detection

2008-07-18 Thread Gael Varoquaux
I forgot to mention: fltk and cocoa did not get any love at all in this
patch. The reason being that I do not know of any program running the
first one, and for me to test and develop things for the second one,
somebody will have to offer me an apple computer :).

Cheers,

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Progress on interactive backend detection

2008-07-18 Thread Gael Varoquaux
I have implemented a prototype of interactive backend detection. As I
proposed earlier, I added an extra rc parameter 'backend_fallback' that
allows pyplot to inspect sys.modules on load and try to redirect
interactive backends to the appropriate ones.

I am attaching a patch, not for inclusion, as I still want to check
different details on interactivity, and the behavior of the show command,
but for comments and triage. I have tested it in various apps, and I
think it is interesting to review the different mainstream apps
presenting a interactive shell in which pylab can be used interactively.

* wx apps. In mayavi2, my near-born ipython frontend the attached patch 
 works seamlessly, with or without the interactive switch. In SPE 
 (wx-based IDE) it does not work, and I suspect this is because of ugly 
 things SPE does to the wx image-loading, for theming reasons, as I see
 totally unrelated errors. 

* Qt: In Eric4 the qt detection does not work as it seems that Eric 
  spawns a new python process. As a result, as long as you keep the 
  interactive switch off, pylab works great, but you really have to use a 
  blocking show. Does anybody now a Qt program that has an interactive
  Python prompt?

* In IDLE I can't figure out what is happening. I must confess that I do not 
  know much about Tkinter, and I am not too sure how matplotlib is
  supposed to collaborate with an existing Tk mainloop.

* The only GTK program I could think of with an interactive python prompt
  was accerciser, an pylab now works out of the box there, in interactive
  mode or not.

Of course in ipython -q|q4|w|g-thread, my addition work seamlessly, but
that was too easy :).

Some remarks that came out of this extensive testing:

  - show starts a mainloop and is blocking even if there are not windows
open. This basically leads to a deadlock where the user cannot
interrupt the mainloop. This can probably be easily fixed, and I'll
look into it.

  - we cannot guess whether the user want to be in interactive mode or
not: there is a potential large cost of being in interactive mode due to 
continuous refreshing of the UI. Ipython gets it right by turning the
interactive mode off when running a script, but when need the host
environment to make this decision and we cannot make it in matplotlib.
However, I believe it is important to expose more this
functionality, as the user will now probably have to make this
decision. This is why I have add the import of "interactive" in
pyplot.

  - this brings up the fact that the user experience can be increased a
lot if the host environment collaborates with matplotlib. This is why
we discussed with John the idea of adding a "vendor registry", a
light-weight module that an environment could import at little cost
to tell matplotlib what backend to use, whether to put the
interactive switch, and hopefully more, like maybe a factory to
create new figure, as this would allow embedding these figures in an IDE.
We do this with mayavi2, where the figures created by mlab are
standalone windows when the fullblown environment is not running, but
integrated windows when it is running.

I am sure there is more that we can learn. Please come up with ideas so
that we can see better what is the way forward for integrating matplotlib
to graphical shells and environments.

Cheers,

Gaël
Index: trunk/matplotlib/lib/matplotlib/pyplot.py
===
--- trunk/matplotlib/lib/matplotlib/pyplot.py   (revision 5785)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py   (working copy)
@@ -32,7 +32,22 @@
MaxNLocator
 
 
+## Backend detection ##
+# If the wx Mainloop is started, starting another mainloop will crash
+# python, so we need to change to wx backend 
+import sys
+if 'wx' in sys.modules:
+import wx
+if wx.App.IsMainLoopRunning():
+from matplotlib import rcParams, use
+if rcParams['backend'].endswith('Agg'):
+use('wxAgg')
+else:
+use('wx')
 
+
+
+
 ## Global ##
 
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Matplotlib and latest numpy

2008-07-18 Thread Gael Varoquaux
On Sat, Jul 19, 2008 at 01:25:51AM +0200, Gael Varoquaux wrote:
> Am I wrong, or does matploib not build with current numpy svn?

OK, Fernando told me that matplotlib builds fine with latest numpy on his
box so Ienquired a bit more. The problem is that the build of matplotlib
tries to include a header file that is generated automatically during the
build of numpy (__multiarray_api.h). If you install numpy using "python
setup.py install", this header file is inlcuded in the install. However I
used "python setupegg.py develop" to install numpy. As a result the
header file does not get put in the include directory. I guess this is
thus a bug in the setupegg.py of numpy, but my knowledge of setuptools is
way to low to be able to fix that.

Cheers,

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Matplotlib and latest numpy

2008-07-18 Thread Gael Varoquaux
Hi,

Am I wrong, or does matploib not build with current numpy svn?

Here is the error message I am getting:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC
-I/home/varoquau/dev/numpy/trunk/numpy/core/include
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.5 -c src/ft2font.cpp -o
build/temp.linux-i686-2.5/src/ft2font.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
In file included from
/home/varoquau/dev/numpy/trunk/numpy/core/include/numpy/arrayobject.h:14,
 from src/ft2font.cpp:6:
/home/varoquau/dev/numpy/trunk/numpy/core/include/numpy/ndarrayobject.h:17:25:
error: numpyconfig.h: No such file or directory
/home/varoquau/dev/numpy/trunk/numpy/core/include/numpy/ndarrayobject.h:1829:30:
error: __multiarray_api.h: No such file or directory
src/ft2font.cpp: In member function ‘Py::Object
FT2Image::py_as_array(const Py::Tuple&)’:
src/ft2font.cpp:273: error: ‘PyArray_Type’ was not declared in this scope
src/ft2font.cpp:273: error: ‘PyArray_New’ was not declared in this scope
src/ft2font.cpp: In function ‘void initft2font()’:
src/ft2font.cpp:1877: error: ‘import_array’ was not declared in this
scope
error: command 'gcc' failed with exit status 1

If you look at the numpy/core/include/numpy/ndarrayobject.h file, it says
clearly at the top of the file "do not include this file directly".

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Any short plan for a new release (0.98.2 for real or 0.98.3)?

2008-07-18 Thread Gael Varoquaux
On Fri, Jul 18, 2008 at 07:57:25PM +0200, Gael Varoquaux wrote:
> OK, now what is the way forward. We need to provide the advanced-user for
> a good control on the backend. We need to provide a way that simply works
> without changing anything. The same code should run in "ipython -pylab",
> idle, or SPE. I think this means we need to add an rc entry. We could
> have two entries for backends:

> backend: auto or any of the current existing
> backend-default: any of the current existing

> If backend is set to auto, pyplot would check if an event loop is running
> and select the appriopriate backend. If no eventloop is running, it would
> use the backend specified in backend-default.

> This should work fairly nicely. The only think I am worried about is
> people changing the backend using matlplotlib.use, while rc['backend'] is
> still at auto, and then importing pyplot, which would change again the
> backend. Any suggestion for how to address that? Maybe matploib.use could
> put a flag somewhere, saying that it has been explicitely called.
> Internallythe plyplot magic to choose the backend would not set this
> flag.

I talk to Fernando about this, and he came up with a suggestion I like
quite a lot. The idea would be to give an "backend_fallback" boolean in
the rc parameters. When loading an interactive backend, if this boolean
is set to true (by default), the backend-loading code would check that
the proposed interactive backend is complatible with the current running
mainloop, and if not walk the different backends to find a suitable one,
without shooting a warning at the user, because the user should not have
to know about this.

I think this is a good way of satisfying both the requirement for
seemless operation in different event loops and the requirement for
advanced users that can control completely how things happen using the rc
parameter switch. Moreover, if there is not risk of conflict, the
rc-specified choice would be kept.

What do you think? Where should I insert this code?

Cheers,

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Any short plan for a new release (0.98.2 for real or 0.98.3)?

2008-07-18 Thread Gael Varoquaux
On Fri, Jul 18, 2008 at 10:14:00AM -0500, John Hunter wrote:
> Basically, you want to support users who are using ipython -wthread
> but not -pylab who later import pylab with a misconfigured rc.

That's ine way of putting it. You are considering the ipython, the way it
is currently implemented is the only entry point to interactiv use of
matplotlib. I think the is about to change significantly with the
introduction of GUI frontends to ipython, that are not inheritely bound
to pylab, like 'ipython -pylab' is. In fact Enthought has very short
terms plans to make an IDE.

>  Is this really desirable?  Certainly you would want to trap this or
>  warn or something so they don't get strange segfaults or other hard to
>  diagnose errors, but automagically switching the backend in mpl may be
>  too helpful in the way that microsoft windows is occassionally too
>  helpful.

You have a point. I agree that my approach is not the good one, and is
forcing too mcuh magic on the user. I will elaborate what might be a
better solution below.

> What about checking to see if your ipython module is in sys.modules
> when pyplot is imported, checking the backend, and then importing it,
> checking for wthread etc, issuing a severe warning with known
> misconfigurations, eg gtkagg, with instructions on how to fix is (eg
> "your matplotlibrc file is here and the backend needs to be set to
> such-and-such...")?

This is not about the wthread option. This is about embedding in a large
GUI, whether it be the IDE I was mentionning, or winpdb, or SPE, or
Mayavi. I don't think the current implementation is acceptable: you are
requiring the users to change the backend depending on the eventloop they
are running. Not only is this tedious, but it also require a fair amount
of technical knowledge and exposes details (kind of event loop) that are
irrelevent to the end user. Finally a lot of people will see the crash,
and simply conclude that matplotib, or the interactive program they are
runnning it from is buggy. We have had this come up more than once on the
enthought-dev mailing list, and I wonder how many people simply never ask.

OK, now what is the way forward. We need to provide the advanced-user for
a good control on the backend. We need to provide a way that simply works
without changing anything. The same code should run in "ipython -pylab",
idle, or SPE. I think this means we need to add an rc entry. We could
have two entries for backends:

backend: auto or any of the current existing
backend-default: any of the current existing

If backend is set to auto, pyplot would check if an event loop is running
and select the appriopriate backend. If no eventloop is running, it would
use the backend specified in backend-default.

This should work fairly nicely. The only think I am worried about is
people changing the backend using matlplotlib.use, while rc['backend'] is
still at auto, and then importing pyplot, which would change again the
backend. Any suggestion for how to address that? Maybe matploib.use could
put a flag somewhere, saying that it has been explicitely called.
Internallythe plyplot magic to choose the backend would not set this
flag.

Comments?

Gaël


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Any short plan for a new release (0.98.2 for real or 0.98.3)?

2008-07-18 Thread Gael Varoquaux
On Fri, Jul 18, 2008 at 09:15:16AM -0500, John Hunter wrote:
> ipython Shell.py already hacks wx, gtk, and tk to make sure mpl's
> mainloop is not going to cause any problems (eg
> IPython.Shell.hijack_wx).  Is there something about the new ipython wx
> frontend design that requires a different solution for mpl?

Hum, maybe I am not understanding properly what you mean here. It acts on
matplotlib only when it is passed the -pylab argument, AFAIK. Thus if you
load "ipython -wthread" you will still be getting the default backend for
matplotlib if you import it later on, and that default backend is GTK on
Ubuntu, and the GTK mainloop doesn't play well at all with the wx one.

> I'm happy to hold the release until we get this sorted out, but before
> I review the patch maybe you can let me know what if anything is
> different about the new ipython design that requires changes in mpl
> because I haven't followed the ipython redesign closely enough.

The frontend I am talking about is a PyShell replacement. It is a Wx
widget and is not even multithreaded: it lives in the mainloop. We could
indeed load pylab at the start and choose the right backend, but this
requires preloading pylab, and I am not to enthousiastic about such a
potential loss of time at load for users who have not asked for matlab.
We could also provide a "-pylab" switch, but right now we don't even have
a canonical entry point: this is a widget, and not a program. I'll talk
to Fernando to have his view on this.

The patch I have sent would also allow for seemless use of matplotlib in
SPE, winpdb, or Mayavi, as all these apps use the wx mainloop.

I hope this clarifies the situtation.

Cheers,

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Any short plan for a new release (0.98.2 for real or 0.98.3)?

2008-07-18 Thread Gael Varoquaux
On Fri, Jul 18, 2008 at 07:36:03AM +0200, Gael Varoquaux wrote:
> On Thu, Jul 17, 2008 at 08:55:59AM -0500, John Hunter wrote:
> > I think we could do a 0.98.3 release.  

> I am right now implementing a wx frontend to ipython, and I can see in
> the near future a score of people complaining that "from pylab import *;
> show()" crashes it because it calls the wrong backend. Do people mind if
> I prepare a patch that does some magic as pylab is loaded to:
> a) Look if 'wx' is in sys.module
> b) Check if the wx mainloop is running,

> and if so changes the backend automatically to wx and wxAgg.

OK, no replies tonight, so I went ahead and coded a patch, in the
interest of getting this in before the next release. It is attached.
Comments are welcome.

Gaël
Index: trunk/matplotlib/lib/matplotlib/pyplot.py
===
--- trunk/matplotlib/lib/matplotlib/pyplot.py   (revision 5785)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py   (working copy)
@@ -32,7 +32,22 @@
MaxNLocator
 
 
+## Backend detection ##
+# If the wx Mainloop is started, starting another mainloop will crash
+# python, so we need to change to wx backend 
+import sys
+if 'wx' in sys.modules:
+import wx
+if wx.App.IsMainLoopRunning():
+from matplotlib import rcParams, use
+if rcParams['backend'].endswith('Agg'):
+use('wxAgg')
+else:
+use('wx')
 
+
+
+
 ## Global ##
 
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] patch for adding manual label location selection to clabel

2008-07-17 Thread Gael Varoquaux
On Thu, Jul 17, 2008 at 04:55:42PM -0400, Paul Kienzle wrote:
> On Thu, Jul 17, 2008 at 09:44:48PM +0200, David M. Kaplan wrote:
> > Another option would be to create a start_event_loop function like Paul
> > suggested and overload that function in those backends that aren't
> > interactive so that it returns an error, but this requires writing one
> > such function for each non-interactive backend.

> Either create a deeper hierarchy:

>FigureCanvasBase:
>def start_event_loop(self, ...): 
>raise NotImplemented
>FigureCanvasInteractive:
>def start_event_loop(self, ...):
>generic interactive using time.sleep
>MyInteractiveBackend(FigureCanvasInteractive):
>def start_event_loop(self, ...):
>specialized interactive code using GUI 

> or a mix-in class:

>FigureCanvasBase:
>def start_event_loop(self, ...): 
>raise NotImplemented
>FigureCanvasEventLoopMixin:
>def start_event_loop(self, ...):
>generic interactive using time.sleep
>MyInteractiveBackend(FigureCanvasBase,FigureCanvasEventLoopMixin):
>... no start_event_loop since using the generic mixin ...

> I prefer the latter, particularly since it won't be needed once the
> existing interactive backends are implemented.

+1 one that.

Also, I don't think a exception is a good idea. Simply a warnings.warn
should be enough.

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Any short plan for a new release (0.98.2 for real or 0.98.3)?

2008-07-17 Thread Gael Varoquaux
On Thu, Jul 17, 2008 at 08:55:59AM -0500, John Hunter wrote:
> I think we could do a 0.98.3 release.  

I am right now implementing a wx frontend to ipython, and I can see in
the near future a score of people complaining that "from pylab import *;
show()" crashes it because it calls the wrong backend. Do people mind if
I prepare a patch that does some magic as pylab is loaded to:
a) Look if 'wx' is in sys.module
b) Check if the wx mainloop is running,

and if so changes the backend automatically to wx and wxAgg.

I could not sleep and do this tonight to get it ready for the release,
but I would like people's feedback... (Famous last words)

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] patch for adding manual label location selection to clabel

2008-07-17 Thread Gael Varoquaux
On Thu, Jul 17, 2008 at 04:41:36PM +0200, David M. Kaplan wrote:
> Attached is a new version of the patch that includes ginput,
> waitforbuttonpress and clabel changes.  It is already quite functional,
> but there are a couple of issues that need improving that I would like
> to solicit comments on.  I explain below after detailing what I have
> done.

OK, a few comment from quickly glancing at the patch:

* What happens if twe are in a non interactive terminal, such as
  postscript? If this thing is running on a headless server, we don't
  want to hang the script because the manual option has been selected.

* Putting this argument in "*args" seems like a bad style (it looks like
  matlab). Why don't you use a "label_pos='auto'" keyword argument. This
  would be much more robust to the addition of other options, and more in
  agreement with the rest of the style of pylab's arguments.

I have to run. I haven't reviewed the patch very well. I think you should
address those two comments and send it again to the list for review.
You'll probably get useful advice and maybe learn more about Python.

Thanks,

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] simple question about important classes

2008-07-15 Thread Gael Varoquaux
Bonjour,

C'est dangeureux dans m'envoyer un email dans ma boite mail particulière.
C'est la meilleur moyen de ne jamais recevoir de réponse: je reçoit 200
email par jour, et je les lis en diagonale. Enfin, j'image que c'était
une erreur, et que l'e-mail aurait dû partir à la mailing list
matplotlib-dev.

On Tue, Jul 15, 2008 at 06:42:01PM +0200, David Kaplan wrote:
> I have a hopefully simple question that perhaps you could help me with.
> I am trying to add the possibility of manual selection of contour label
> locations to clabel (as in matlab), and I want to use the class
> BlockingMouseInput in contour.py, but I can't figure out how to import
> that class correctly into contour.py.  Could you give me a hint?

Hum, I am not too sure what you are trying to do. It has been a while
since I have used Matlab, so I don't think I know what feature you are
refering too. Could you please elaborate both by describing what you are
trying to achieve in terms of end-user experience, and by giving a simple
example of the code you are trying to get to run.

Cheers,

Gaël

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] waitforbuttonpress function addition

2008-07-11 Thread Gael Varoquaux
On Fri, Jul 11, 2008 at 03:22:30PM +0200, David M. Kaplan wrote:
> The way I have implemented it is by adding an additional class
> BlockingKeyMouseInput, which is quite similar to BlockingMouseInput, but
> waits for both key and mouse events.  A smarter person than I could
> probably combine these two classes and make something that would serve
> both functions.  But I am basically new to python and don't feel
> comfortable.  Perhaps someone else could take a look and make
> improvements/simplifications?

The only significantly different lines are the two lines where an
mplconnect is done to register the callback. You could abstract this in a
method and then have a base class and two sub classes for each call: the
blocking from mouse and the blocking from button.

> The other thing that I have noticed with both ginput and
> waitforbuttonpress is that if you use ctrl-c to break out of either,
> then the callback functions remain attached to their respective events
> (e.g., try ginput(n=-1,timeout=-1,verbose=True) and hit ctrl-c).  This
> probably isn't a huge problem, but it would be nice if there was a way
> to say "if ctrl-c is pressed, cleanup nicely".  Does someone know if
> that is possible?

I think this is a good usecase for a try: ... finally: ... .

I don't have time to do these changes right now, as I am very busy both
with IPython and Mayavi, and will be travelling next two weeks, but you
can have a good at them, and someone else will probably commit your
patch, if you removed the code duplication.

Cheers,

Gaël


-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Schedule for the SciPy08 conferencez

2008-07-06 Thread Gael Varoquaux
We have received a large number of excellent contributions for papers for
the SciPy 2008 conference. The program committee has had to make a
difficult selection and we are happy to bring to you a preliminary
schedule:

Thursday
=

**8:00** Registration/Breakfast

**8:55** Welcome (Travis Vaught)

**9:10** Keynote (Alex Martelli)

**10:00** State of SciPy (Travis Vaught, Jarrod Millman)

**10:40** -- Break --

**11:00** Sympy - Python library for symbolic mathematics: introduction
and applications (Ondřej Čertik)

**11:40** Interval arithmetic: Python implementation and applications
(Stefano Taschini)

**12:00** Experiences Using Scipy for Computer Vision Research (Damian
Eads)

**12:20** -- Lunch --

**1:40** The new NumPy documentation framework (Stéfan Van der Walt)

**2:00** Matplotlib solves the riddle of the sphinx (Michael Droettboom)

**2:40** The SciPy documentation project (Joe Harrington)

**3:00** -- Break --

**3:40** Sage: creating a viable free Python-based open source
alternatice to Magma, Maple, Mathematica and Matlab (William Stein)

**4:20** Open space for lightning talks

Friday


**8:30** Breakfast

**9:00** Pysynphot: A Python Re-Implementation of a Legacy App in
Astronomy
(Perry Greenfield)

**9:40**  How the Large Synoptic Survey Telescope (LSST) is using
Python (Robert Lupton)

**10:00** Real-time Astronomical Time-series Classification and Broadcast
Pipeline (Dan Starr)

**10:20** Analysis and Visualization of Multi-Scale Astrophysical
Simulations using Python and NumPy (Matthew Turk)

**10:40** -- Break --

**11:00** Exploring network structure, dynamics, and function using
NetworkX (Aric Hagberg)

**11:40** Mayavi: Making 3D data visualization reusable (Prabhu
Ramachandran, Gaël Varoquaux)

**12:00** Finite Element Modeling of Contact and Impact Problems Using
Python (Ryan Krauss)

**12:20** -- Lunch --

**2:00** PyCircuitScape: A Tool for Landscape Ecology (Viral Shah)

**2:20** Summarizing Complexity in High Dimensional Spaces (Karl Young)

**2:40** UFuncs: A generic function mechanism in Python (Travis Oliphant)

**3:20** -- Break --

**3:40** NumPy Optimization: Manual tuning and automated approaches (Evan
Patterson)

**4:00** Converting Python functions to dynamically-compiled C (Ilan
Schnell)

**4:20** unPython: Converting Python numerical programs into C
(Rahul Garg)

**4:40** Implementing the Grammar of Graphics for Python (Robert Kern)

**5:00** Ask the experts session.

A more detailled booklet including the abstract text will be available
soon.
We are looking forward to seeing you in Caltech,

Gaël Varoquaux, on behalf of the program committee.

--
SciPy2008 conference.
Program committee

Anne Archibald, McGill University
Matthew Brett
Perry Greenfield, Space Telescope Science Institute
Charles Harris
Ryan Krauss, Southern Illinois University
Gaël Varoquaux
Stéfan van der Walt, University of Stellenbosch

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Scipy08 Paper submission deadline extention to Monday 30th

2008-06-27 Thread Gael Varoquaux
The deadline for submitting abstracts to the Scipy conference was tonight.
In order to give you more time to submit excellent abstracts, the review
committee is extending the deadline to Monday (June 30th), and will work
hastily to get all of them reviewed in time for the program announcement,
on Thursday July 3rd.



The SciPy 2008 Conference will be held 21-22 August 2008 at the
California Institute of Technology, Pasadena, California. SciPy is a
scientific computing package, written in the Python language. It is
widely used in research, the industry and academia.

The program features tutorials, contributed papers, lightning talks, and
bird-of-a-feather sessions. We are soliciting talks and accompanying
papers (either formal academic or magazine-style articles) that discuss
topics which center around scientific computing using Python. These
include applications, teaching, future development directions and
research. A collection of peer-reviewed articles will be published as
part of the proceedings.

Proposals for talks are submitted as extended abstracts. There are two
categories of talks:
Lightning talks

These talks are 10 minutes in duration. An abstract of between 300 and
700 words should describe the topic and motivate its relevance to
scientific computing. Lightning talks do not require an accompanying
article (although, if submitted, these will still be published).
Paper presentations

These talks are 35 minutes in duration (including questions). A one page
abstract of no less than 500 words (excluding figures and references)
should give an outline of the final paper. Papers are due two weeks
before the conference, and may be in a formal academic style, or in a
more relaxed magazine-style format.

If you wish to present a talk at the conference, please create an account
on the website http://conference.scipy.org. You may then submit an
abstract by logging in, clicking on your profile and following the "
Submit an abstract " link.

Gaël, on behalf on the SciPy08 organizing committee.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Student sponsorship for the SciPy08 conference

2008-06-26 Thread Gael Varoquaux
We are delighted to announce that the Python Software Foundation has
answered our call and is providing sponsoring to the SciPy08 conference.

We will use this money to sponsor the registration fees and travel for up
to 10 college or graduate students to attend the conference. The PSF did
not provide all the founds required for all 10 students and once again
Enthought Inc. (http://www.enthought.com) is stepping up to fill in.

To apply, please send a short description of what you are studying and
why you’d like to attend to [EMAIL PROTECTED] Please include telephone
contact information.

Thanks a lot to Travis Vaught from Enthought for bringing this project to
a success.

Please don't hesitate to forward this announcement to anybody who might
be interested.

Gaël, on behalf of the Scipy08 organisation committee

SciPy coneference site:   http://conference.scipy.org

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] examples in the axes docs

2008-06-26 Thread Gael Varoquaux
On Thu, Jun 26, 2008 at 01:50:29PM -0500, John Hunter wrote:
> I noticed Michael just made a commit adding plot directive examples in
> the doc strings.  I think this is a great idea, and very cool, since
> the html docs for a given function will not only link to a complete
> code example, but also have inline figures and links to various output
> high res or vector formats.  See for example, at the bottom of the
> help for the hexbin function

>   
> http://matplotlib.sourceforge.net/doc/html/api/axes_api.html#matplotlib.axes.Axes.hexbin

Wow, guys this is really cool. I do hope that you are going to talk about
this at the SciPy08 conference. This is solid gold, IMHO.

Gaël

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Full rebuild in order

2008-06-11 Thread Gael Varoquaux
On Wed, Jun 11, 2008 at 02:01:59PM -0400, Michael Droettboom wrote:
 There does seem to be a recent convergence around Sphinx in the Scipy 
> world, and matplotlib seems to be forging ahead a little bit (maybe 
> that's just my impression from being in the middle of matplotlib more so 
> than other projects).  It would be great to have something like a 
> Sphinx/Documentation BoF to share our experiences thus far, or perhaps a 
> lightning talk (which at SciPy are 10 minutes) to outline what 
> matplotlib has done wrt documentation.  If Darren were going, he'd be 
> ideal to give that talk, but I could probably manage as well.

A lightning talk would be fantastic. I have already urged Stefan to give
one about the numpy documentation editor
http://sd-2116.dedibox.fr/pydocweb/wiki/Front%20Page/

Maybe we could combine two talks taking half the time of a full talk,
with Stefan talking about the webapp, and someone from MPL talking about
this. It would make a great, consistent, view on the current
documentation efforts in scientific Python, and I bet people would be
interested, maybe to bring the ideas back home on their own projects.

Of course, I am speaking on a personal basis, and I can't speak for the
rest of the organizing committee, but this sounds very nice.

Cheers,

Gaël

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [Enthought-dev] Python novice stumped by ImportError

2008-06-09 Thread Gael Varoquaux
On Mon, Jun 09, 2008 at 06:41:08AM -0400, Darren Dale wrote:
> I think we would rather make traits an external dependency, if it could be 
> easily installed as a separate package by a novice python user. Would it be 
> possible for http://code.enthought.com/projects/traits/ to list specific 
> instructions and links to the downloads? Or to list traits on the Python 
> Package Index?

If I get things correctly, having traits on PyPI is planned for the
version 3 release, which should happen when the guys at Enthought find
time to make it happen. However I cannot speak for them, as I am not
employed by Enthought, sitting in Austin (Yet !). I will also be very
happy the day this happens.

Gaël

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [Enthought-dev] Python novice stumped by ImportError

2008-06-09 Thread Gael Varoquaux
On Mon, Jun 09, 2008 at 12:04:58PM -0400, Darren Dale wrote:
> Gael, maybe the following situation caused the trouble:

> 1) user downloads mpl source
> 2) builds matplotlib - traits now exists in the temproary build directory
> 3) installs enthought traits
> 4) installs matplotlib - traits would not have been built in this case, its 
> already installed on the system, but it still exists in the build directory 
> and gets installed anyway.

Actually, after looking at the code and thinking a bit more, I think the
problem might simply be with different version of traits installed in
different directories in the sys.path, with Python's import mechanism
picking up the MPL-installed one, rather then the user-installed one.
Tricky problems that I see more and more happenning.

But I don't have an example box to test this hypothesis, so we are still
clueless.

Cheers,

Gaël

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [Enthought-dev] Python novice stumped by ImportError

2008-06-08 Thread Gael Varoquaux
On Sun, Jun 08, 2008 at 06:13:24PM -0400, Darren Dale wrote:
> Matplotlib's setup scripts are designed to avoid this problem. There are 
> three 
> conditions under which we install traits:

> 1) Traits is not installed
> 2) A previous version of traits is installed, but it is a version installed 
> by 
> matplotlib. I added an "-mpl" to the end of traits __version__ string so we 
> can keep track.
> 3) The user explicitly askes for it in setup.cfg

> So if matplotlib is overwriting traits when it should not, I want to fix it. 
> But I need more information about what is causing it, because I don't see how 
> it could happen.

If Traits is installed after MPL, if I get it right, then the problem
occurs. IIRC, this is the problem I stumbled upon once.

> I tried this when I first started working with TConfig, and concluded
> that it was not possible because there are too many places where traits
> expects enthought to be a top level package. There were all kind of
> errors, exceptions being raised that were not named as expected,
> extension code that would need to be modified, so we settled on the
> current solution.

OK. You are right. In nipy I modified enthought.traits and
enthought.etsconfig. This was not a beautiful job, I must admit. Maybe
monkey patching sys.path is the option (it is the way eggs do it) thought
I must admit I hate it, because it puts a lot of magic, that will
take the user by surprise. Anyway, the criteria for monkey-patching
sys.path must be improved, I feel.

If I understand things correctly, the current problem can be described
by:

   * User has an old version of ETS, (the one in Enthon 1.0.4, that is a
 very old one), his code needs the old version.
   * User installs a new version of MPL.
   * His code stops working.

I agree that as you describe things, this should not happen. Maybe I have
gotten wrong the order in which the user did things. I have the feeling
things shouldn't be dependent on the order in which you do the steps
(maybe the test for monkey-patching sys.path should not be at
install time, but at load time).

Maybe the test fails for a very old version of traits. I wanted to have a
quick look at this code, but I can't find it after a quick scan of the
MPL source, and I can't devote much time to this right now.

Cheers,

Gaël


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [Enthought-dev] Python novice stumped by ImportError

2008-06-08 Thread Gael Varoquaux
Hey guys,

Just got back from 3 weeks holydays (that feels really good, I should try
this more often). I a fighting with a mountain of emails, but I just
wanted to give a little heads up. Tout is working on the codebase that I
originally wrote and got me addicted to the ETS, at the university of
Toronto.

He tried updating and did run in some minor incompatibility (some ".api"
added, not the end of the word, I believe).

However, more working (Darren Dale is Cced about that) is that matplotib
includes its own version of Traits and tends to be quite light on the
policy to decide when to overide the system one. As a result, and recent
version of MPL make the code base die in the ETS parts. I have already
mentioned this problem, and I believe it is a really evil one. I don't
have time to do some lobbying about this right now, could someone make
sure this is solved (Darren?).

IMHO one temporary solution, less ugly then the current one, is the one
we used in nipy: define a matplotlib.externals.traits that can point either to a
system-wide traits, or to the embedded traits. Using some code in
matplotlib.externals similar to:

"""
def import_traits():
""" Import traits, either from a system-wide location, or from our
copy.
"""
try:
from enthought import traits
except ImportError:
from matplotlib.externals.enthought import traits
return traits

traits = import_traits()
"""

You can put as much logics as you want in "import_traits" to check eg for
version numbers. If in MPL you only import traits from matplotlib.traits,
you can thus use traits and not have side effects on other libraries.

IMHO, the current situation is untenable.

Cheers,

Gaël

On Tue, Jun 03, 2008 at 01:51:40PM -0500, Dave Peterson wrote:
>Tout Wang wrote:

>  That worked to resolve the ImportError for View but now it gets stuck
>  at ui. I think ui is still imported from enthought.traits.ui because


>  from enthought.traits.ui import ui


>  works just fine. It seems that the main problem is that the latest
>  version of Enthought has changed how things are imported, which is a
>  little annoying because I expected that newer versions would be almost
>  entirely backwards compatible. I wonder why this is?

>  Anyway, I have reverted to Enthon 1.0.0 (Python 2.4.3) and everything
>  imports just fine now from TraitsUI with the original code.



>Enthon 1.0.0 was released in August of 2006.  At that time (about 7,000
>svn revisions ago!) Traits was reporting itself as version 1.0.2.  EPD
>includes enthought.traits 2.0.4 as you've already seen.   Even though our
>policy on version numbers didn't come into being until well after Enthon
>1.0.0 was released, I think it reasonable that there would be some
>API-incompatible changes between version 1 and version 2.

>IIRC, the changes between these versions are more about adding features
>than they are about breaking or leaving behind functionality.  Yes, the
>locations of where to import some things may have changed (centralized to
>an api.py rather than in __init__.py) but in general most everything else
>should work pretty much the same.


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Problem checking if masked arrays are finite in transforms.py

2008-04-24 Thread Gael Varoquaux
Hum, a quite common discussion (we have had it at the nipy sprint, for
instance). My feeling is that you want to avoid depending on SVN
versions, unless there is a huge gain. The reason is that you loose
tester and potential contributors. In addition it makes it harder to get
the whole stack in a consistent shape because everything becomes a moving
target.

My 2 cents,

Gaël

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] future of mpl documentation

2008-03-25 Thread Gael Varoquaux
On Tue, Mar 25, 2008 at 06:04:41PM -0500, bryce hendrix wrote:
> How stable is the API? We (Enthought) use endo, a custom tool build on 
> top of docutils, to generate our docs currently. We have talked about 
> changing tools in the past, but the need to extend the tools to 
> understand Traits has held us back.


Sphinx is not automated API documentation, like Endo or Epidoc. It is for
manual writing of documentation. It does not compete with Endo or Epidoc,
but complements them by taking a set of rst files and compiling both a
set of searchable web pages, and an indexed pdf for print.

Gaël

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] ginput-like function for an arbitrary blocking function

2008-03-16 Thread Gael Varoquaux
On Mon, Mar 10, 2008 at 11:22:26PM -0400, Jae-Joon Lee wrote:
> I mostly work in an interactive shell (ipython), and if I simply call
> a blocking function (like raw_input)
> from the prompt, it also blocks the event loop of the matplotlib gui backend
> (it happens for GtkAgg, but not for TKAgg. I'm not sure with other
> backends, but I thought
> TKAgg is a special case.)
> So I wanted to call a raw_input (or other blocking function) in an
> interactive shell
> without freezing the figure.

> Hmm, maybe I'm missing something and there has been an very easy way to do it.
> My understading was that the gui event loop waits (without processing
> gui events)
> until the commands entered in the prompt finish.

Sorry, I got lost in dealing with urgent problems again.

I can't spend too much time looking at this issue, but I would like to
confirm that you do seem to have a use-case here that I cannot solve with
something simpler. If other people agree, I think we should move forward
with your solution.

Sorry for the slow response time,

Gaël 

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


  1   2   >