From Fernando.Perez at colorado.edu Sun Jan 23 19:56:15 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Sun, 23 Jan 2005 17:56:15 -0700 Subject: [IPython-dev] win32 installer woes... Message-ID: <41F447AF.50700@colorado.edu> Hi all, after Viktor's excellent win32 installer work, we have something which _almost_ works. Except I have a really nasty problem. I have just posted a message to c.l.py asking for help, which I repost here in case anyone can help or has a good solution. Regards, f. #################################################################3 Installer made with bdist_wininst segfaulting... From: Fernando Perez Date: Sunday 23 January 2005 05:47:37 pm Groups: gmane.comp.python.general no references 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 finally understand. This smells to me like a python bug, but I could be wrong. Much googling didn't turn up anything relevant. 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 installer segfaults. No traceback, nothing, just a segfault (well, one of those Windows dialogs asking me to send a binary traceback to Redmond, but not a proper Python traceback). The win32 laptop where I'm testing, for example, has user stuff in the D: drive, and Python installed in C:\Python23. I was running the installer from D:\Temp, and getting this segfault. If I run it from C:\Temp, it works perfectly. I have put the installer here, in case someone else is willing to test this on a different machine: http://amath.colorado.edu/faculty/fperez/tmp/ipython-0.6.9.win32.exe I have narrowed down to a single os.chdir() call in the post-install script. The code is simply: # Lookup path to common startmenu ... d = get_special_folder_path('CSIDL_COMMON_PROGRAMS') + r'\IPython' # Create IPython entry ... if not os.path.isdir(d): os.mkdir(d) directory_created(d) # XXX - The binary installer segfaults here if it was being run from a # different drive than it is trying to change to. In my case, I have # everything in D:, but Python lives in C:, so the chdir() call is going # from D: to C:, and this is crashing things. print "Current dir:",os.getcwd() # dbg print "Going to :",d # dbg os.chdir(d) By forcing a return before the chdir() call, I was able to see that when the source/destination are both on C:, it's all OK, but when the source is in D: and the destination in C:, I get the crash. This is really frustrating, since I'd like to be able to stop distributing .zip sources to Windows users, and would like to be able to provide a proper installer/deinstaller. But having this thing crash if two drives are involved is just not acceptable. Any help from the win32 gurus out there would be much appreciated. For reference, the binary installer linked above was created on a Fedora3 box running pyhton 2.3.4, with the command line: ./setup.py bdist_wininst --install-script=ipython_win_post_install.py Cheers, f From Fernando.Perez at colorado.edu Mon Jan 24 02:08:08 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Mon, 24 Jan 2005 00:08:08 -0700 Subject: [IPython-dev] Re: [IPython-user] win32 installer woes... In-Reply-To: <41F447AF.50700@colorado.edu> References: <41F447AF.50700@colorado.edu> Message-ID: <41F49ED8.1010509@colorado.edu> Fernando Perez wrote: > Hi all, > > after Viktor's excellent win32 installer work, we have something which > _almost_ works. Except I have a really nasty problem. I have just posted a > message to c.l.py asking for help, which I repost here in case anyone can > help or has a good solution. OK, I got a solution. It turns out the original os.chdir() instruction was completely unnecessary for the script to actually run. So I simply removed it, and things work now fine regardless of where they run from. In case anyone is interested in testing this fixed win32 installer, it is here: http://amath.colorado.edu/faculty/fperez/tmp/ipython-0.6.9-1.win32.exe Feedback on how this release works for Windows users would be greatly appreciated. The old one (with the segfault if run from a different drive) is still at: http://amath.colorado.edu/faculty/fperez/tmp/ipython-0.6.9.win32.exe I still think this is a nasty bug somewhere in python's binary installer, but since this has cost me yet another Sunday dealing with the endemic brokenness of Windows, I won't pursue it further [1]. The fix I have works for me. If someone cares to follow up with the upstream win32/distutils crowd, it would probably save others similar headaches in the future. Cheers, f [1] There is a simple reason why I hate the Win32 platform with such a passion: _every_ time I've tried to get ipython to behave under windows in a rational manner, the simplest, most trivial things have always cost me an entire weekend. And at the end of the day, without fail, I end up just having to build kludgy solutions to sidestep every one of the million ways in which Windows manages to break every computing standard known to man, without mentioning simple common sense. And yes, I'm bitter :) From viktor.ransmayr at t-online.de Mon Jan 24 15:52:44 2005 From: viktor.ransmayr at t-online.de (Viktor Ransmayr) Date: Mon, 24 Jan 2005 21:52:44 +0100 Subject: [IPython-dev] Re: [IPython-user] win32 installer woes... In-Reply-To: <41F49ED8.1010509@colorado.edu> References: <41F447AF.50700@colorado.edu> <41F49ED8.1010509@colorado.edu> Message-ID: <41F5601C.40801@t-online.de> Hi Fernando, You wrote: > Fernando Perez wrote: > >> Hi all, >> >> after Viktor's excellent win32 installer work, we have something >> which _almost_ works. Except I have a really nasty problem. I have >> just posted a message to c.l.py asking for help, which I repost here >> in case anyone can help or has a good solution. > > OK, I got a solution. It turns out the original os.chdir() > instruction was completely unnecessary for the script to actually > run. So I simply removed it, and things work now fine regardless of > where they run from. In case anyone is interested in testing this > fixed win32 installer, it is here: > > http://amath.colorado.edu/faculty/fperez/tmp/ipython-0.6.9-1.win32.exe > > Feedback on how this release works for Windows users would be greatly > appreciated. Installation, Usage of IPython & PySH plus De-Installation works for me. > The old one (with the segfault if run from a different drive) is still > at: > http://amath.colorado.edu/faculty/fperez/tmp/ipython-0.6.9.win32.exe > > I still think this is a nasty bug somewhere in python's binary > installer, but since this has cost me yet another Sunday dealing with > the endemic brokenness of Windows, I won't pursue it further [1]. The > fix I have works for me. If someone cares to follow up with the > upstream win32/distutils crowd, it would probably save others similar > headaches in the future. > > Cheers, > > f > > [1] There is a simple reason why I hate the Win32 platform with such a > passion: _every_ time I've tried to get ipython to behave under > windows in a rational manner, the simplest, most trivial things have > always cost me an entire weekend. And at the end of the day, without > fail, I end up just having to build kludgy solutions to sidestep every > one of the million ways in which Windows manages to break every > computing standard known to man, without mentioning simple common > sense. And yes, I'm bitter :) I wanted to give this feedback right away to let you know. - However I'll still want to follow up on my side to find out, why I did explicitely change the directory. I'll keep you informed about my findings. Kind regards, Viktor From Fernando.Perez at colorado.edu Mon Jan 24 15:58:17 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Mon, 24 Jan 2005 13:58:17 -0700 Subject: [IPython-dev] Re: [IPython-user] win32 installer woes... In-Reply-To: <41F5601C.40801@t-online.de> References: <41F447AF.50700@colorado.edu> <41F49ED8.1010509@colorado.edu> <41F5601C.40801@t-online.de> Message-ID: <41F56169.2000306@colorado.edu> Viktor Ransmayr wrote: >>where they run from. In case anyone is interested in testing this >>fixed win32 installer, it is here: >> >>http://amath.colorado.edu/faculty/fperez/tmp/ipython-0.6.9-1.win32.exe >> >>Feedback on how this release works for Windows users would be greatly >>appreciated. > > > Installation, Usage of IPython & PySH plus De-Installation works for me. Great, thanks for the info. > I wanted to give this feedback right away to let you know. - However > I'll still want to > follow up on my side to find out, why I did explicitely change the > directory. > > I'll keep you informed about my findings. This may have been a remnant of some intermediate tests, or of the old manual installation code. As far as I can tell, it's now completely unnecessary. I am attaching the current version of the post-install script, which is a cleanup of yours. The accompanying setup.py is also here. You can see that all the post-install script does is call create_shortcut, which can be done from anywhere in the filesystem. There is no need to be at any particular location, hence no need to call chdir(). Now, it's obviously a bug in the python installer to segfault on chdir(), but that's one I simply don't have time to pursue right now. It would probably be a good idea to follow this up by logging it on sourceforge, if you can confirm the segfaults with http://amath.colorado.edu/faculty/fperez/tmp/ipython-0.6.9.win32.exe Regards, f -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ipython_win_post_install.py URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: setup.py URL: From Fernando.Perez at colorado.edu Tue Jan 25 12:38:53 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Tue, 25 Jan 2005 10:38:53 -0700 Subject: [IPython-dev] Re: [IPython-user] win32 installer woes... In-Reply-To: <41F49ED8.1010509@colorado.edu> References: <41F447AF.50700@colorado.edu> <41F49ED8.1010509@colorado.edu> Message-ID: <41F6842D.3010804@colorado.edu> Fernando Perez wrote: > Fernando Perez wrote: > >>Hi all, >> >>after Viktor's excellent win32 installer work, we have something which >>_almost_ works. Except I have a really nasty problem. I have just posted a >>message to c.l.py asking for help, which I repost here in case anyone can >>help or has a good solution. Final followup in case anyone is interested. T. Heller just replied to my c.l.py query with this. Cheers, f ########################################################### Re: Installer made with bdist_wininst segfaulting... From: Thomas Heller Date: Tuesday 25 January 2005 08:02:56 am Groups: gmane.comp.python.general References: 1 Fernando Perez writes: > 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 finally understand. This > smells to me like a python bug, but I could be wrong. Much googling didn't > turn up anything relevant. > > 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 installer segfaults. No traceback, nothing, just a segfault > (well, one of those Windows dialogs asking me to send a binary traceback to > Redmond, but not a proper Python traceback). 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 installer is run from a different drive (as you reported) - the installer installs for Python 2.4 I will fix these issues in Python 2.3.5, which will probably be out as a release candidate this week, and in Python 2.4.1. I urge everyone to install this release candidate, rebuild the installer with it, and test them thoroughly. Thanks, Thomas From Fernando.Perez at colorado.edu Thu Jan 27 03:36:35 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Thu, 27 Jan 2005 01:36:35 -0700 Subject: [IPython-dev] Re: A few remaining coloring bugs? In-Reply-To: <200501270044.j0R0i9WN015457@fafnir.cs.unc.edu> References: <200501270044.j0R0i9WN015457@fafnir.cs.unc.edu> Message-ID: <41F8A813.3090506@colorado.edu> Hi everyone, Gary Bishop has been helping me track down a problem with syntax-highlighted source under Windows. A simple way to see the problem is to do import code code?? You should see nicely syntax-highlighted source: http://ipython.scipy.org/screenshots/syntax_highlight.png Instead, win32 users get strangely broken lines with incorrect colors and visible escape sequences. Here is some of what Gary has found: Gary Bishop wrote: > A little more debugging. > >>From outside my code, ipython calls "write" on my file object. The CR > characters are already in the string at that time. So it looks to me > like the CR's are coming from your code. So, it looks like they are > already in there. This is output from od -c > > 0012720 m \r \r \n 033 [ 1 ; 3 2 m f r o m 033 > 0012740 [ 0 m 033 [ 1 ; 3 7 m c o d e o > 0012760 p 033 [ 0 m 033 [ 1 ; 3 2 m i m p > 0013000 o r t 033 [ 0 m 033 [ 1 ; 3 7 m C > 0013020 o m m a n d C o m p i l e r 033 [ > 0013040 0 m 033 [ \r \r \n 1 ; 3 3 m , 033 [ 0 > 0013060 m 033 [ 1 ; 3 7 m c o m p i l e > 0013100 _ c o m m a n d 033 [ 0 m \r \r \n \r > 0013120 \r \n 033 [ 1 ; 3 7 m _ _ a l l _ _ > 0013140 033 [ 0 m 033 [ 1 ; 3 3 m = 033 [ 0 > 0013160 m 033 [ 1 ; 3 3 m [ 033 [ 0 m 033 [ [...] > No, I think the key problem is the \r's are embedded inside the escape > sequence. I have an RE that is scanning for the escape sequences. It > doesn't allow embedded \r\n characters. I guess it could. But I'm > amazed that escape sequences allow embedded control characters. Unfortunately, my debugging efforts came to a screeching halt today, as the old win32 laptop I was trying to use seems to have finally died. It has a bad screen, and today I just couldn't turn it on anymore. Since I don't have an external screen at home I can plug into it, for now I'm stuck. But looking at the code, I think I have a good idea of where the problem might be. I was wondering if I ask anyone on the lists with win32 access to help me track this down, by running a simple test for me. Please replace PyColorize.py in the site-packages/IPython directory with the one I'm sending here. I've basically replaced all explicit '\n' references in the tokenizer call to os.linesep. This might prevent it from inserting things in the wrong places, though I'm not 100% sure it can fix it. If this works, I think we'll finally have an ipython which under win32 would really provide _all_ the functionality of the linux version. Thanks in advance for any help. Best, f -------------- next part -------------- A non-text attachment was scrubbed... Name: PyColorize.py Type: text/x-python Size: 9293 bytes Desc: not available URL: From Fernando.Perez at colorado.edu Thu Jan 27 15:48:13 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Thu, 27 Jan 2005 13:48:13 -0700 Subject: [IPython-dev] ANN: IPython 0.6.10 is out. Message-ID: <41F9538D.30403@colorado.edu> 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 installer. Debian, Fink and BSD packages for this version should be coming soon, as the respective maintainers (many thanks to Jack Moffit, Andrea Riciputi and Dryice Liu) have the time to follow their packaging procedures. Many thanks to Enthought for their continued hosting support for IPython, and to all the users who contributed ideas, fixes and reports. Release notes ------------- As always, the NEWS file can be found at http://ipython.scipy.org/NEWS, and the full ChangeLog at http://ipython.scipy.org/ChangeLog. * The major highlight of this release is vastly improved support for Windows users. Thanks to a lot of help from Viktor Ransmayr (installer work) and Gary Bishop (coloring problems), now Windows users finally should have an ipython with all the functionality available under Unix. There is now a true win32 executable installer: http://ipython.scipy.org/dist/ipython-0.6.10.win32.exe This can be double-clicked and it will do a real windows installation, allowing later de-installation via the Control Panel. It will also warn if it detects that ctypes and/or readline are missing (needed for coloring/tab support). Full source syntax highlighting had always been broken under win32, and the bug turned out to be in ipython's formatting code. Thanks to Gary's debugging help, this problem is now fixed. You can test it by typing in ipython: import code code?? You should see properly highligted sources, as shown in this (new) screenshot: http://ipython.scipy.org/screenshots/snapshot6.png Under Win32, ipython will now honor (if it exists) the $HOME environment variable and it will put your .ipython/ directory there. This should be more consistent for Win32 users who have a unix-like setup. If $HOME is not defined, the previous behavior remains (HOMEDRIVE\HOMEPATH). I also fixed a crash for pylab users under win32 with multithreaded backends (GTK/WX). I would appreciate reports of any problems from Win32 users. * (X)Emacs users: I incorporated Alex Schmolck's recent fixes and improvements to ipython.el. Since the python-mode project still hasn't made a release with the changes which IPython needs, I've temporarily copied today's CVS snapshot (v 4.70) of python-mode.el here: http://ipython.scipy.org/tmp/python-mode.el Once they make an official release, I'll remove this. * Small cleanups and improvements to numutils, including new amin/amax and empty_like utility functions. The deprecated spike/spike_odd functions have been removed. * Fix issue 24 from the bug tracker: spurious attribute access on assignment (foo.x=1 would trigger a __getattr__ call on foo). * Fix reporting of compound names in verbose exception reporting mode. This had been broken since the beginning of ipython (the tokenization logic was a bit tricky). * Fix gtk deprecation warnings (A. Straw patch). * Fix crash when inspecting instances without an __init__ method (reported by N. Nemenc). * Fix quote stripping bug in shell access (P. Ramachandran report). * Other minor fixes and cleanups, both to code and documentation. Enjoy, and as usual please report any problems. Regards, Fernando. From Fernando.Perez at colorado.edu Fri Jan 28 04:22:48 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 28 Jan 2005 02:22:48 -0700 Subject: [IPython-dev] Very nice article about IPython at O'Reilly... Message-ID: <41FA0468.1030508@colorado.edu> Hi all, with great timing to coincide with today's release, Jeremy Jones has published at the O'Reilly ONLamp site the following article about IPython: http://www.onlamp.com/pub/a/python/2005/01/27/ipython.html I am flattered by his glowing comments, and I hope that users in general really find it a useful tool. While many on the list may be very familiar with ipython, I think Jeremy did a great job of outlining its strengths for beginners, for which I'm grateful. This will be a good resource to point new users towards, I'll update the ipython site in a minute to link to it. Regards, and many thanks to Jeremy for his work! f From prabhu_r at users.sf.net Fri Jan 28 05:34:22 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Fri, 28 Jan 2005 16:04:22 +0530 Subject: [IPython-dev] Very nice article about IPython at O'Reilly... In-Reply-To: <41FA0468.1030508@colorado.edu> References: <41FA0468.1030508@colorado.edu> Message-ID: <16890.5422.398903.840890@monster.linux.in> >>>>> "FP" == Fernando Perez writes: FP> Hi all, with great timing to coincide with today's release, FP> Jeremy Jones has published at the O'Reilly ONLamp site the FP> following article about IPython: FP> http://www.onlamp.com/pub/a/python/2005/01/27/ipython.html Excellent article! Thanks for sending it along. cheers, prabhu From Fernando.Perez at colorado.edu Fri Jan 28 13:20:02 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 28 Jan 2005 11:20:02 -0700 Subject: [IPython-dev] ANN: IPython 0.6.10 is out. In-Reply-To: References: <41F9538D.30403@colorado.edu> Message-ID: <41FA8252.6030408@colorado.edu> John Hunter wrote: >>>>>>"Fernando" == Fernando Perez writes: > > > Fernando> Hi all, I'm glad to announce the release of IPython > Fernando> 0.6.10. IPython's homepage is at: > > I get an installer crash (winxp, python2.4) when I try and run the > ipython win32 installer, I get a crash referring to ntdll.dll. I have > python2.2, 2.3 and 2.4 installed on this machine, and the crash only > happens on 2.4 Well, the installer was built by python2.3, so it may be that these things can't be run from a different version. I just renamed the win32 installer to win32-py23 to try and inform users about the python version. I left a symlink with the old name in case someone clicks on the announcement, though. Thanks for the report. Unfortunately I don't have 2.4 right now, so I can't make a native 2.4 installer. Bummer. Cheers, f From Fernando.Perez at colorado.edu Fri Jan 28 14:58:00 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 28 Jan 2005 12:58:00 -0700 Subject: [IPython-dev] win32 / python2.4 installer Message-ID: <41FA9948.2070003@colorado.edu> Hi all, several people have reported problems with the win32 installer when run under python 2.4. Thanks to the Fedora3 python2.4 repository provided by python.org, I was able to quickly build a .exe win32 installer for 2.4, which I've put here: http://ipython.scipy.org/dist/testing/ipython-0.6.10.win32-py24.exe If any win32/py24 user could take this for a spin and let me know if it works, I'd appreciate it. If it's ok, I'll move it up to the main dist/ directory. Cheers, f From jdhunter at ace.bsd.uchicago.edu Fri Jan 28 14:59:13 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Fri, 28 Jan 2005 13:59:13 -0600 Subject: [IPython-dev] Re: [IPython-user] win32 / python2.4 installer In-Reply-To: <41FA9948.2070003@colorado.edu> (Fernando Perez's message of "Fri, 28 Jan 2005 12:58:00 -0700") References: <41FA9948.2070003@colorado.edu> Message-ID: >>>>> "Fernando" == Fernando Perez writes: Fernando> Hi all, several people have reported problems with the Fernando> win32 installer when run under python 2.4. Thanks to Fernando> the Fedora3 python2.4 repository provided by python.org, Fernando> I was able to quickly build a .exe win32 installer for Fernando> 2.4, which I've put here: Fernando> http://ipython.scipy.org/dist/testing/ipython-0.6.10.win32-py24.exe It's a no-go -- same crash. I was going to be surprised if it made a difference building under 2.4, since for python only modules it shouldn't matter which version you build with. The crash happens after the postinstall script is launched. That's the only additional information I have for now. JDH From Fernando.Perez at colorado.edu Fri Jan 28 15:14:47 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 28 Jan 2005 13:14:47 -0700 Subject: [IPython-dev] Re: [IPython-user] win32 / python2.4 installer In-Reply-To: References: <41FA9948.2070003@colorado.edu> Message-ID: <41FA9D37.7090007@colorado.edu> John Hunter wrote: >>>>>>"Fernando" == Fernando Perez writes: > > > Fernando> Hi all, several people have reported problems with the > Fernando> win32 installer when run under python 2.4. Thanks to > Fernando> the Fedora3 python2.4 repository provided by python.org, > Fernando> I was able to quickly build a .exe win32 installer for > Fernando> 2.4, which I've put here: > > Fernando> http://ipython.scipy.org/dist/testing/ipython-0.6.10.win32-py24.exe > > > It's a no-go -- same crash. I was going to be surprised if it made a > difference building under 2.4, since for python only modules it > shouldn't matter which version you build with. Well, unless there was a bug in the binary part of the installer shipped with python 2.3.4, which had been fixed in 2.4. Python basically bundles the entire .exe as a string so you can build bdist_wininst under unix. But apparently that slim chance did not pan out :( Thanks for the info, though. > The crash happens after the postinstall script is launched. That's > the only additional information I have for now. Just FYI, Ville Vainio reported that the installation actually does finish doing what it needs, despite the unpleasant crash. So even though it _is_ a problem, at least the installation process does comlete. Oh well, this may be a distutils bug, I really don't know. And this kind of problem is probably beyond my ability to debug (especially with a semi-dead win32 laptop, which I can barely turn on and which I'll give away in 2 weeks...) Cheers, f From Fernando.Perez at colorado.edu Fri Jan 28 21:44:15 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Fri, 28 Jan 2005 19:44:15 -0700 Subject: [IPython-dev] IPython and Eclipse In-Reply-To: <20050128125020.84F69143137@ironman.esss.com.br> References: <20050128125020.84F69143137@ironman.esss.com.br> Message-ID: <41FAF87F.7040707@colorado.edu> Hi Fabio, this discussion is best had on the ipython-dev list, for various reasons: I don't have win32 experience, there are some Eclipse users there, and there's also a chance someone might pick it up and help via gmane. I'm cc-ing the list in my reply, so I encourage you to subscribe (or use it via gmane). It's very low traffic. Having said that... Fabio Zadrozny wrote: > Hy Fernando, > > I'm trying to integrate IPython in the PyDev plugin (python eclipse plugin), > but I'm having some problem understanding its behaviour (I must say I didn't > look at its code yet). This sounds great! I know many people like eclipse very much, so this would be an excellent addition to ipython's bag of tricks. [...] > Now, trying a simple statement gives me an error > > > --------------------- > In [1]: a = [] > > In [2]: ------------------------------------------------------------ > File "", line 1 > a = [] > ^ > SyntaxError: invalid syntax > --------------------- > > > > But if I go for the help it works: > --------------------- > %magic [...] > Well, this is my first attempt to do it, so, I thought you might have some > better ideas on why is this happening (I think it is because of the way the > eclipse console treats things, but I also didn't give a better look at it > because I think a better understanding on how ipython works would be > essential to it). > > Any ideas? I don't really know, but something looks fishy about your example. In particular, why is the exception printed on top of the next input line? Here's what a SyntaxError should look like: In [1]: a b ------------------------------------------------------------ File "", line 1 a b ^ SyntaxError: invalid syntax In [2]: That makes me wonder if Eclipse is mucking around with standard in/out, and perhaps putting funky characters at the end of the line? Or maybe ipython's sources are doinng that, I honestly don't know. I'm afraid this effort may take a bit of digging under the hood on your part, though. I'll be happy to help where I can, obviously. You might want to stuff the ipython core input handling functions with print statements, getting the repr() of the input printed to see control chars. Go into IPython/iplib.py, and look at the _prefilter() routine. That's the input handler, you might want to play there a bit. Most of the core ipython code is in iplib (be warned, it's quite messy). Let me know if you get really confused, and I'll give you a hand. Regards, f From viktor.ransmayr at t-online.de Sun Jan 30 09:41:59 2005 From: viktor.ransmayr at t-online.de (Viktor Ransmayr) Date: Sun, 30 Jan 2005 15:41:59 +0100 Subject: [IPython-dev] Re: [IPython-user] ANN: IPython 0.6.10 is out. In-Reply-To: <41F9538D.30403@colorado.edu> References: <41F9538D.30403@colorado.edu> Message-ID: <41FCF237.3020909@t-online.de> Hi Fernando You wrote: > 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 installer. > > Debian, Fink and BSD packages for this version should be coming soon, > as the > respective maintainers (many thanks to Jack Moffit, Andrea Riciputi > and Dryice > Liu) have the time to follow their packaging procedures. > > Many thanks to Enthought for their continued hosting support for > IPython, and > to all the users who contributed ideas, fixes and reports. > > > Release notes > ------------- > > As always, the NEWS file can be found at > http://ipython.scipy.org/NEWS, and the full ChangeLog at > http://ipython.scipy.org/ChangeLog. > > > * The major highlight of this release is vastly improved support for > Windows users. Thanks to a lot of help from Viktor Ransmayr > (installer work) and Gary Bishop (coloring problems), now Windows > users finally should have an ipython with all the functionality > available under Unix. > > There is now a true win32 executable installer: > > http://ipython.scipy.org/dist/ipython-0.6.10.win32.exe > > This can be double-clicked and it will do a real windows installation, > allowing later de-installation via the Control Panel. It will also > warn if it detects that ctypes and/or readline are missing (needed for > coloring/tab support). > > Full source syntax highlighting had always been broken under win32, > and the bug turned out to be in ipython's formatting code. Thanks to > Gary's debugging help, this problem is now fixed. You can test it by > typing in ipython: > > import code > code?? > > You should see properly highligted sources, as shown in this (new) > screenshot: > > http://ipython.scipy.org/screenshots/snapshot6.png > > Under Win32, ipython will now honor (if it exists) the $HOME > environment variable and it will put your .ipython/ directory there. > This should be more consistent for Win32 users who have a unix-like > setup. If $HOME is not defined, the previous behavior remains > (HOMEDRIVE\HOMEPATH). > > I also fixed a crash for pylab users under win32 with multithreaded > backends (GTK/WX). > > I would appreciate reports of any problems from Win32 users. > > * (X)Emacs users: I incorporated Alex Schmolck's recent fixes and > improvements to ipython.el. Since the python-mode project still > hasn't made a release with the changes which IPython needs, I've > temporarily copied today's CVS snapshot (v 4.70) of python-mode.el here: > > http://ipython.scipy.org/tmp/python-mode.el > > Once they make an official release, I'll remove this. > > * Small cleanups and improvements to numutils, including new amin/amax > and empty_like utility functions. The deprecated spike/spike_odd > functions have been removed. > > * Fix issue 24 from the bug tracker: spurious attribute access on > assignment (foo.x=1 would trigger a __getattr__ call on foo). > > * Fix reporting of compound names in verbose exception reporting > mode. This had been broken since the beginning of ipython (the > tokenization logic was a bit tricky). > > * Fix gtk deprecation warnings (A. Straw patch). > > * Fix crash when inspecting instances without an __init__ method > (reported by N. Nemenc). > > * Fix quote stripping bug in shell access (P. Ramachandran report). > > * Other minor fixes and cleanups, both to code and documentation. > > > Enjoy, and as usual please report any problems. I just now took the time to upgrade from 0.6.9-1 to 0.6.10. Installing via the Windows-Installer Executable worked. However, you can't use IPython nor pysh from the start-menu. If you click on them, the first screen of the Windows Installer executable is started again. Verifiying the created links revealed "C:\Dokumente und Einstellungen\VR\Eigene Dateien\Downloads\Python\IPython\ipython-0.6.10.win32.exe" C:\Python23\scripts\ipython respectively "C:\Dokumente und Einstellungen\VR\Eigene Dateien\Downloads\Python\IPython\ipython-0.6.10.win32.exe" C:\Python23\scripts\ipython -p pysh as the target :-( I gonna download the source of IPython-0.6.10 now and start investigating the setup.py and the ipython_post_win32_install.py script, which was used for the generation of the binary installer. Kind regards, Viktor From viktor.ransmayr at t-online.de Sun Jan 30 10:26:35 2005 From: viktor.ransmayr at t-online.de (Viktor Ransmayr) Date: Sun, 30 Jan 2005 16:26:35 +0100 Subject: [IPython-dev] Re: [IPython-user] ANN: IPython 0.6.10 is out. In-Reply-To: <41FCF237.3020909@t-online.de> References: <41F9538D.30403@colorado.edu> <41FCF237.3020909@t-online.de> Message-ID: <41FCFCAB.80303@t-online.de> Hi Fernando, I wrote: > I just now took the time to upgrade from 0.6.9-1 to 0.6.10. > > Installing via the Windows-Installer Executable worked. However, you > can't use IPython nor pysh from the start-menu. > > If you click on them, the first screen of the Windows Installer > executable > is started again. > > Verifiying the created links revealed > > "C:\Dokumente und Einstellungen\VR\Eigene > Dateien\Downloads\Python\IPython\ipython-0.6.10.win32.exe" > C:\Python23\scripts\ipython > > respectively > > "C:\Dokumente und Einstellungen\VR\Eigene > Dateien\Downloads\Python\IPython\ipython-0.6.10.win32.exe" > C:\Python23\scripts\ipython -p pysh > > as the target :-( > > I gonna download the source of IPython-0.6.10 now and start investigating > the setup.py and the ipython_post_win32_install.py script, which was used > for the generation of the binary installer. It is necessary to call "os.chdir()" in order to get working links. - I've modified the post-install script and it works ... Kind regards, Viktor -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vr_ipython_win_post_install.py URL: From viktor.ransmayr at t-online.de Sun Jan 30 13:30:51 2005 From: viktor.ransmayr at t-online.de (Viktor Ransmayr) Date: Sun, 30 Jan 2005 19:30:51 +0100 Subject: [IPython-dev] Re: [IPython-user] ANN: IPython 0.6.10 is out. In-Reply-To: <41FCFCAB.80303@t-online.de> References: <41F9538D.30403@colorado.edu> <41FCF237.3020909@t-online.de> <41FCFCAB.80303@t-online.de> Message-ID: <41FD27DB.8010406@t-online.de> Hi Fernando, I wrote: >> I gonna download the source of IPython-0.6.10 now and start >> investigating >> the setup.py and the ipython_post_win32_install.py script, which was >> used >> for the generation of the binary installer. > > > It is necessary to call "os.chdir()" in order to get working links. - > I've modified > the post-install script and it works ... Just to clarify and make sure there are no misunderstandings. - It works, since I created the binary installer within the same device, C:\ in my case, where also Python resided. I tried to do the same from a separate device (E:\ - a USB-Disk in my case). - I was able to create the binary installer, but received a MS-Traceback when I tried to install the created executable. I'll follow up on this one. (Distutil in Python 2.3.4 vs. 2.3.5c1 vs. 2.4 ...) Regards, Viktor From Fernando.Perez at colorado.edu Sun Jan 30 14:45:07 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Sun, 30 Jan 2005 12:45:07 -0700 Subject: [IPython-dev] Re: [IPython-user] ANN: IPython 0.6.10 is out. In-Reply-To: <41FCF237.3020909@t-online.de> References: <41F9538D.30403@colorado.edu> <41FCF237.3020909@t-online.de> Message-ID: <41FD3943.3050305@colorado.edu> Viktor Ransmayr wrote: > I just now took the time to upgrade from 0.6.9-1 to 0.6.10. > > Installing via the Windows-Installer Executable worked. However, you > can't use IPython nor pysh from the start-menu. > > If you click on them, the first screen of the Windows Installer executable > is started again. > > Verifiying the created links revealed > > "C:\Dokumente und Einstellungen\VR\Eigene > Dateien\Downloads\Python\IPython\ipython-0.6.10.win32.exe" > C:\Python23\scripts\ipython > > respectively > > "C:\Dokumente und Einstellungen\VR\Eigene > Dateien\Downloads\Python\IPython\ipython-0.6.10.win32.exe" > C:\Python23\scripts\ipython -p pysh > > as the target :-( Did you just download the 0.6.10 binary, or are you using one you downloaded after the announcement? I noticed this problem a few hours after the original release, and I quietly updated the files, hoping nobody had grabbed them yet (bad practice, I know). I just tested (again) with an up-to-date 0.6.10 (basically anything downloaded after Jan.28, 1:43 pm (GMT-6hrs). It worked fine, under python 2.3. Please grab again the 0.6.10 download and test it by installing ipython for 2.3, all my tests show that it works perfectly. Regards, f From Fernando.Perez at colorado.edu Sun Jan 30 14:52:06 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Sun, 30 Jan 2005 12:52:06 -0700 Subject: [IPython-dev] Re: [IPython-user] ANN: IPython 0.6.10 is out. In-Reply-To: <41FD27DB.8010406@t-online.de> References: <41F9538D.30403@colorado.edu> <41FCF237.3020909@t-online.de> <41FCFCAB.80303@t-online.de> <41FD27DB.8010406@t-online.de> Message-ID: <41FD3AE6.7040107@colorado.edu> Viktor Ransmayr wrote: > Hi Fernando, > > I wrote: > > >>>I gonna download the source of IPython-0.6.10 now and start >>>investigating >>>the setup.py and the ipython_post_win32_install.py script, which was >>>used >>>for the generation of the binary installer. >> >> >>It is necessary to call "os.chdir()" in order to get working links. - >>I've modified >>the post-install script and it works ... No, the os.chdir() call crashes the 2.3 post installer. So we _have_ to avoid it. My win32 laptop screen turned on today, so I did a bit more testing. The situation seems to be, with ipython 0.6.10 for win32 binary, assuming a machine with both python 2.3 and 2.4 installed: - installing for 2.3 works perfectly. No crashes, no problem. - installng for 2.4 crashes at the end (MS traceback). NO shortcuts are created, though ipython itself does install correctly. I tested this by using a shortcut from the 2.3 install and modifying the path, and it works perfectly. This binary crash occurs regardless of whether the installer is run from the C: drive or from a different one. I am pretty much sure that the bug is in python 2.4, since this occurs running the _same_ binary installer (made under linux with bdist_wininst). Argh. This is really frustrating. Cheers, f From Fernando.Perez at colorado.edu Sun Jan 30 14:53:45 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Sun, 30 Jan 2005 12:53:45 -0700 Subject: [IPython-dev] IPython 0.6.10 is out. In-Reply-To: <41FCFCAB.80303@t-online.de> References: <41F9538D.30403@colorado.edu> <41FCF237.3020909@t-online.de> <41FCFCAB.80303@t-online.de> Message-ID: <41FD3B49.9010709@colorado.edu> Viktor Ransmayr wrote: > It is necessary to call "os.chdir()" in order to get working links. - > I've modified > the post-install script and it works ... No, this is the call which crashes 2.3, and it's been acknowledged by T. Heller as a known distutils bug. DON'T add this. f From Fernando.Perez at colorado.edu Sun Jan 30 15:23:44 2005 From: Fernando.Perez at colorado.edu (Fernando Perez) Date: Sun, 30 Jan 2005 13:23:44 -0700 Subject: [IPython-dev] Win32/py2.4 installer crash woes In-Reply-To: <41FC9581.2708.4A8FE0@localhost> References: <41FC3A16.20846.3F18384@localhost> <41FC9581.2708.4A8FE0@localhost> Message-ID: <41FD4250.6020207@colorado.edu> Hi all, sjmachin at lexicon.net wrote: > How about a swift reversion to a distribution with a zip file and a > setup.py? I'll alpha-test it for you; I'm anxious to get that manual to > read up about the difference between !cd, cd, %cd and @#$^cd :-) Unfortunately because of this distutils bug which is crashing any python2.4-targetted installation, I've resorted to providing a manual installer again. Please see the note which I added here for more details: http://ipython.scipy.org/index.html#download_instructions This is less than ideal, but there's little else I can do until the bug is fixed in python 2.4. Viktor Ransmayr is helping track this down, but I'm sure that if anyone has further insights they will be welcome. Regards, f From viktor.ransmayr at t-online.de Sun Jan 30 15:56:09 2005 From: viktor.ransmayr at t-online.de (Viktor Ransmayr) Date: Sun, 30 Jan 2005 21:56:09 +0100 Subject: [IPython-dev] Re: [IPython-user] ANN: IPython 0.6.10 is out. In-Reply-To: <41FD3E3A.6020608@t-online.de> References: <41F9538D.30403@colorado.edu> <41FCF237.3020909@t-online.de> <41FD3943.3050305@colorado.edu> <41FD3E3A.6020608@t-online.de> Message-ID: <41FD49E9.5040709@t-online.de> Hi Fernando, > > You wrote: > >> Did you just download the 0.6.10 binary, or are you using one you >> downloaded after the announcement? I noticed this problem a few >> hours after the original release, and I quietly updated the files, >> hoping nobody had grabbed them yet (bad practice, I know). >> >> I just tested (again) with an up-to-date 0.6.10 (basically anything >> downloaded after Jan.28, 1:43 pm (GMT-6hrs). It worked fine, under >> python 2.3. >> >> Please grab again the 0.6.10 download and test it by installing >> ipython for 2.3, all my tests show that it works perfectly. > > I downloaded the file "ipython-0.6.10.win32.exe" on 01/27/2005 21:36 > (GMT +1), > so I've grabed the old one. > > I'll download the Python 2.3 specific version again now. I'll verified with your updated version. - It works fine. - I even created a windows binary installer from source and got the same result. I should have first verified that the sources had the initial problem, before following the link/ os.chdir() way. - It just looked so obvious :-( Sorry for creating noise and confusion. - I'll keep you posted on my findings with distustils in 2.3.4 vs. 2.3.5c1 vs. 2.4 ... Regards, Viktor From viktor.ransmayr at t-online.de Sun Jan 30 16:27:12 2005 From: viktor.ransmayr at t-online.de (Viktor Ransmayr) Date: Sun, 30 Jan 2005 22:27:12 +0100 Subject: [IPython-dev] IPython & Windows Installer in Python 2.3.x In-Reply-To: <41FD27DB.8010406@t-online.de> References: <41F9538D.30403@colorado.edu> <41FCF237.3020909@t-online.de> <41FCFCAB.80303@t-online.de> <41FD27DB.8010406@t-online.de> Message-ID: <41FD5130.8000902@t-online.de> Hi Fernando, I wrote: > Just to clarify and make sure there are no misunderstandings. - It > works, since > I created the binary installer within the same device, C:\ in my case, > where also > Python resided. > > I tried to do the same from a separate device (E:\ - a USB-Disk in my > case). > - I was able to create the binary installer, but received a > MS-Traceback when > I tried to install the created executable. > > I'll follow up on this one. (Distutil in Python 2.3.4 vs. 2.3.5c1 vs. > 2.4 ... As a last thing for the day I'd like to report that above problem is fixed with the distutils version distributed with Python-2.3.5c1. Regards, Viktor