I had used PyScripter last year in the development of a Pylons web app and generally seemed to be up to the task; however, for my current work I’m running into to some issues I had not noticed previously:
- Internal interpreter (bad) state – I can find no way to clear the state of the IDE’s internal Python interpreter (the clear command just appear to clear the interpreter window only) so if it gets variables into a bad state you have to clear them with code or more simply just close and restart the IDE. UPDATE: Per PyScripter’s comment below I gave using a remote engine a shot to work around this (this requires installing Remote Python Call). It does work fine for running my single file, but my full application is unable to import __main__ in this environment and fails to load as a result (neither WingIDE and Komodo IDE nor have this issue and the later is definitely doing remote debugging according to my firewall; PyScripter doesn’t have this issue when using its internal engine either).
- External run output window – one way around #1 is to use the “External Run” command rather then “Run” command, however this window does not allow cutting of anything other then the entire output and it lists file paths in the obfuscated short name form rather then the long name form. Due to the in ability to copy specified output I find myself ATL+TABing to a command prompt to do runs.
- Find & Replace – if you select the block of text you want to limit a find and replace to and initiate F&R when you start typing in the find box the selection is moved to the first occurance of the text to find, so its necessary to put the word in first (it’s a toolbar not a dialog) and then select the text block and then got back up and high the replace button. UPDATE: see Find & Replace section below for details.
- Non-standard key bindings – while this is a Win32 only app it does not use standard Win32 key bindings. For example undo is CTRL+SHFT+Z not CTRL+Y. Goto line is ALT+G not CTRL+G. Save all isn’t bound to anything and CTRL+SHFT+S was bound to some command I wasn’t clear on the function of. These are hardly deal killers as key bindings can be manually rebound and exported (and then imported into a different install), but its an annoyance none the less.
- Hangs Resulting in Data Loss – when ALT+TABing between a command prompt (due to combination of annoyance #s 1 and 2) PyScripter sometimes hangs. This possibly only happens when Media Player is running (or just running in the foreground) and “Show code hints” is enabled as it is by default (see #6). This also compounded #4 as the key bindings apparently don’t get persisted until the IDE is closed so at one point I got a nasty surprise when I hit CTRL+Y as it deleted lines rather then redoing and then of course that part of the redo buffer was gone. UPDATE: I also found that when hitting the escape key to clear a window it occasionally issues an error message and then hangs after the error dialog is cleared. I think there was typically a code completion window (this occasionally shows up empty and partially off the screen to the left side, so I’m not positive) up that I was trying to get out of the way when this occurred so I ended up turning this off after I lost work for the second time. Perhaps the code completion window uses code similar to the reference defition custom tooltip mentioned in #6.
- Reference definition custom tooltip – when ATL+TABing between PyScripter and any other app PyScripter will sometime jump back to foreground. This seems to be caused by the reference definition custom tooltip being displayed and sometimes this tooltip window will stay on top over the app that was ATL+TABed to (I’ve got one sitting over FireFox right now as I type this). Also this custom tooltip has no time out and it blocks the view of the two lines of code after the reference, so I find my self frequently moving the mouse pointer to get rid of it so I can actually read my code. I did locate a toggle in the options for “Show code hints” that disabled this custom tooltip. This in turn required binding a key (F12 as in VC6) to “Find Definition” as while that tooltip has a link to the definition on it and there is no Find Definition option on the right click menu. UPDATE per comment by PyScripter, CTRL+LEFT CLICK executes Find Definition.
Of the 6, #3 is looking like the one that will make Wingware’s Python IDE (aka Wing IDE) worth the purchase. I tend to duplicate and tweak code frequently as I’m coding. While I don’t generally retain the duplicated code (with the notable exception being unit tests for which I don’t always bother to pull it out in to functions) it’s a great way to discover the exact patterns in code rather then trying to anticipate the pattern and get it wrong enough to have to refactor more then once. Sure if you can anticipate the pattern exactly correctly no refactoring is required but at other times it takes multiple passes and it would have been quicker to duplicate code, find the exact pattern, and then refactor once.
Find & Replace
Anyway, I find any annoyances in Find & Replace to hamper my productivity enough to make it worth spending some cash to get rid of them. I think it was during the development of Whidbey (VS8.0; Visual Studio 2005; although it could have been the previous version) that the editor team decided to party on the Find & Replace dialog in VS and in the process numerous regressions were introduced impairing it’s efficient use. At that time people working on VS generally did not use VS to write code (lots used Source Insight) for a number of very valid reasons, so these issues were not getting raised. I don’t recall what I was doing that I noticed the issues since I was using Source Insight as a code editor myself, but I ran into them, opened bugs, and then had to push back after a number of them were closed as being by (bad) design. There really aren’t that many good models for how Find & Replace should work, so I don’t really understand why folks see the need to try to reinvent the wheel here rather just fully implementing a well established F&R model.
UPDATE: I’ve discovered that toogling off “Incremental Search” find option stops the behavior were the block selection is lost when typing in the text to be found and replaced, but I can find no way to have “Search in Selection” automatically toggled on if I hit control H with a block of text selected as it will be with every other code editor I’ve used.
Commercial Python IDEs
It’s to bad that ActiveState decided to discontinue their Visual Python plug-in for VS. That would have been a no-brainer for which IDE to use for Python development. ActiveState’s Komodo IDE is not a no brainer as it costs $295 for a license vs $179 for single platform license for Wing IDE. A two platform Wing license is $295 and a three platform is $395, so Komodo IDE is the same or cheaper if one needs to develop on more then one platform, and if one needs to develop Perl, PHP, Tcl, or Ruby as well as Python Komodo supports all of those were as Wing IDE is just Python. At present all I’m interested in Python on Win32, and Wing IDE’s Python support is better then Komodo’s from what I could gather from using both evaluation versions. I didn’t use Komodo very long though. I just tried a few things to see how it compared to the broad field of Python IDEs and editors I started out comparing. Guess I better take a second look at Komodo before shelling out for an IDE though.