[ANN] IPython 0.13 is officially out!

2012-06-30 Thread Fernando Perez
Hi all, on behalf of the IPython development team, and just in time for the imminent Debian freeze and SciPy 2012, I'm thrilled to announce, after an intense 6 months of work, the official release of IPython 0.13. This version contains several major new features, as well as a large amount of bug

A sad day for the scientific Python community. John Hunter, creator of matplotlib: 1968-2012.

2012-08-29 Thread Fernando Perez
Dear friends and colleagues, I am terribly saddened to report that yesterday, August 28 2012 at 10am, John D. Hunter died from complications arising from cancer treatment at the University of Chicago hospital, after a brief but intense battle with this terrible illness. John is survived by his w

[ANN] IPython 0.11 is officially out

2011-07-31 Thread Fernando Perez
Hi all, on behalf of the IPython development team, I'm thrilled to announce, after more than two years of development work, the official release of IPython 0.11. This release brings a long list of improvements and new features (along with hopefully few new bugs). We have completely refactored IP

Re: array subset could be improved? -repost ;)

2005-10-14 Thread Fernando Perez
Jim O'D wrote: > Hi all > > I have an array a=array([2,3,-1]). > > I want to extract an array with all the elements of a that are less than 0. Numeric is currently changing into the new scipy core. If you are willing to play with beta code, get it here: http://numeric.scipy.org if not, wait

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-14 Thread Fernando Perez
> Kenneth McDonald a écrit : >> For unfortunate reasons, I'm considering switching back to Win XP (from >> OS X) as my "main" system. Windows has so many annoyances that I can >> only compare it to driving in the Bay Area at rush hour (OS X is like >> driving in Portland at rush hour--not as bad

Re: need an example of Python numarray to C++ and back again, Boost / SWIG?

2005-11-09 Thread Fernando Perez
PL wrote: > I want to pass a 2D array from Python to C++, manipulate it in C++ (for > example, add 1 to each element) and pass it back to Python. > > With these building blocks I will be able to figure out all the rest of > what I need to do for my project. I am very familiar with Python, but >

Re: Command-line tool able to take multiple commands at one time?

2005-11-10 Thread Fernando Perez
Peter A.Schott wrote: > Per subject - I realize I can copy/paste a line at a time into an interactive > session when I'm trying to debug, but was wondering if there is any tool out > there that allows me to copy sections of working Python scripts to paste into > my interactive console and let thos

Re: exceptions, internals (introspection?)

2005-11-10 Thread Fernando Perez
ej wrote: > I have often wondered how to get at other internals, such as the name of > the current function, file, line number I am in? The arguments to the > current function, etc. I browsed through the table of contents of both the > Library Reference & Language Reference. I see section 18

Re: need an example of Python numarray to C++ and back again, Boost / SWIG?

2005-11-10 Thread Fernando Perez
PL wrote: > I looked at Stefan's post - but he remarks that "Unfortunately, Blitz > jealously guards its data (restricted pointers), so that it is not so > easy to do the conversion in the other direction. If anyone knows an > answer to this problem, I'd be glad to hear it" > > I've previously l

Re: Readline configuration

