Wingide is a beautiful application

C

Claudio Grondi

BartlebyScrivener said:
Go to Options. Near the bottom, it will say "Edit Init.File" Click on
it.
Done. A completely new file was created.
Make an entry on a separate line near the top as follows

(require 'python-mode)

Then save the init file.
Have copy/pasted to it including braces

(require 'python-mode)

No effect on reopening emacs, except:
"
(1) (initialization/error) An error has occurred while loading
c:\Dokumente und Einstellungen\Admin\.xemacs\init.el:

Cannot open load file: python-mode

To ensure normal operation, you should investigate the cause of the
error in your initialization file and remove it. Use the `-debug-init'
option to XEmacs to view a complete error backtrace.
"

============================================

To summarize my evaluation of XEmacs here:
- nothing valuable for Python script development out of the box or
easy achievable in its Windows version.

XEmacs is out from beeing considered an option for someone looking for
an editor helping him doing his Python scripting.

============================================

My final conclusions (I am tired now of evaluating):

The only worth to consider freeware option to Wingide on Windows seems
to be SPE (or other Scintilla based free editors with the disadvantage
of not having specific support for Python scripting).

The best not free overall text editing tool on Windows is UltraEdit, but
for someone interested in an editor for the limited purpose of editing
Python scripts Wingide in its Personal Version is probably actual a much
better choice (and multiplatform).

As closing words I would like to encourage anyone to start using
SPE ( http://pythonide.stani.be )
and contribute to its development making it beside IDLE a further
standard editor for Python scripting having the potential to become one
day a serious competitor to Wing. Why? Just because I decided to start
using it and am eager to see it improving.

Claudio
 
T

Tony Nelson

I get the feeling that a ot of people working with heavy IDEs don't
realize how capable vim/emacs are, so I'll give a brief rundown of what
my Vim environment does for me. (I do Python web development)--if you
don't like the Vi keybindings, the Cream package is Vim that behaves
like a regular modeless editor but with all of vim's power (and a nice
embedded Python interpreter for writing extensions):

1. Python syntax checking: as I'm typing along, if I input a syntax
error then the line is immediately highlighted in red. Useful for
catching brainos like:
if a=1:
(which will highlight in red when I hit enter, point out that I need ==
instead of =).

What do you use to do this? Cream doesn't seem to do this oob.

2. Normal tag-jump stuff: Ctrl-click on a function/method call (or
class or whatever) will jump to the function/method/class definition
(Ctrl-T works as well if you don't like clicking). It keeps a stack of
visited files so you can drill down through your call stack and then
pop back up to where you came from.

Do you set up ctags for this? I get error messages "E433: No tags file"
and "E426: tag not found: xxx" when I Ctrl-click on a method call.

3. Python class browsing stuff: A Class menu shows the parent and child
classes of the one you're currently in, and all the methods of the
current class; selecting any of the above jumps to the appropriate file
and line.

Is this the Tag List?

4. Interactive documentation stuff: When I type an open-paren, it looks
to see what the prior keyword is and displays help for it in the status
line (preferring Python documentation, then docstrings, then comments
before the function/method/class definition). Even if there's no
help/comments, it'll show the arguments that the function takes. So
if, say, I type:

cmp(

then the status line displays:

cmp(x, y) Compare the two objects X and Y and return an integer
according to ...

If I hit F1 it'll show the full help text. Often the arguments are
enough, and I find the status-line display a lot less intrusive than
many on-the-fly help systems I've seen.

This stuff doesn't happen either. How is it set up?

5. A client menu selects which client I want to work in (so, say, I get
a bug report for Client A, I select them from the menu). The Class
menu and other functions respect this (if I'm in the generic Company
class, the Class menu will list Client A's Company subclass before the
subclasses of other companies; if I jump to the Company definition,
it'll go to Company A's client-specific version). It also restarts
development httpd servers on the current machine running with conf
files appropriate to that client.
...

Where is this "client menu"? How is it set up?
________________________________________________________________________
TonyN.:' *firstname*nlsnews@georgea*lastname*.com
' <http://www.georgeanelson.com/>
 
S

sjdevnull

Tony said:
What do you use to do this? Cream doesn't seem to do this oob.

Nope. I'll try to package up my vimrc and get it uploaded somewhere
next week (busy with holiday stuff). The meat of it is:

import vim
def cur_x():
return vim.current.window.cursor[1]
def cur_y():
return vim.current.window.cursor[0]
def find_current_block():
block = [vim.current.line]
current = cur_y()-1
while len(block[0])==0 or block[0][0] in " \t#":
current = current - 1
if current < 0:
break
block = [vim.current.buffer[current] ]+ block
return block
def check_current_block():
import code
vim.command("syn clear Error")
block = find_current_block()
length = len(block)
try:
code.compile_command("\n".join(block))
print ""
return 0
except:
(type, value, tb) = sys.exc_info()
line_no = cur_y()-1+value.lineno-length
badline = vim.current.buffer[line_no]
badline = badline.replace('"', '\\"')
print "Error at line %d: " %(line_no+1), badline
return 1
Do you set up ctags for this? I get error messages "E433: No tags file"
and "E426: tag not found: xxx" when I Ctrl-click on a method call.

Umm, either click the "build tags in current directory" button on the
toolbar, or "find . -name '*.py' | ctags -L -" in the top directory of
your python file.
Is this the Tag List?

No, this is more complex, I'll post it w/ the rest of my stuff.
4. Interactive documentation stuff: When I type an open-paren, it looks
[SNIP]
This stuff doesn't happen either. How is it set up?

Likewise, I'll post.
...

Where is this "client menu"? How is it set up?

It's a listing of all the clients we work with. It's a more
project-specific thing, but illustrates that you can easily integrate
vim into whatever your development system looks like (indeed, when I
get a python error in a page on my dev server then it opens the file
where the exception occurred in my vim and jumps to the line, setting
up the stack appropriately).

That stuff I can't post.
 
T

Tony Nelson

Nope. I'll try to package up my vimrc and get it uploaded somewhere
next week (busy with holiday stuff).

OK, thanks.
The meat of it is:

import vim
def cur_x():
return vim.current.window.cursor[1]
def cur_y():
return vim.current.window.cursor[0]
def find_current_block():
block = [vim.current.line]
current = cur_y()-1
while len(block[0])==0 or block[0][0] in " \t#":
current = current - 1
if current < 0:
break
block = [vim.current.buffer[current] ]+ block
return block
def check_current_block():
import code
vim.command("syn clear Error")
block = find_current_block()
length = len(block)
try:
code.compile_command("\n".join(block))
print ""
return 0
except:
(type, value, tb) = sys.exc_info()
line_no = cur_y()-1+value.lineno-length
badline = vim.current.buffer[line_no]
badline = badline.replace('"', '\\"')
print "Error at line %d: " %(line_no+1), badline
return 1

OK, I can tell that this is Python code, not VI script stuff. I'll need
to see how your vimrc sets this up. It looks like learning to use VI
(even with Cream) would take a few weeks of hard work.

Umm, either click the "build tags in current directory" button on the
toolbar, or "find . -name '*.py' | ctags -L -" in the top directory of
your python file.
OK.



No, this is more complex, I'll post it w/ the rest of my stuff.
...

Thanks.
________________________________________________________________________
TonyN.:' *firstname*nlsnews@georgea*lastname*.com
' <http://www.georgeanelson.com/>
 
S

sjdevnull

Tony said:
OK, I can tell that this is Python code, not VI script stuff. I'll need
to see how your vimrc sets this up.

vim has a Python interpreter embedded in it (assuming it's a reasonably
complete build--it's possible to leave the interpreter, or even parts
of the vim scripting stuff, out). I just put .py files in my .vim
directory, import them, and then use ":py myfile.doStuff()" or map keys
to such commands.

The "vim" Python module (included in vim, just "import vim" from your
Python scripts) lets you run vim commands, access
windows/buffers/variables/etc.

Extending vim in Python is far nicer than using vim script, I basically
do all the work in Python and then just :map those functions to
whatever keys I want to use.
 
T

Tony Nelson

vim has a Python interpreter embedded in it (assuming it's a reasonably
complete build--it's possible to leave the interpreter, or even parts
of the vim scripting stuff, out).

OK, mine has Python in it.

I just put .py files in my .vim
directory, import them, and then use ":py myfile.doStuff()" or map keys
to such commands.

So, you bind check_current_block() to the Enter key?

The "vim" Python module (included in vim, just "import vim" from your
Python scripts) lets you run vim commands, access
windows/buffers/variables/etc.
...

OK. I see Python in the help.
________________________________________________________________________
TonyN.:' *firstname*nlsnews@georgea*lastname*.com
' <http://www.georgeanelson.com/>
 
S

sjdevnull

Tony said:
So, you bind check_current_block() to the Enter key?

Yeah. The binding's not quite just "<C-O>check_current_block()<CR>"
because you need a bit of magic to keep autoindent working. I'll post
it with my conf files next week, essentially use <C-R>= with an empty
vim function wrapper around the python function (instead of <C-O>) and
input a character before leaving insert mode that's deleted when you
return (to preserve indent).

My goal is to make my conf files into a decent drop-in so you just put
them in your .vim directory and go, and post them next week.
 
T

Tony Nelson

Yeah. The binding's not quite just "<C-O>check_current_block()<CR>"
because you need a bit of magic to keep autoindent working. I'll post
it with my conf files next week, essentially use <C-R>= with an empty
vim function wrapper around the python function (instead of <C-O>) and
input a character before leaving insert mode that's deleted when you
return (to preserve indent).

My goal is to make my conf files into a decent drop-in so you just put
them in your .vim directory and go, and post them next week.

OK, thank you.
________________________________________________________________________
TonyN.:' *firstname*nlsnews@georgea*lastname*.com
' <http://www.georgeanelson.com/>
 
J

jussij

I don't like, that one of the latest UltraEdit releases
was buggy causing 100%CPU load and 2MByte of harddisk
data traffic beeing idle, so I am looking for an alternative
for years, but instead of finding it I was forced lately
to spend money again on renewing my license.

Have you tried the Zeus for Windows programmers editor:

http://www.zeusedit.com

Zeus is closed source, but it is also very stable, comes
with support for Python and you can even write Zeus
scripts using Python.

Like all software it also has bugs, but when a bug is
reported it is fixed ASAP and a free patch is then
offered for download.

Jussi Jumppanen
Author: Zeus for Windows
 
C

Claudio Grondi

Have you tried the Zeus for Windows programmers editor:

http://www.zeusedit.com

Zeus is closed source, but it is also very stable, comes
with support for Python and you can even write Zeus
scripts using Python.

Like all software it also has bugs, but when a bug is
reported it is fixed ASAP and a free patch is then
offered for download.

Jussi Jumppanen
Author: Zeus for Windows

I was not aware of Zeus, so thank you for telling me about it.

I gave Zeus a try and it passed loading of a large (100 MByte) text file
(many other text editors fail here). It looks at the first glance quite
good, but I am a bit lost because of so many different menu items.

Compared to UltraEdit/SPE I am missing the column mode I extensively use
in my everyday work (rectangular select/copy/paste is there) and the
autocompletion of any input word as e.g. a very long variable names I
have defined in preceeding text.

I was not yet able to find how to change the font in the text area and
how to get rid of the italics used for displaying strings. In UltraEdit
I can choose any font in any style available on the system for the
text area and in the syntax highlighting I can use bold/italics style.
Configuration of colors and keyboard keys seem to be there, macro
recording/playing, too. The line numbering has a small delay behind the
displayed text what is a bit annoying (but only when going to the end of
the 100 MByte file), but sure not a problem. Code folding for Python is
there, but I run into the problem of not folding the code of a Python
class.

I have not put much time into the evaluation yet, but my impression is,
that it is a professional editor, focused on supporting programming and
compilation of C programs, but probably with not sufficient support for
Python specifics, except the Python syntax in writing macros, where
access to the edit window is got with 'import zeus' and the macro itself
is just Python code using the imported module and working on the opened
text.

In my eyes with $40 for a license a worth to be evaluated professional
editor, but not for me because of lack(?) of the column mode and not
(yet?) found possibility to select a font for the in the editing area
displayed text.

Claudio
 
J

jussij

I gave Zeus a try and it passed loading of a large (100 MByte)
text file (many other text editors fail here).

Zeus is not designed as a large file editor :(

It will try to load the entire file into memory so when you open
these very large files the RAM is quickly used up.
It looks at the first glance quite good, but I am a bit lost
because of so many different menu items.

Zeus is fairly complex just because it has so many features (ie class
browsing, intellisening, compiler support, ftp editing, templates,
macros, workspaces etc etc).

For this reason I would recommend:
1) Select the Help, Help Contents Menu
2) Click on the User Manual section
3) Click on the Quick Start section
3) Read a few of the Quick Start links
Compared to UltraEdit/SPE I am missing the column mode I
extensively use in my everyday work (rectangular select/copy/paste
is there)

Zeus has several text marking modes one of which is column marking:

http://www.zeusedit.com/forum/viewtopic.php?t=60
http://www.zeusedit.com/forum/viewtopic.php?t=197
and the autocompletion of any input word as e.g. a very long
variable names I have defined in preceeding text.

This feature should be available via the Edit, Auto Complete Word
menu. If it is not working correctly this could be a bug :(
I was not yet able to find how to change the font in the text area

Options, Editor Options menu, Fonts section and change the
baseline font for the Document View.
and how to get rid of the italics used for displaying strings.

The syntax highlighting is defined in what Zeus calls a document
type. These are listed using the Options Document Types menu.

So for example to change this for the Python files, edit the
Python Document Type and in the Coloring section, select the
line and block comment categories and un-check the italic
option for this category.
In UltraEdit I can choose any font in any style available
on the system for the text area and in the syntax highlighting
I can use bold/italics style.

The two menus mentioned above do exactly this.
Code folding for Python is there, but I run into the problem
of not folding the code of a Python class.

If you post a small example of code to the code folding
section of the Zeus forum:

http://www.zeusedit.com/forum/viewforum.php?f=8

This will be get fix if it is at all possible to do so.
but probably with not sufficient support for Python specifics,

Just out of curiosity, what "Python specifics" features would
think are missing?
In my eyes with $40 for a license a worth to be evaluated
professional editor, but not for me because of lack(?) of
the column mode and not (yet?) found possibility to select
a font for the in the editing area displayed text.

As mentioned above, Zeus does have these features ;)

Jussi Jumppanen
Author: Zeus for Windows
 
S

sjdevnull

Tony said:
OK, thank you.

FYI, I am still working on this but some changes in vim 7 are requiring
more work than I expected. On the bright side, there are some nice
features that will allow for cool stuff like debugger info (after
running in a debugger, you'll be able to mouse over variables and get
tooltip popups with their values, etc) when it's done. I'm talking
with Bram Moolenaar (vim author) on the vim-dev mailing list to try to
get things squared away.
 
T

Tony Nelson

FYI, I am still working on this but some changes in vim 7 are requiring
more work than I expected.

I suspected that it might be taking longer than you thought. No hurry
from my end.

On the bright side, there are some nice
features that will allow for cool stuff like debugger info (after
running in a debugger, you'll be able to mouse over variables and get
tooltip popups with their values, etc) when it's done. I'm talking
with Bram Moolenaar (vim author) on the vim-dev mailing list to try to
get things squared away.

Thank you for your efforts.
________________________________________________________________________
TonyN.:' *firstname*nlsnews@georgea*lastname*.com
' <http://www.georgeanelson.com/>
 
S

SPE - Stani's Python Editor

Sybren Stuvel schreef:
Sybren Stuvel enlightened us with:
If you mean terminal windows, that has gone with the latest release
0.8.1.d, see http://pythonide.stani.be/blog
I downloaded it, tried to run it, then it stopped with a message that
it needs a newer wxPython version than the one that comes with Ubuntu
Linux. Since this release of Ubuntu is two months old and rather up to
date with all things Python, IMO the SPE builders are pushing it a
little too much by requiring even a newer version of wxPython.

This is a misinterpretation, SPE failed because of something else. (As
would have become clear if you would have run SPE in the debugging mode
'python SPE.py --debug'.) The version number displayed is the one on
which SPE is being developed, not the one required (displayed on
webpage). AFAIK SPE runs fine with wxPython 2.5.4.1+ I run SPE myself
on the same release of Ubuntu as you (Breezy ?) and it now works very
well.
From the SPE news blog:

SPE was for the first time tested on and improved for Ubuntu (and
hopefully so for Linux in general). I adapted SPE such that it can ran
out of the box of an archive (zip or tar.gz). This has the advantage
that Linux (but also Mac and Windows) don't have to install SPE anymore
but can just run it out of a folder or USB stick, provided the right
version of wxPython (2.6) is installed on the system as it is always
the case with Ubuntu boxes. If you want to install SPE in this way, use
the -no_setup.zip distribution:

1. uninstall previous version of SPE (VERY IMPORTANT, otherwise SPE
won't run)
2. download and unpack the archive
SPE-0.8.1.d-wx2.6.1.0-no_setup.zip
3. run SPE with 'python SPE.py'

If it doesn't work, let me know privately.

Stani
 
S

Sybren Stuvel

SPE - Stani's Python Editor enlightened us with:
This is a misinterpretation, SPE failed because of something else.
(As would have become clear if you would have run SPE in the
debugging mode 'python SPE.py --debug'.)

IMO displayed messages should be clear without having to resort to a
debugging mode. Debugging mode should only be for removing bugs, not
for enlightenment of the user.

Anyway, apt-getting spe now... which doesn't work:

Unpacking python-wxversion (from .../python-wxversion_2.6.1.1.1ubuntu2_all.deb)
....
dpkg: error processing
/var/cache/apt/archives/python-wxversion_2.6.1.1.1ubuntu2 _all.deb
(--unpack):
trying to overwrite `/usr/lib/python2.4/site-packages/wxversion.py',
which is also in package wxpython2.5.3

If it's so hard to get the requirements installed, I'd rather stick to
Vim.
I adapted SPE such that it can ran out of the box of an archive (zip
or tar.gz). This has the advantage that Linux (but also Mac and
Windows) don't have to install SPE anymore but can just run it out
of a folder or USB stick, provided the right version of wxPython
(2.6) is installed on the system as it is always the case with
Ubuntu boxes.

Ehm... I think I've clearly shown that, at least as far as the Ubuntu
packages go, not all requirements are always there on an Ubuntu
system.
If it doesn't work, let me know privately.

Why? What's wrong with this newsgroup?

Sybren
 
S

SPE - Stani's Python Editor

Sybren said:
IMO displayed messages should be clear without having to resort to a
debugging mode.
I can agree on that.
Debugging mode should only be for removing bugs, not
for enlightenment of the user.
Unless he doesn't follow the installation instructions.
Anyway, apt-getting spe now... which doesn't work:

Unpacking python-wxversion (from .../python-wxversion_2.6.1.1.1ubuntu2_all.deb)
...
dpkg: error processing
/var/cache/apt/archives/python-wxversion_2.6.1.1.1ubuntu2 _all.deb
(--unpack):
trying to overwrite `/usr/lib/python2.4/site-packages/wxversion.py',
which is also in package wxpython2.5.3
If it's so hard to get the requirements installed, I'd rather stick to
Vim.
It is so hard to contact the person who packages SPE for Ubuntu. I
contacted him but I get no answer. I am new to Ubuntu (or Linux in
general), so I would not have a clue how that works (apart from time
needed for it).

If you would have read the blog (http://pythonide.stani.be/blog), you
could clearly read this:

"""
SPE was for the first time tested on and improved for Ubuntu (and
hopefully so for Linux in general). I adapted SPE such that it can ran
out of the box of an archive (zip or tar.gz) (...) If you want to
install SPE in this way, use the -no_setup.zip distribution:

1. uninstall previous version of SPE (VERY IMPORTANT, otherwise SPE
won't run)
2. download and unpack the archive
SPE-0.8.1.d-wx2.6.1.0-no_setup.zip
3. run SPE with 'python SPE.py'
"""

If you follow these three steps nothing more, nothing less, you are up
and running with SPE in one minute. I don't know how can I make it more
easy. Luckily other Ubuntu users had no problems and are running the
latest SPE already on Ubuntu.
Ehm... I think I've clearly shown that, at least as far as the Ubuntu
packages go, not all requirement"s are always there on an Ubuntu
system.

Supposing you use Ubuntu 5.10 "The Breezy Badger", all the requirements
are there: wxPython 2.6 That is all SPE needs. (If you still use Hoary,
read here http://wiki.wxpython.org/index.cgi/wxPython_20with_20Ubuntu)
So you have only clearly shown that you didn't read the instructions. I
wish SPE can be retrieved by apt-get but that's beyond my control.
Why? What's wrong with this newsgroup?
Nothing, just thought it might be off topic, SPE has forums or
newsgroups for that.

So follow this recipee:

- apt-get wxPython 2.6 (in case you don't have)

- uninstall your previous SPE attempts (no '_spe' or 'sm' folder may be
present in site-packages)
- get
http://download.berlios.de/python/SPE-0.8.1.d-wx2.6.1.0-no_setup.zip
and unpack it
- run SPE (python SPE.py)

Still not working?

Stani
 
S

Sybren Stuvel

SPE - Stani's Python Editor enlightened us with:
If you would have read the blog (http://pythonide.stani.be/blog),
you could clearly read this:

I haven't.
2. download and unpack the archive
SPE-0.8.1.d-wx2.6.1.0-no_setup.zip

If you follow these three steps nothing more, nothing less, you are
up and running with SPE in one minute. I don't know how can I make
it more easy.

You could start by adding the zip file to the download page. Even the
blog entry you mention doesn't contain the URL to that file.
Supposing you use Ubuntu 5.10 "The Breezy Badger", all the
requirements are there: wxPython 2.6 That is all SPE needs.

Well, in that case the SPE package that's contained in the Universe
respository is broken. Besides, it was wxPython 2.5.3 that was
insalled on my Breezy box, after I upgraded from Hoary, and not 2.6.
So you have only clearly shown that you didn't read the
instructions. I wish SPE can be retrieved by apt-get but that's
beyond my control.

No it isn't. All you need to do is publish proper packages, and set up
a Debian repository. Then all people need is to add one line to their
sources.list, and they can use apt-get.
- apt-get wxPython 2.6 (in case you don't have)

That would be "apt-get install python-wxgtk2.6". wxpython2.6 is
mentioned, but python-wxgtk2.6 is actually installable. At least, it
would be if it didn't conflict with the version of wxPython I have
currently installed. I had to uninstall 2.5.3 first, because a simple
upgrade didn't work.

Finally, an URL.
Still not working?

It runs now, but some things aren't working. When I open a file and
click on the "browse" tab, I see the current directory. If I then
double-click on a Python file, I'd expect SPE to open it, but nothing
happens. Hmmm... and now SPE has crashed. No errors on the terminal,
but the GUI simply doesn't repaint anymore.

Sorry mate, it looks like a promising project, but it just doesn't do
it for me. Way too much hassle for something that crashes on the first
try.

Sybren
 
S

SPE - Stani's Python Editor

Sybren said:
It runs now, but some things aren't working.
Besides the crashing down, what else? I am very curious.
When I open a file and
click on the "browse" tab, I see the current directory. If I then
double-click on a Python file, I'd expect SPE to open it, but nothing
happens. Hmmm... and now SPE has crashed. No errors on the terminal,
but the GUI simply doesn't repaint anymore.

Sorry mate, it looks like a promising project, but it just doesn't do
it for me. Way too much hassle for something that crashes on the first
try.
What does crash on the second try? Any bug that makes SPE crash won't
survive long if reported. So, thanks for the bug report! I fixed it and
the fix is in subversion. If there is anything else you want to have
fixed for next release, just drop a line.

But well.., sorry for all the too much hassle,
Stani
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top