2005-01-05 Thread Fernando Perez
Mark Roach wrote: > I have readline set up pretty much the same way as in the example in the > python docs (http://docs.python.org/lib/readline-example.html) and > something I find myself doing fairly often is > > type some code > more code > more code > ... > > and then wanting to s

Re: Display Function Code Body?

2005-01-09 Thread Fernando Perez
Haibao Tang wrote: > > Hail Python pals! I played with the R (http://r-project.cran.org) last > night to do some statistics and it has an interactive session too, and > I found a feature that is quite useful. [...] > # or any shallow function code from a file import calendar; disp(calendar

Installer made with bdist_wininst segfaulting...

2005-01-23 Thread Fernando Perez
Hi all, I am seeking advice/help from those with more win32 experience than myself. I am trying to build a proper win32 installer for IPython, after a user did most of the hard work. For the most part, it's working very well, but I am running into a nasty problem, which took me a few hours to fi

Re: Installer made with bdist_wininst segfaulting...

2005-01-25 Thread Fernando Perez
Hi Thomas, Thomas Heller wrote: > Fernando Perez <[EMAIL PROTECTED]> writes: >> Here is a brief summary: if the installer file is run from a windows drive >> which is different from the one where python resides (and hence where >> ipython will >> end up), the i

Re: Installer made with bdist_wininst segfaulting...

2005-01-25 Thread Fernando Perez
Thomas Heller wrote: > There are a couple of known bugs in bdist_wininst, and you just reported > another one. All these bugs are related to using the > post_install_script, and show up when either (thats what I currently > remember): > > - the installer is run from a readonly location, > - the

Re: gnuplot on Canvas widget

2005-01-27 Thread Fernando Perez
Jonathan Ellis wrote: > Blues wrote: >> I have used two great models - Tkinter and Gnuplot.py - for a while. > I >> can display an image on a Canvas widget using Tkinter and I can also >> generate a gnuplot from Python on the fly in a separate window. Does >> anyone know how to display such a gn

ANN: IPython 0.6.10 is out.

2005-01-27 Thread Fernando Perez
Hi all, I'm glad to announce the release of IPython 0.6.10. IPython's homepage is at: http://ipython.scipy.org and downloads are at: http://ipython.scipy.org/dist I've provided RPMs (for Python 2.3, built under Fedora Core 3), plus source downloads (.tar.gz). We now also have a native win32

bdist_wininst post-install bug?

2005-01-28 Thread Fernando Perez
Hi all, I just noticed a problem (which forced me to a last-minute update of the windows ipython installer). As far as I can tell, this should be considered a bug. >From the Python docs, sys.executable is: executable A string giving the name of the executable binary for the Python interpret

Re: Installing Numeric with ATLAS and LAPACK

2005-01-28 Thread Fernando Perez
drife wrote: > Thanks John. Those are the steps I followed, and to no avail. > > Interestingly, I downloaded and installed SciPy, and ran the > same eigenvector problem. SciPy greatly speeds up the > calculation...was 1.5 hours using Numeric, now only 15 min > with SciPy. > > Unfortunately, SciP

Re: Installing Numeric with ATLAS and LAPACK

2005-01-29 Thread Fernando Perez
drife wrote: > Could you clarify this please? > > Let's say that I want to make a call to the LAPACK > routine sspevd, and pass it a matrix, and get the result. How do I > accomplish this? I just had a quick look, and it seems that sspevd is NOT one of the already wrapped LAPACK functions. Try

Re: Image stats - going from Matlab to Python

2005-01-30 Thread Fernando Perez
[EMAIL PROTECTED] wrote: > Hi all, > I am working with images in python using PIL. I come from a MATLAB > background so I am finding it to be sometimes frustrating to do things > correctly and quickly. All I need to do is load an image and store a > list of pixel coordinates at which the alpha cha

Re: python-mode tab completion problem

2005-02-03 Thread Fernando Perez
Skip Montanaro wrote: > > test1dellboy3> I am exploring python-mode on emacs. When I open foo.py > test1dellboy3> in emacs and hit C-!, it starts the python interpreter in > test1dellboy3> another window. Next, I execute - > > ... > > That's not really intended to be used as an

Re: IPython colors in windows

2005-02-03 Thread Fernando Perez
Ashot wrote: > I am using IPython in windows and the LightBG setting doesn't correctly > because the background of the text is black even if the console background > is white. Anyone know whats going on? Thanks. It's quite possible that it's a bug in the UNC readline implementation proper. How

Re: exporting mesh from image data

2005-02-03 Thread Fernando Perez
John Hunter wrote: > > I am trying to generate a mesh for a finite volume solver (gambit, > fluent) from 3D image data (CT, MRI). To generate the fluent msh > file, you need not only a list of vertices and polygons, much like > what is available in the vtk file format, but also the volume elemen

Re: exporting mesh from image data

2005-02-04 Thread Fernando Perez
John Hunter wrote: >>>>>> "Fernando" == Fernando Perez <[EMAIL PROTECTED]> writes: > > Fernando> I hope you posted this on the VTK list with a CC to > Fernando> Prabhu as well... The hopes of a positive reply there > Fernando> a

Re: IPython colors in windows

2005-02-04 Thread Fernando Perez
Claudio Grondi wrote: > I use this one, > http://heanet.dl.sourceforge.net/sourceforge/uncpythontools/readline-1.7.win > 32.exe > which I assume is the right one. Try version 1.8, some coloring problems have been recently fixed. If that doesn't do it, let me know and I'll try to get in touch wit

Re: IPython colors in windows

2005-02-04 Thread Fernando Perez
Ashot wrote: > this is what it looks like: > > http://www.freshraisins.com/sand/ipythonscreen.PNG > > does cygwin have a readline utility in it? Perhaps this is overriding the > correct one? Thats the only thing I can think of. Thanks for the screenshot. I've contacted the readline author, I

Re: IPython colors in windows

2005-02-04 Thread Fernando Perez
Ashot wrote: > this is what it looks like: > > http://www.freshraisins.com/sand/ipythonscreen.PNG > > does cygwin have a readline utility in it? Perhaps this is overriding the > correct one? Thats the only thing I can think of. Hi folks, could you please test under windows the 1.9 version of

Re: IPython colors in windows

2005-02-04 Thread Fernando Perez
Fernando Perez wrote: > Hi folks, > > could you please test under windows the 1.9 version of readline? > > http://sourceforge.net/project/showfiles.php?group_id=82407&package_id=84552&release_id=302513 > > This was just put up a moment ago by the developer, le

Re: IPython colors in windows

2005-02-04 Thread Fernando Perez
Fernando Perez wrote: > Ashot wrote: > >> this is what it looks like: >> >> http://www.freshraisins.com/sand/ipythonscreen.PNG >> >> does cygwin have a readline utility in it? Perhaps this is overriding the >> correct one? Thats the only thing I c

Re: IPython colors in windows

2005-02-04 Thread Fernando Perez
Ashot wrote: > One more thing I was wondering about: why not highlight the source code in > the errors since you already have this functionality (with '??' command). > It would be nice to have it highlighed on the prompt as well, but I > imagine this may be more difficult.. I've been using IPython

Re: IPython colors in windows

2005-02-04 Thread Fernando Perez
Ashot wrote: > whoa, that was quick, looks like it works for me. Thanks a lot! > It would be nice to be able to set the colors in the prefs file, although > its possible to edit the pyColorize file as Claudio mentioned. Yes, I haven't implemented user-definable color schemes. Not impossible, bu

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-05 Thread Fernando Perez
Hi, Ashot wrote: > This is sort of both Python and Vim related (which is why I've posted to > both newsgroups). [...] I know you've been using ipython recently (the readline color bugs), so perhaps my reply is a bit redundant. Forgive me if that's the case, I just want to give you some useful

Re: question about introspection using inspect module

2005-07-07 Thread Fernando Perez
Benjamin Rutt wrote: > I'm trying to learn about introspection in Python. my ultimate goal > is to be able to build a module "text database" of all modules that > are in the sys.path, by discovering all candidate modules (I've > already done that), importing all of them, and then introspecting on

Re: question about introspection using inspect module

2005-07-07 Thread Fernando Perez
Benjamin Rutt wrote: > Fernando Perez <[EMAIL PROTECTED]> writes: > >> I certainly don't want to discourage you from learning about python >> introspection, it's one of the most fun aspects of the language. But just >> as an FYI, the pydoc system alread

Re: PyX, matplotlib, 3D & LaTeX

2005-07-08 Thread Fernando Perez
Francisco Borges wrote: > I like PyX, use it a lot and would suggest it as a beter plotting > library than the ones at Scipy (for as long as you don't need on-screen > plotting). FWIW, the plotting support in scipy is essentially unmaintained and abandoned, since the advent of matplotlib. It has

Re: goto

2005-07-18 Thread Fernando Perez
Steven Bethard wrote: > Hayri ERDENER wrote: >> what is the equivalent of C languages' goto statement in python? > > Download the goto module: > http://www.entrian.com/goto/ > And you can use goto to your heart's content. And to the horror of all > your friends/coworkers. ;) > > STeVe Tha

Re: goto

2005-07-19 Thread Fernando Perez
Steven Bethard wrote: > Fernando Perez wrote: >> Steven Bethard wrote: >> >>>Download the goto module: >>> http://www.entrian.com/goto/ >>>And you can use goto to your heart's content. And to the horror of all >>>your friends/cowork

Re: PEP on path module for standard library

2005-07-21 Thread Fernando Perez
Peter Hansen wrote: > Michael Hoffman wrote: >> For the PEP, do any of you have arguments for or against including path? >> Code samples that are much easier or more difficult with this class >> would also be most helpful. > > I believe the strongest argument for "path" can be made for how it > i

Re: A Module on Time & Date

2005-07-27 Thread Fernando Perez
Robert Maas, see http://tinyurl.com/uh3t wrote: >> From: Robert Kern <[EMAIL PROTECTED]> >> As you can see in the datetime documentation, the module was introduced >> in Python 2.3. I recommend updating your Python installation. > > What do you mean "your"?? I don't have any Python installation o

Re: Dabo in 30 seconds?

2005-08-02 Thread Fernando Perez
* Oops, IPython crashed. We do our best to make it stable, but... A crash report was automatically generated with the following information: - A verbatim copy of the traceback above this text. - A copy of your input history during this session. - Data on your current IPython configuration.

Re: Dabo in 30 seconds?

2005-08-02 Thread Fernando Perez
Paul McNett wrote: > Fernando Perez wrote: >> If you are interested, just get ipython and grab the files for this, it's >> all >> BSD licensed. You can also browse the SVN repo here if you want to look at >> the code: >> >> http://ipython.scipy.org/s

Re: Dabo in 30 seconds?

2005-08-03 Thread Fernando Perez
Paul McNett wrote: > I've done things like this in the past, in my own Visual Foxpro > framework. In that situation, I had enough control over the deployment > to also ship a small smtp client, and automatically email the error > without requiring any interaction at all. Clients were impressed whe

Re: interpreter frame

2005-08-11 Thread Fernando Perez
Peter Hansen wrote: > Leo wrote: >> Good try, but that doesn't seem to work either. Maybe I should have >> emphasized that what I really want is the line of code, as opposed to >> the entire frame. > > Ah, it wasn't clear from your first post that you were specifically > interested in a line you

Re: Traceback Questions

2005-08-19 Thread Fernando Perez
ncf wrote: > I'm just beginning with tracebacks, building off of what I see in > asyncore's compact_traceback code, in order to hopefully store all the > values from the location in which the exception occured. > > I'm actually trying to make this into a python bug report system for my > current

Re: Precise timings ?

2005-08-30 Thread Fernando Perez
Madhusudan Singh wrote: > Madhusudan Singh wrote: > >> Hi >> >> I am using time.clock() to get the current time of the processor in >> seconds. For my application, I need really high resolution but currently >> seem to be limited to 0.01 second. Is there a way to specify the >> resolution (say 1

Re: job scheduling framework?

2005-09-08 Thread Fernando Perez
Larry Bates wrote: > Google turned up these links that might be of interest: > > http://www.foretec.com/python/workshops/1998-11/demosession/hoegl/ > http://www.webwareforpython.org/Webware/TaskKit/Docs/QuickStart.html > http://www.slac.stanford.edu/BFROOT/www/Computing/Distributed/Bookkeeping/SJ

Re: Creating BibTex files with XdkBibTeX

2005-09-12 Thread Fernando Perez
Rob Cowie wrote: > I'm looking for a module that is able to create valid BibTex documents. > I'm currently using string substitution to create the content, but it > is not validated in any way. > > The only BibTex creation module available in Python (that I can find) > is XdkBibTeX > (http://arti

Re: Detailed traceback

2005-09-13 Thread Fernando Perez
Echo wrote: > I have been working on handling unhanded exceptions and making a > detailed print out of the traceback after the exception. I found that > traceback.extract_tb worked nice and was quite simple. > > During my searching around I found out that it might be possible to > get the variabl

Re: working with VERY large 'float' and 'complex' types

2005-09-14 Thread Fernando Perez
Todd Steury wrote: > Greetings Python'ers: > > I'm just an amature who occasionally uses Python for complex mathematical > models. The current model I'm working with occasionally generates really > large numbers that are either "float" or "complex" types. These numbers are > so large that I eithe

Re: IPython colors in windows

2005-02-06 Thread Fernando Perez
Claudio Grondi wrote: > It works for me as it is now, so probably it is better to wait for the > next release of IPython with a cleaner implementation of color > schemes before further efforts towards support for choosing > of background colors for each colorized text output in IPython > via exten

Re: empty classes as c structs?

2005-02-06 Thread Fernando Perez
Steven Bethard wrote: > The complications with attribute hiding is one of main reasons I've > tried to minimize the number of methods associated with Bunch... in order for bunches to be fully useful in general, open contexts, I think that number of methods should be exactly zero (at least without

Re: IPython colors in windows

2005-02-06 Thread Fernando Perez
Claudio Grondi wrote: > Hi, > > I have just updated previously announced > and uploaded to > http://people.freenet.de/AiTI-IT/Python/Console.py > version > of Console.py because I was not satisfied with > it (it didn't support arbitrary ANSI escape > sequences for setting text colors ...) I'd s

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-07 Thread Fernando Perez
Ashot wrote: > yup, this is why I've been using it, its (almost exactly :) what I was looking > for. I had tried it before, but was reluctant to use it because the windows > terminal is not very appealing. Some things I've noticed so far that I think > could be improved, some of which are minor b

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-07 Thread Fernando Perez
Ashot wrote: > Sorry, a few more things I forgot to mention having to do with editing > multiline entries in the console: > > Autotab setting doesn't seem to have any effect, I have to type "ctrl-o" > manually I've noticed it doesn't work under win32. It's fine under *nix. There's only so much

Re: Hack with os.walk()

2005-02-12 Thread Fernando Perez
Michael Spencer wrote: > The path module by Jorendorff: http://www.jorendorff.com/articles/python/path/ > > wraps various os functions into an interface that can make this sort of thing > cleaner Wow, many thanks for the pointer. This has to be one of the single most useful small python modules

Re: Hack with os.walk()

2005-02-12 Thread Fernando Perez
Robert Kern wrote: > Fernando Perez wrote: > >> Perhaps this path.py could be considered for inclusion in the stdlib? I've >> only >> read the page linked above, so perhaps it can use some polishing. But it >> certainly looks like a big improvement over the

Re: graphing

2005-02-14 Thread Fernando Perez
Jan Rienyer Gadil wrote: > i'm currently using python 2.3(enthought edition) on win 2000/xp. > i'm using boa constructor on the GUI part and matplotlib 0.71 on > plotting the graph. You should post this on the matplotlib list directly, where your chances of a reply are much better. I use matplot

[ANN] IPython 0.6.11 is out.

2005-02-15 Thread Fernando Perez
Hi all, I'm glad to announce the release of IPython 0.6.11. IPython's homepage is at: http://ipython.scipy.org and downloads are at: http://ipython.scipy.org/dist I've provided RPMs (for Python 2.3 and 2.4, built under Fedora Core 3), plus source downloads (.tar.gz). We now also have a nativ

Re: [ANN] IPython 0.6.11 is out.

2005-02-16 Thread Fernando Perez
Ville Vainio wrote: > Warning - if you are upgrading and have an old pysh.py dangling around > in $HOME/.ipython, be sure to delete it. The old version is > incompatible with the new ipython. Just to clarify: you need to delete ONLY the old pysh.py, not your entire $HOME/.ipython/ directory. Y

Re: huge help for interactive python

2005-02-16 Thread Fernando Perez
David S. wrote: > If you are using ipython on Windows then you will > have made sure you have Gary Bishop's readline > library as instructed in the ipython install > directions found at: > http://ipython.scipy.org/ [...] Thanks, very handy. I just reposted your message to the ipyhton-users list

Re: recommended way of generating HTML from Python

2005-02-20 Thread Fernando Perez
Michele Simionato wrote: > What is the recommended way of generating HTML from Python? I know of > HTMLGen and of > few recipes in the Cookbook, but is there something which is more or > less standard? I'm also an htmlgen user, but it's getting a bit long in the tooth, and the installation is not

[ANN] IPython 0.6.12 is out.

2005-03-02 Thread Fernando Perez
Hi all, I'm glad to announce the release of IPython 0.6.12. This is mainly a bugfix release. IPython's homepage is at: http://ipython.scipy.org and downloads are at: http://ipython.scipy.org/dist I've provided RPMs (for Python 2.3 and 2.4, built under Fedora Core 3), plus source downloads (.

Re: computing a weighted sum

2005-03-16 Thread Fernando Perez
[EMAIL PROTECTED] wrote: > Suppose I have a list of n floats x and a list of n floats w and I want > to compute x[0]*w[0] + .. + x[n-1]*w[n-1]. > > Is there some elegant expression (perhaps using lambda) to have it done > in one statement ? As in : > y = lambda x,w : ... > > I ask because t

ANN: IPython 0.6.5 is out

2004-12-01 Thread Fernando Perez
Hi all, I'm glad to announce that IPython 0.6.5 is finally out. IPython's homepage is at: http://ipython.scipy.org and downloads are at: http://ipython.scipy.org/dist I've provided RPMs for Python 2.2 and 2.3, plus source downloads (.tar.gz and .zip). Debian, Fink and BSD packages for this ve

Re: memoize factorial example (was Re: decorators ?)

2004-12-07 Thread Fernando Perez
Terry Reedy wrote: > > "Daniel 'Dang' Griffith" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> But the factorial example on the wiki has a defect. It incorrectly >> calculates factorial(0) as 0, when it should be 1. > > This is a matter of definition, and definitions apparentl

Re: 3D plotting library / OpenGL

2004-12-07 Thread Fernando Perez
Andrew Dalke wrote: > I've been looking for a decent 3D plotting library with support > for user selection that works under OpenGl, preferable with wxPython. > > For this first project I need to do a 3D scatter plot with > different colors and glyphs (spheres, crosses, etc.) for the points. > The

Re: memoize factorial example (was Re: decorators ?)

2004-12-07 Thread Fernando Perez
Fernando Perez wrote: > No, fact(0)==1 simply because any proper definition of a factorial has to > match > up with the gamma function (offset by one) at all non-negative integers. So > there's no room for any ambiguity here. I should have added a link to the ever-useful

Rationale behind the deprecation of __getslice__?

2004-12-09 Thread Fernando Perez
Hi all, I was wondering if someone can help me understand why __getslice__ has been deprecated, yet it remains necessary to implement it for simple slices (i:j), while __getitem__ gets called for extended slices (i:j:k). The problem with this approach, besides a bit of code duplication, is that

Re: Rationale behind the deprecation of __getslice__?

2004-12-09 Thread Fernando Perez
Fernando Perez wrote: > Hi all, > > I was wondering if someone can help me understand why __getslice__ has been > deprecated, yet it remains necessary to implement it for simple slices (i:j), > while __getitem__ gets called for extended slices (i:j:k). [...] > def __

Re: Rationale behind the deprecation of __getslice__?

2004-12-09 Thread Fernando Perez
Steven Bethard wrote: > Fernando Perez wrote: >> I was wondering if someone can help me understand why __getslice__ has been >> deprecated, yet it remains necessary to implement it for simple slices >> (i:j), while __getitem__ gets called for extended slices (i:j:k). >

Re: Rationale behind the deprecation of __getslice__?

2004-12-09 Thread Fernando Perez
Steven Bethard wrote: > Fernando Perez wrote: >> classes which implement slicing must now do runtime type-checking inside >> __getitem__. > > Just in case you thought that they wouldn't have to do runtime > type-checking otherwise: > > >>> class

Re: Rationale behind the deprecation of __getslice__?

2004-12-09 Thread Fernando Perez
Terry Reedy wrote: > >> If no __getslice__() is found, a slice object is created instead, and >> passed to __getitem__() instead. > > The overwhelmingl most common case of a simple slice is more efficiently > done by having a separate function since no slice object is created. > a=[1,2,3]

Re: Rationale behind the deprecation of __getslice__?

2004-12-09 Thread Fernando Perez
Steven Bethard wrote: > Presumably the numarray code has to do quite a bit of type checking to > perform all these slicings right (and I didn't even show you what > happens when you use another array as an "index"). I'm not necessarily Yes, I know. I haven't switched to numarray because of the

ANN: IPython 0.6.5 is out.

2004-12-13 Thread Fernando Perez
Hi all, I'm glad to announce the release of IPython 0.6.6. IPython's homepage is at: http://ipython.scipy.org and downloads are at: http://ipython.scipy.org/dist I've provided RPMs (Py2.2 and 2.3), plus source downloads (.tar.gz and .zip). Debian, Fink and BSD packages for this version shoul

Re: ".>>>" is a good idea! (OT, was: Re: do you master list comprehensions?)

2004-12-16 Thread Fernando Perez
Kent Johnson wrote: > Keith Dart wrote: >> What I do is set Python's sys.ps1 variable to something else. I have a >> module called "interactive" that I import implicitly by shell alias: >> >> py='python -i -c '\''import interactive'\' >> >> Which, among other things, sets the prompt to "Python>

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Fernando Perez
Amir Dekel wrote: > Hi everyone, > > I have two problems: > > 1. How can I keep my changes in sys.path after closing the interpreter? As others said, use $PYTHONPATH > 2. os.path.expanduser("~") always gives me "C:\\" instead of my > homepath. I have tried to change my homepath in WinXP using

Re: ".>>>" is a good idea! (OT, was: Re: do you master list comprehensions?)

2004-12-17 Thread Fernando Perez
Keith Dart wrote: > Fernando Perez wrote: > >> >> >> You might want to look at ipython: >> >> http://ipython.scipy.org, >> >> >> >> > > I did just recently install that. It looks very nice. Would make a great > interac

Bug in inspect.py for python 2.3?

2004-12-17 Thread Fernando Perez
Hi all, IPython has suffered quite a few problems with the inspect module in python 2.3. For these, unfortunately all I've been able to do is guard with overreaching except clauses, as I had not been able to find small, reproducible examples to pass on to the devs. But today I got a crash report

Re: expression form of one-to-many dict?

2004-12-17 Thread Fernando Perez
Steven Bethard wrote: > Actually, it's even smaller now, because I've pretty much removed map > from all my code in favor of list comprehensions, which I find much > easier to read. While I agree that listcomps are more readable in most cases (and certainly for all cases with any amount of comple

Re: Bug in inspect.py for python 2.3?

2004-12-17 Thread Fernando Perez
Terry Reedy wrote: > [I removed the blank lines which made it diffificult to cut and paste.] > [Here is the output (from 2.2) you forgot to include'-):] Yes, that's exactly the output I see. Note that in ipython I have had to protect ALL calls for inspect.get* functions in blanket excepts, becau

lambdas vs functions: a bytecode question

2004-12-17 Thread Fernando Perez
Hi all, there are a couple of threads on lambdas today, which got me curious about their differences as far as bytecode goes: planck[~]|2> lf=lambda x: x**2 planck[~]|3> def ff(x): return x**2 |.> planck[~]|4> import dis planck[~]|5> dis.dis(lf) 1 0 LOAD_FAST0

Re: Bug in inspect.py for python 2.3?

2004-12-17 Thread Fernando Perez
Peter Otten wrote: > Fernando Perez wrote: > >> I'd like to hear from some of our resident gurus if this is really an >> inspect.py bug before I bother the developers with a formal bug report on >> SF. >> The script below illustrates the problem. Just ru

Re: lambdas vs functions: a bytecode question

2004-12-17 Thread Fernando Perez
Erik Max Francis wrote: > Fernando Perez wrote: > >> Can someone explain to me what the extra two bytecodes at the end of the >> function version (ff) are for? >> >> This is just curiosity, please note that I am NOT making any arguments pro >> or against

Re: ANN: IPython 0.6.5 is out.

2004-12-13 Thread Fernando Perez
Fernando Perez wrote: > I'm glad to announce the release of IPython 0.6.6. IPython's homepage is at: Sorry, the _title_ was incorrect. 0.6.6 is indeed a new release put out today, I just copied an old title and missed the change. Regards, f -- http://mail.python.org/mailman/li

Re: gather information from various files efficiently

2004-12-14 Thread Fernando Perez
Keith Dart wrote: > Aye... > > the dict.keys() line creates a temporary list, and then the 'in' does a > linear search of the list. Better would be: > > try: > dict[a].append(b) > except KeyError: > dict[a] = [b] > > since you expect the key to be there most of the time, this method i

Re: expression form of one-to-many dict?

2004-12-20 Thread Fernando Perez
Doug Holton wrote: > Mike Meyer wrote: > >> Personally, I'd love a language feature that let you create a function >> that didn't evaluate arguments until they were actually used - lazy >> evaluation. That lets you write the C ?: operator as a function, for >> a start. >> >> Hmmm. No, iterators

Re: Lambda going out of fashion

2004-12-23 Thread Fernando Perez
Alex Martelli wrote: > I don't know what it IS about lambda that prompts so much dubious to > absurd use, but that's what I observed. I don't know if that plays any > role in Guido's current thinking, though -- I have no idea how much > "dubious Python" he's had to struggle with. Just a side com

Re: ANN: IPython 0.6.5 is out

2004-12-28 Thread Fernando Perez
Dan Christensen wrote: > Fernando Perez <[EMAIL PROTECTED]> writes: > >> * Added ipython.el to the end-user distribution, for (X)Emacs support, since >> now the official python-mode.el from >> >> http://sourceforge.net/projects/python-mode >> >>

Re: emulating python shell

2004-12-28 Thread Fernando Perez
Uwe Mayer wrote: > Hi, > > in an application I want to provide direct access to the python interpreter > of the running program. > I use rawinput() and exec() to read an input string and a self-made function > to check wether the inputed block is closed and then execute it. > > When running pyth

Re: Q: Scheduling in scipy.cow

2004-12-28 Thread Fernando Perez
Scott David Daniels wrote: > Mathias wrote: >> Dear NG, >> >> can somebody tell me how the work packages are scheduled to the workers? >> From the code it seems to me like a a static distribution, ie each >> worker gets the same amount of work, not taking into account if a faster >> worker alrea

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Fernando Perez
Alex Martelli wrote: > the coverage of Twisted and adding just a few things (numarray -- > perhaps premature to have it _instead_ of Numeric, though; dateutils, You might want to keep in touch with the scipy/numarray gang on this particular topic. An effort is currently under way to make scipy w

Re: calling functions across threads

2004-12-29 Thread Fernando Perez
Steven Bethard wrote: > I get the correct output, but if you run this yourself, you'll see that > the numbers 1 through 10 aren't printed in sync with the writes (i.e. > every half second); they're all printed at the end. Could someone > explain to me why this happens, and how (if possible) I can

Re: calling functions across threads

2004-12-29 Thread Fernando Perez
Steven Bethard wrote: > Fernando Perez wrote: >> Steven Bethard wrote: >> >> >>>I get the correct output, but if you run this yourself, you'll see that >>>the numbers 1 through 10 aren't printed in sync with the writes (i.e. >>>every ha

Re: Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

2005-04-05 Thread Fernando Perez
syd wrote: > I don't even know where to begin. This is just bizarre. I just picked > up the Gnuplot.py module (a light interface to gnuplot commands) and > was messing around with it today. > > I've got a tiny script, but it only works from the command line about > half the time! In the python

Re: Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

2005-04-05 Thread Fernando Perez
syd wrote: > Thanks for all the help, guys! > Fernando, that's a creative solution, I'll try it as well... > while 1: > if os.path.isfile(your_plot_filename): > break > time.sleep(1) More like a desperate brute force one, but it gets the job done :) You mentioned having ipython, so you

Re: IPython - problem with using US international keyboard input scheme on W2K

2005-04-12 Thread Fernando Perez
Claudio Grondi wrote: > Considering what I found in the ipython mailing archives > and the fact, that after the fix with displaying colors on > bright backgrounds Gary had no time yet to get in touch > with me about the code I have sent him, I suppose, that > there will be no new releases addressi

Re: IPython - problem with using US international keyboard input scheme on W2K

2005-04-12 Thread Fernando Perez
Michele Simionato wrote: > Me too :-( > I have already submitted my issues with the Italian keyboard > on WinXP with no great success. It works on Linux, but this > is not of a big help since my plan was to use ipython -p pysh on > Windows as a replacement of the shell :-( Bummer. I wonder, if t

[ANN] IPython 0.6.13 is out.

2005-04-14 Thread Fernando Perez
Hi all, I'm glad to announce the release of IPython 0.6.13. IPython's homepage is at: http://ipython.scipy.org and downloads are at: http://ipython.scipy.org/dist I've provided RPMs (for Python 2.3 and 2.4, built under Fedora Core 3), plus source downloads (.tar.gz). Fedora users should note

[ANN] IPython 0.12 is out!

2011-12-19 Thread Fernando Perez
Hi all, on behalf of the IPython development team, I'm thrilled to announce, after an intense 4 1/2 months of work, the official release of IPython 0.12. This is a very important release for IPython, for several reasons. First and foremost, we have a major new feature, our interactive web-based

Re: IPython 0.12 is out!

2011-12-19 Thread Fernando Perez
On Mon, 19 Dec 2011 20:00:03 -0800, alex23 wrote: > You read the installation instructions and did a 'python setup.py > install' as it states, yes? > > Installed that way for Python 2.7.2 under Win64 with no issues > whatsoever. Glad to hear that. Obviously since I announced it here I'll try to

  1   2   >