Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #110069 > unrolled thread

best text editor for programming Python on a Mac

Started byChris <cspears2002@yahoo.com>
First post2016-06-17 16:52 -0700
Last post2016-07-06 03:27 -0700
Articles 20 on this page of 88 — 29 participants

Back to article view | Back to comp.lang.python


Contents

  best text editor for programming Python on a Mac Chris <cspears2002@yahoo.com> - 2016-06-17 16:52 -0700
    Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-17 17:19 -0700
      Re: best text editor for programming Python on a Mac Ned Batchelder <ned@nedbatchelder.com> - 2016-06-17 17:36 -0700
        Re: best text editor for programming Python on a Mac wxjmfauth@gmail.com - 2016-06-20 01:39 -0700
    Re: best text editor for programming Python on a Mac MRAB <python@mrabarnett.plus.com> - 2016-06-18 01:58 +0100
      Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-17 18:50 -0700
        Re: best text editor for programming Python on a Mac Steven D'Aprano <steve@pearwood.info> - 2016-06-18 12:05 +1000
    Re: best text editor for programming Python on a Mac Steven D'Aprano <steve@pearwood.info> - 2016-06-18 11:55 +1000
    Re: best text editor for programming Python on a Mac Zachary Ware <zachary.ware+pylist@gmail.com> - 2016-06-17 20:59 -0500
    Re: best text editor for programming Python on a Mac support@ecourierz.com - 2016-06-17 22:18 -0700
      Re: best text editor for programming Python on a Mac Michael Vilain <mev94303y@yahoo.com> - 2016-06-18 00:04 -0700
        Re: best text editor for programming Python on a Mac Terry Reedy <tjreedy@udel.edu> - 2016-06-18 05:09 -0400
        Re: best text editor for programming Python on a Mac Marko Rauhamaa <marko@pacujo.net> - 2016-06-18 12:40 +0300
          Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-18 03:08 -0700
            Re: best text editor for programming Python on a Mac Michael Vilain <mev94303y@yahoo.com> - 2016-06-18 07:12 -0700
          Re: best text editor for programming Python on a Mac alister <alister.ware@ntlworld.com> - 2016-06-18 13:22 +0000
          Re: best text editor for programming Python on a Mac Michael Vilain <mev94303y@yahoo.com> - 2016-06-18 07:08 -0700
            Re: best text editor for programming Python on a Mac Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-06-18 16:08 -0400
          Re: best text editor for programming Python on a Mac Rustom Mody <rustompmody@gmail.com> - 2016-06-18 09:02 -0700
        Re: best text editor for programming Python on a Mac Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-20 10:38 +1200
    best text editor for programming Python on a Mac MrJean1 <MrJean1@gmail.com> - 2016-06-18 08:52 -0700
    Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 17:07 -0600
      Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-18 17:12 -0700
        Re: best text editor for programming Python on a Mac Joel Goldstick <joel.goldstick@gmail.com> - 2016-06-18 20:26 -0400
          Re: best text editor for programming Python on a Mac Pete Forman <petef4+usenet@gmail.com> - 2016-06-19 11:41 +0100
            Re: best text editor for programming Python on a Mac Marko Rauhamaa <marko@pacujo.net> - 2016-06-19 15:57 +0300
            Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-19 07:19 -0600
              Re: best text editor for programming Python on a Mac Rustom Mody <rustompmody@gmail.com> - 2016-06-19 09:20 -0700
                Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-19 20:06 +0200
                  Re: best text editor for programming Python on a Mac Rustom Mody <rustompmody@gmail.com> - 2016-06-19 11:13 -0700
                  Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-19 13:04 -0600
                Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-19 12:58 -0600
                  Re: best text editor for programming Python on a Mac Steven D'Aprano <steve@pearwood.info> - 2016-06-20 11:32 +1000
                    ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-19 19:07 -0700
                      Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Steven D'Aprano <steve@pearwood.info> - 2016-06-20 13:29 +1000
                        Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Phil Boutros <philb@philb.ca> - 2016-06-20 04:30 +0000
                          Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-19 22:03 -0700
                            Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Random832 <random832@fastmail.com> - 2016-06-20 02:04 -0400
                              Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-20 07:00 -0700
                          Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-20 00:57 -0700
                            Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-06-20 20:24 +1000
                          Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Grant Edwards <grant.b.edwards@gmail.com> - 2016-06-20 14:23 +0000
                            Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Steven D'Aprano <steve@pearwood.info> - 2016-06-21 01:00 +1000
                              Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-20 08:12 -0700
                        Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-19 21:36 -0700
                          Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-19 21:41 -0700
                        Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Larry Hudson <orgnut@yahoo.com> - 2016-06-21 00:40 -0700
                          Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Marko Rauhamaa <marko@pacujo.net> - 2016-06-21 11:35 +0300
                            Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-21 03:46 -0700
                              Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Marko Rauhamaa <marko@pacujo.net> - 2016-06-21 16:08 +0300
                                Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-21 06:56 -0700
                                  Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-21 07:11 -0700
                                  Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-22 19:01 -0700
                                    Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-22 19:07 -0700
                                Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Rustom Mody <rustompmody@gmail.com> - 2016-06-21 07:29 -0700
                                  Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Marko Rauhamaa <marko@pacujo.net> - 2016-06-21 21:56 +0300
                                    Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Tim Chase <python.list@tim.thechases.com> - 2016-06-21 14:42 -0500
                                      Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Marko Rauhamaa <marko@pacujo.net> - 2016-06-21 23:08 +0300
                                      Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-22 00:55 -0700
                                        Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Tim Chase <python.list@tim.thechases.com> - 2016-06-22 06:09 -0500
                            Re: ASCII or Unicode? (was best text editor for programming Python on a Mac) Tim Chase <python.list@tim.thechases.com> - 2016-06-21 10:08 -0500
                    Re: best text editor for programming Python on a Mac Tim Chase <python.list@tim.thechases.com> - 2016-06-19 21:41 -0500
          Re: best text editor for programming Python on a Mac Quivis <quivis@domain.invalid> - 2016-06-19 21:21 +0000
            Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-19 16:15 -0600
              Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-20 09:37 +0200
        Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 18:50 -0600
        Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 19:01 -0600
        Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 20:09 -0600
          Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-18 19:51 -0700
            Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 22:54 -0600
              Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-18 22:57 -0700
            Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-18 22:56 -0600
            Re: best text editor for programming Python on a Mac Tim Chase <python.list@tim.thechases.com> - 2016-06-19 06:36 -0500
        Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-19 09:13 +0200
          Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-19 00:34 -0700
            Re: best text editor for programming Python on a Mac Rustom Mody <rustompmody@gmail.com> - 2016-06-19 00:47 -0700
            Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-19 09:57 +0200
            Re: best text editor for programming Python on a Mac Michael Torrie <torriem@gmail.com> - 2016-06-19 07:23 -0600
              Re: best text editor for programming Python on a Mac alister <alister.ware@ntlworld.com> - 2016-06-20 08:30 +0000
        Re: best text editor for programming Python on a Mac Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-06-20 10:44 +1200
          Re: best text editor for programming Python on a Mac Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-20 00:59 -0700
          Re: best text editor for programming Python on a Mac Random832 <random832@fastmail.com> - 2016-06-20 09:26 -0400
            Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-20 15:36 +0200
              Re: best text editor for programming Python on a Mac Rustom Mody <rustompmody@gmail.com> - 2016-06-20 06:48 -0700
                Re: best text editor for programming Python on a Mac Christian Gollwitzer <auriocus@gmx.de> - 2016-06-20 16:03 +0200
    best text editor for programming Python on a Mac drednot57 <dpresley@midiowa.net> - 2016-06-18 19:48 -0700
    Re: best text editor for programming Python on a Mac jennifer.greeen@gmail.com - 2016-07-06 03:25 -0700
    Re: best text editor for programming Python on a Mac jennifer.greeen@gmail.com - 2016-07-06 03:27 -0700

Page 1 of 5  [1] 2 3 4 5  Next page →


#110069 — best text editor for programming Python on a Mac

FromChris <cspears2002@yahoo.com>
Date2016-06-17 16:52 -0700
Subjectbest text editor for programming Python on a Mac
Message-ID<c7ea39d0-027e-49d0-b049-3ef17929697d@googlegroups.com>
I have been trying to write a simple Hello World script on my Mac at work with TextEdit.  However, I keep getting this error message:

SyntaxError: Non-ASCII character '\xe2' in hello_world.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

I am using TextEdit in plain text mode.  The document was saved in UTF-8, and I still get the error message.  I tried switching to Western ASCII encoding, but once I start typing, I get a message stating that the document can no longer be saved using its original Western (ASCII) encoding.

Any suggestions for a good open source text editor for the Mac out there?  For now, I am going to stick with vim.

[toc] | [next] | [standalone]


#110071

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-17 17:19 -0700
Message-ID<b6dc0d4a-8cba-4366-8ea0-682a45b50979@googlegroups.com>
In reply to#110069
On Saturday, June 18, 2016 at 11:52:35 AM UTC+12, Chris wrote:

> SyntaxError: Non-ASCII character '\xe2' in hello_world.py on line 1, but no
> encoding declared; see http://python.org/dev/peps/pep-0263/ for details

The problem is the version of Python that comes with your Mac is obsolete.

[toc] | [prev] | [next] | [standalone]


#110072

FromNed Batchelder <ned@nedbatchelder.com>
Date2016-06-17 17:36 -0700
Message-ID<b8a01bbe-0c87-48e8-a9c7-86cb020576fd@googlegroups.com>
In reply to#110071
On Friday, June 17, 2016 at 8:19:46 PM UTC-4, Lawrence D’Oliveiro wrote:
> On Saturday, June 18, 2016 at 11:52:35 AM UTC+12, Chris wrote:
> 
> > SyntaxError: Non-ASCII character '\xe2' in hello_world.py on line 1, but no
> > encoding declared; see http://python.org/dev/peps/pep-0263/ for details
> 
> The problem is the version of Python that comes with your Mac is obsolete.

That is not the problem.  Python 2 can handle non-ASCII characters just fine.

Chris: if you could show us the code in hello_world.py, we can help you
get it working.

--Ned.

[toc] | [prev] | [next] | [standalone]


#110188

Fromwxjmfauth@gmail.com
Date2016-06-20 01:39 -0700
Message-ID<f3e95ab6-957e-4c7a-b26a-60ace7e7f7c6@googlegroups.com>
In reply to#110072
Le samedi 18 juin 2016 02:36:34 UTC+2, Ned Batchelder a écrit :
> 
> That is not the problem.  Python 2 can handle non-ASCII characters just fine.
> 

1) A big NO.
2) I do not give examples anymore (*and explanations*), because
I know that it's impossible to discuss.
3) The single important thing is that I can show (and explain this)
to serious users (eg. academic level).

jmf

[toc] | [prev] | [next] | [standalone]


#110073

FromMRAB <python@mrabarnett.plus.com>
Date2016-06-18 01:58 +0100
Message-ID<mailman.108.1466211544.2288.python-list@python.org>
In reply to#110069
On 2016-06-18 00:52, Chris via Python-list wrote:
> I have been trying to write a simple Hello World script on my Mac at work with TextEdit.  However, I keep getting this error message:
>
> SyntaxError: Non-ASCII character '\xe2' in hello_world.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
>
> I am using TextEdit in plain text mode.  The document was saved in UTF-8, and I still get the error message.  I tried switching to Western ASCII encoding, but once I start typing, I get a message stating that the document can no longer be saved using its original Western (ASCII) encoding.
>
> Any suggestions for a good open source text editor for the Mac out there?  For now, I am going to stick with vim.
>
Did you specify the encoding as described in the PEP?

It should be something like:

# -*- coding: utf-8 -*-

as the first or second line.

[toc] | [prev] | [next] | [standalone]


#110076

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-17 18:50 -0700
Message-ID<6f4c9f01-4173-460b-9819-0457be55ab12@googlegroups.com>
In reply to#110073
On Saturday, June 18, 2016 at 12:59:16 PM UTC+12, MRAB wrote:

> Did you specify the encoding as described in the PEP?

Python 3 defaults to UTF-8.

[toc] | [prev] | [next] | [standalone]


#110079

FromSteven D'Aprano <steve@pearwood.info>
Date2016-06-18 12:05 +1000
Message-ID<5764ac58$0$1620$c3e8da3$5496439d@news.astraweb.com>
In reply to#110076
On Sat, 18 Jun 2016 11:50 am, Lawrence D’Oliveiro wrote:

> On Saturday, June 18, 2016 at 12:59:16 PM UTC+12, MRAB wrote:
> 
>> Did you specify the encoding as described in the PEP?
> 
> Python 3 defaults to UTF-8.

That doesn't mean that upgrading to Python 3 will fix the problem. It *may*,
but since the details of what the precise problem are quite vague, it is
difficult to be sure. We know its an encoding problem, because that's what
the error message tells us, but beyond that, the symptoms reported are
unclear.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#110077

FromSteven D'Aprano <steve@pearwood.info>
Date2016-06-18 11:55 +1000
Message-ID<5764aa04$0$1605$c3e8da3$5496439d@news.astraweb.com>
In reply to#110069
On Sat, 18 Jun 2016 09:52 am, Chris wrote:

> I have been trying to write a simple Hello World script on my Mac at work
> with TextEdit.  However, I keep getting this error message:
> 
> SyntaxError: Non-ASCII character '\xe2' in hello_world.py on line 1, but
> no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Have you tried declaring an encoding? Put this in the first line of your
file:

# -*- coding: utf-8 -*-

This is a "magic cookie" that tells the interpreter you are using UTF-8.
It's only needed if you include non-ASCII text in the file, as you appear
to be doing for some reason.

That might be sufficient to solve the problem. In theory it will be, so try
that first, but just in case something more mysterious is going on, read
on.


> I am using TextEdit in plain text mode.  The document was saved in UTF-8,
> and I still get the error message.

Are you *sure* it was UTF-8? Because I can't see likely way to get the byte
\xE2 as the*first* non-ASCII byte in a UTF-8 document.

The way UTF-8 works is that ASCII characters are encoded as the same bytes
used by ASCII. But non-ASCII characters get encoded as multi-byte sequences
of non-ASCII bytes. The first time Python sees a non-ASCII byte, it will
complain. So if it is complaining about byte \xE2 in UTF-8, you must have a
code point between U+10000 and U+10FFFF, which seems unlikely unless you're
writing in Chinese, ancient Phoenician, or similar.

Unless... are you using an emoji? That might do it.

It's best if you show us your code. We may be able to diagnose the problem
more easily once we see that.


If it is possible that you're *not* using UTF-8 like you thought, then
perhaps you have Smart Quotes turned on? If you type ' ' or " ", do you see
curly quotes instead of foot/inch marks?

The character the Python interpreter is complaining about appears to be a
fancy quote of some sort. If I assume you're actually using the old default
Macintosh encoding, I get a kind of curly quote:

py> import unicodedata
py> unicodedata.name(b'\xe2'.decode('MacRoman'))
'SINGLE LOW-9 QUOTATION MARK'

which hints that when you type:

    print 'Hello World'

in your file, you're seeing:

    print ‚Hello World’

or similar. Or possibly you're actually using a Western European encoding,
like Latin-1, in which case you're probably using â.

py> unicodedata.name(b'\xe2'.decode('Latin-1'))
'LATIN SMALL LETTER A WITH CIRCUMFLEX'


But that contradicts the error message that the editor gives you:

> I tried switching to Western ASCII 
> encoding, but once I start typing, I get a message stating that the
> document can no longer be saved using its original Western (ASCII)
> encoding.
> 
> Any suggestions for a good open source text editor for the Mac out there? 
> For now, I am going to stick with vim.

I can only stress that if adding the magic encoding cookie to the file
doesn't fix it, we'll need to see the source code to diagnose the problem.


-- 
Steven

[toc] | [prev] | [next] | [standalone]


#110078

FromZachary Ware <zachary.ware+pylist@gmail.com>
Date2016-06-17 20:59 -0500
Message-ID<mailman.109.1466215164.2288.python-list@python.org>
In reply to#110069
On Jun 17, 2016 6:56 PM, "Chris via Python-list" <python-list@python.org>
wrote:
>
> I have been trying to write a simple Hello World script on my Mac at work
with TextEdit.

TextEdit is not just a simple text editor, it defaults to rich text mode.
You can either attempt to get TextEdit out of rich text mode and into plain
text mode, or use a different editor, like nano or vim (I'm pretty sure
both are available by default).

--
Zach
(On a phone)

[toc] | [prev] | [next] | [standalone]


#110084

Fromsupport@ecourierz.com
Date2016-06-17 22:18 -0700
Message-ID<f632164f-11ce-4383-a268-db5c446450cb@googlegroups.com>
In reply to#110069

use notepad++

[toc] | [prev] | [next] | [standalone]


#110088

FromMichael Vilain <mev94303y@yahoo.com>
Date2016-06-18 00:04 -0700
Message-ID<mev94303y-C2E20B.00041218062016@news.individual.net>
In reply to#110084
In article <f632164f-11ce-4383-a268-db5c446450cb@googlegroups.com>,
 support@ecourierz.com wrote:

> use notepad++

[pay no attention to the little windows troll behind the curtain]

"best" is subjective.  Anytime someone wants the "best", I ask "what 
features are important to you that would make it the best" because I'm 
pretty sure what I find important wouldn't be what they find important.

Things I've seen in a bunch of straight editors:

- syntax coloring
- parathesis/block matching
- auto indent
- expansion of keywords, variables, subroutines
- integrated documentation so you don't have to lookup the syntax and 
arguments of a function
- integration with code management systems (svn, git, github)
- regular expression searching
- multi-file regular expression search/replace
- multi-pane/window diff/merge
- programmability (e.g. write/store macros to perform repeatable tasks)
- integrated compile, run & syntax checking (this is really a function 
of an IDE)
- interactive debugger (program stepping, expression & variable 
evaluation, breakpoints, watchpoints, macros) [this is why I like perl]
- extensibility to add features (lint or code formatting, special 
framework, etc.)

As you can see, your mileage may vary widely.

BBEdit has been around a long time and for it's price ($130) it does a 
lot but it's falling behind the times. New versions aren't really adding 
much in terms of new features.

Atom does much of the things above, plus it's free and multi-platform.

Sublime is 'lighter weight' than BBEdit, has more coverage for more 
modern languages and is extensible. It's also cheaper at $80.

IntelliJ by Jetbrains has a python module that matches their pycharms 
product. The community version is free with limitations. Or you can 
spend $200 for the full IDE.

What's the best? That's your homework.  Write 500 describing what is the 
Best editor and why.

-- 
DeeDee, don't press that button!  DeeDee!  NO!  Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]

[toc] | [prev] | [next] | [standalone]


#110093

FromTerry Reedy <tjreedy@udel.edu>
Date2016-06-18 05:09 -0400
Message-ID<mailman.115.1466240968.2288.python-list@python.org>
In reply to#110088
On 6/18/2016 3:04 AM, Michael Vilain via Python-list wrote:
> In article <f632164f-11ce-4383-a268-db5c446450cb@googlegroups.com>,
>  support@ecourierz.com wrote:
>
>> use notepad++

To me, for programming only in Python, IDLE beats Notepad++.  Some 
features noted below.

> [pay no attention to the little windows troll behind the curtain]
>
> "best" is subjective.  Anytime someone wants the "best", I ask "what
> features are important to you that would make it the best" because I'm
> pretty sure what I find important wouldn't be what they find important.
>
> Things I've seen in a bunch of straight editors:
>
> - syntax coloring
> - parathesis/block matching
> - auto indent
> - expansion of keywords, variables, subroutines
> - integrated documentation so you don't have to lookup the syntax and
> arguments of a function
> - integration with code management systems (svn, git, github)
> - regular expression searching
> - multi-file regular expression search/replace
> - multi-pane/window diff/merge
> - programmability (e.g. write/store macros to perform repeatable tasks)
> - integrated compile, run & syntax checking (this is really a function
> of an IDE)

When compile of text in editor fails, the cursor is moved to the spot 
where indicated by the compiler.

When compile succeeds but there is a runtime error, one can jump from 
traceback to any of the file and line specified in the traceback.  This 
is *extremely* useful.

When one runs the integrated grep over part of the directory tree, one 
can jump to any of the file/line hits.

> - interactive debugger (program stepping, expression & variable
> evaluation, breakpoints, watchpoints, macros) [this is why I like perl]
> - extensibility to add features (lint or code formatting, special
> framework, etc.)

> What's the best? That's your homework.  Write 500 describing what is the
> Best editor and why.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#110094

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-06-18 12:40 +0300
Message-ID<87lh22x2bq.fsf@elektro.pacujo.net>
In reply to#110088
Michael Vilain <mev94303y@yahoo.com>:

> "best" is subjective. Anytime someone wants the "best", I ask "what
> features are important to you that would make it the best" because I'm
> pretty sure what I find important wouldn't be what they find
> important.

That's a bit like asking what gender, nationality and religion you'd
prefer for yourself.

I mean, having used emacs since the mid-1980's, everything just seems to
be in the right place -- including typing this posting.

> - syntax coloring
> - parathesis/block matching
> - auto indent

Yes, in active use.

> - expansion of keywords, variables, subroutines

Never learned to need that.

> - integrated documentation so you don't have to lookup the syntax and 
> arguments of a function

I have seen that in action with eclipse and Java. It could never match
having a web browser window next to the editor window: <URL:
https://docs.python.org/3/library/>.

It would be nice if python provided a full set of man pages as well as
info documentation like C. Those are integrated into emacs.

> - integration with code management systems (svn, git, github)
> - regular expression searching
> - multi-file regular expression search/replace
> - multi-pane/window diff/merge
> - programmability (e.g. write/store macros to perform repeatable tasks)

Yes, in active use.

> - integrated compile, run & syntax checking (this is really a function 
> of an IDE)
> - interactive debugger (program stepping, expression & variable 
> evaluation, breakpoints, watchpoints, macros) [this is why I like perl]

As far as Python goes, emacs does have some elementary support for pdb.
Haven't found it all that practical, though.

> - extensibility to add features (lint or code formatting, special 
> framework, etc.)

Although they do exist for emacs, I'm not a big fan of special plugins
of any sort.

> What's the best? That's your homework. Write 500 describing what is
> the Best editor and why.

Emacs doesn't take up the whole screen. It integrates seamlessly with
the Unix way of doing things (but has some trouble with non-Unix culture
items like Java). It can be run perfectly fine in a text terminal
session. It takes care of all of your typing needs: when you type, type
in emacs. Shell, email, news, documentation (with ASCII graphics!),
programming...


Marko

[toc] | [prev] | [next] | [standalone]


#110095

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-18 03:08 -0700
Message-ID<02c74528-caf4-4983-b737-e5ab91e67a7c@googlegroups.com>
In reply to#110094
On Saturday, June 18, 2016 at 9:40:23 PM UTC+12, Marko Rauhamaa wrote:

> Michael Vilain:
> 
>> - expansion of keywords, variables, subroutines

Reminds me of a story by a local CompSci lecturer who originally learned Java through an IDE with autocomplete. Then one day he sat down to write some Java code without the benefit of autocomplete, and realized he didn’t know the language at all.

>> - integrated documentation so you don't have to lookup the syntax and 
>> arguments of a function
> 
> I have seen that in action with eclipse and Java. It could never match
> having a web browser window next to the editor window: <URL:
> https://docs.python.org/3/library/>.

I do exactly the same. Here’s my story: I’ve lost track of the number of times I have seen people write (in several different languages) sequences like

    x = ... expression for x ...
    y = ... expression for y ...
    s = math.sqrt(x * x + y * y)

instead of the more direct

    s = math.hypot(... expression for x ..., ... expression for y ...)

Would this “integrated documentation” to “lookup the syntax and arguments of a function” point out that math.hypot is a better function to use in this case than math.sqrt? No. For that, you have to actually be able to read and understand the reference documentation.

> Emacs doesn't take up the whole screen. It integrates seamlessly with
> the Unix way of doing things (but has some trouble with non-Unix culture
> items like Java).

Also an Emacs user here, even used it with Java (for Android).

[toc] | [prev] | [next] | [standalone]


#110101

FromMichael Vilain <mev94303y@yahoo.com>
Date2016-06-18 07:12 -0700
Message-ID<mev94303y-DB805D.07123818062016@news.individual.net>
In reply to#110095
In article <02c74528-caf4-4983-b737-e5ab91e67a7c@googlegroups.com>,
 Lawrence D¹Oliveiro <lawrencedo99@gmail.com> wrote:

> On Saturday, June 18, 2016 at 9:40:23 PM UTC+12, Marko Rauhamaa wrote:
> 
> > Michael Vilain:
> > 
> >> - expansion of keywords, variables, subroutines
> 
> Reminds me of a story by a local CompSci lecturer who originally learned Java 
> through an IDE with autocomplete. Then one day he sat down to write some Java 
> code without the benefit of autocomplete, and realized he didn¹t know the 
> language at all.
> 
> >> - integrated documentation so you don't have to lookup the syntax and 
> >> arguments of a function
> > 
> > I have seen that in action with eclipse and Java. It could never match
> > having a web browser window next to the editor window: <URL:
> > https://docs.python.org/3/library/>.
> 
> I do exactly the same. Here¹s my story: I¹ve lost track of the number of 
> times I have seen people write (in several different languages) sequences 
> like
> 
>     x = ... expression for x ...
>     y = ... expression for y ...
>     s = math.sqrt(x * x + y * y)
> 
> instead of the more direct
> 
>     s = math.hypot(... expression for x ..., ... expression for y ...)
> 
> Would this ³integrated documentation² to ³lookup the syntax and arguments of 
> a function² point out that math.hypot is a better function to use in this 
> case than math.sqrt? No. For that, you have to actually be able to read and 
> understand the reference documentation.
> 
> > Emacs doesn't take up the whole screen. It integrates seamlessly with
> > the Unix way of doing things (but has some trouble with non-Unix culture
> > items like Java).
> 
> Also an Emacs user here, even used it with Java (for Android).

I found this workflow cumbersome on a SSH terminal session with a 
terminal-based editor rather than a windowing system.  So having the 
editor know specific function was useful rather than having the manual 
open at my elbow.

This is the programmer equivalent of boxers or briefs.

-- 
DeeDee, don't press that button!  DeeDee!  NO!  Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]

[toc] | [prev] | [next] | [standalone]


#110098

Fromalister <alister.ware@ntlworld.com>
Date2016-06-18 13:22 +0000
Message-ID<9Wb9z.62277$am6.25239@fx46.am4>
In reply to#110094
On Sat, 18 Jun 2016 12:40:09 +0300, Marko Rauhamaa wrote:

> 
>> - integrated documentation so you don't have to lookup the syntax and
>> arguments of a function
> 
> I have seen that in action with eclipse and Java. It could never match
> having a web browser window next to the editor window: <URL:
> https://docs.python.org/3/library/>.
> 
> It would be nice if python provided a full set of man pages as well as
> info documentation like C. Those are integrated into emacs.
> 
pydoc - I think Guido's time machine strikes again :-)

pydoc - the Python documentation tool

pydoc <name> ...
    Show text documentation on something.  <name> may be the name of a
    Python keyword, topic, function, module, or package, or a dotted
    reference to a class or function within a module or module in a
    package.  If <name> contains a '/', it is used as the path to a
    Python source file to document. If name is 'keywords', 'topics',
    or 'modules', a listing of these things is displayed.

pydoc -k <keyword>
    Search for a keyword in the synopsis lines of all available modules.

pydoc -p <port>
    Start an HTTP server on the given port on the local machine.  Port
    number 0 can be used to get an arbitrary unused port.

pydoc -w <name> ...
    Write out the HTML documentation for a module to a file in the current
    directory.  If <name> contains a '/', it is treated as a filename; if
    it names a directory, documentation is written for all the contents.

as it uses docstrings it should work well with any reasonably well 
written module - (even your own)




-- 
... The prejudices people feel about each other disappear when they get
to know each other.
		-- Kirk, "Elaan of Troyius", stardate 4372.5

[toc] | [prev] | [next] | [standalone]


#110100

FromMichael Vilain <mev94303y@yahoo.com>
Date2016-06-18 07:08 -0700
Message-ID<mev94303y-81A3CB.07083718062016@news.individual.net>
In reply to#110094
In article <87lh22x2bq.fsf@elektro.pacujo.net>,
 Marko Rauhamaa <marko@pacujo.net> wrote:

> Michael Vilain <mev94303y@yahoo.com>:
> 
> > "best" is subjective. Anytime someone wants the "best", I ask "what
> > features are important to you that would make it the best" because I'm
> > pretty sure what I find important wouldn't be what they find
> > important.
> 
> That's a bit like asking what gender, nationality and religion you'd
> prefer for yourself.
> 
> I mean, having used emacs since the mid-1980's, everything just seems to
> be in the right place -- including typing this posting.
> 
> > - syntax coloring
> > - parathesis/block matching
> > - auto indent
> 
> Yes, in active use.
> 
> > - expansion of keywords, variables, subroutines
> 
> Never learned to need that.
> 
> > - integrated documentation so you don't have to lookup the syntax and 
> > arguments of a function
> 
> I have seen that in action with eclipse and Java. It could never match
> having a web browser window next to the editor window: <URL:
> https://docs.python.org/3/library/>.
> 
> It would be nice if python provided a full set of man pages as well as
> info documentation like C. Those are integrated into emacs.
> 
> > - integration with code management systems (svn, git, github)
> > - regular expression searching
> > - multi-file regular expression search/replace
> > - multi-pane/window diff/merge
> > - programmability (e.g. write/store macros to perform repeatable tasks)
> 
> Yes, in active use.
> 
> > - integrated compile, run & syntax checking (this is really a function 
> > of an IDE)
> > - interactive debugger (program stepping, expression & variable 
> > evaluation, breakpoints, watchpoints, macros) [this is why I like perl]
> 
> As far as Python goes, emacs does have some elementary support for pdb.
> Haven't found it all that practical, though.
> 
> > - extensibility to add features (lint or code formatting, special 
> > framework, etc.)
> 
> Although they do exist for emacs, I'm not a big fan of special plugins
> of any sort.
> 
> > What's the best? That's your homework. Write 500 describing what is
> > the Best editor and why.
> 
> Emacs doesn't take up the whole screen. It integrates seamlessly with
> the Unix way of doing things (but has some trouble with non-Unix culture
> items like Java). It can be run perfectly fine in a text terminal
> session. It takes care of all of your typing needs: when you type, type
> in emacs. Shell, email, news, documentation (with ASCII graphics!),
> programming...
> 
> 
> Marko

Well, why did you ask the question if you already decided on the answer?

I looked at emacs (vs. TECO) back in the 80s and found it only ran on 
UNIX systems but required special needs to install. That's changed 
significantly but it's a pig and the e-LISP language to extend the 
editor was opaque to me.  SO, as a sysadmin who wrote code to automate 
my job, I chose vi because it was everywhere.

Then the era of the IDE came along and a modal editor like vi or emacs 
became something the kids found "quaint".  As I said, the tools I use 
everyday won't be the tools you use.

Have fun with Emacs.  Why change what works for you?

-- 
DeeDee, don't press that button!  DeeDee!  NO!  Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]

[toc] | [prev] | [next] | [standalone]


#110111

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2016-06-18 16:08 -0400
Message-ID<mailman.120.1466280490.2288.python-list@python.org>
In reply to#110100
On Sat, 18 Jun 2016 07:08:37 -0700, Michael Vilain via Python-list
<python-list@python.org> declaimed the following:

>I looked at emacs (vs. TECO) back in the 80s and found it only ran on 
>UNIX systems but required special needs to install. That's changed 
>significantly but it's a pig and the e-LISP language to extend the 
>editor was opaque to me.  SO, as a sysadmin who wrote code to automate 
>my job, I chose vi because it was everywhere.
>
	There was a microEMACS running on the Amiga...

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#110106

FromRustom Mody <rustompmody@gmail.com>
Date2016-06-18 09:02 -0700
Message-ID<7c7cf963-33a9-4dcf-b6dd-e9b0137fa18e@googlegroups.com>
In reply to#110094
On Saturday, June 18, 2016 at 3:10:23 PM UTC+5:30, Marko Rauhamaa wrote:
> Michael Vilain :
> 
> > "best" is subjective. Anytime someone wants the "best", I ask "what
> > features are important to you that would make it the best" because I'm
> > pretty sure what I find important wouldn't be what they find
> > important.
> 
> That's a bit like asking what gender, nationality and religion you'd
> prefer for yourself.
> 
> I mean, having used emacs since the mid-1980's, everything just seems to
> be in the right place -- including typing this posting.
> 
> > - syntax coloring
> > - parathesis/block matching
> > - auto indent
> 
> Yes, in active use.
> 
> > - expansion of keywords, variables, subroutines
> 
> Never learned to need that.
> 
> > - integrated documentation so you don't have to lookup the syntax and 
> > arguments of a function
> 
> I have seen that in action with eclipse and Java. It could never match
> having a web browser window next to the editor window: <URL:
> https://docs.python.org/3/library/>.
> 
> It would be nice if python provided a full set of man pages as well as
> info documentation like C. Those are integrated into emacs.
> 
> > - integration with code management systems (svn, git, github)
> > - regular expression searching
> > - multi-file regular expression search/replace
> > - multi-pane/window diff/merge
> > - programmability (e.g. write/store macros to perform repeatable tasks)
> 
> Yes, in active use.
> 
> > - integrated compile, run & syntax checking (this is really a function 
> > of an IDE)
> > - interactive debugger (program stepping, expression & variable 
> > evaluation, breakpoints, watchpoints, macros) [this is why I like perl]
> 
> As far as Python goes, emacs does have some elementary support for pdb.
> Haven't found it all that practical, though.
> 
> > - extensibility to add features (lint or code formatting, special 
> > framework, etc.)
> 
> Although they do exist for emacs, I'm not a big fan of special plugins
> of any sort.
> 
> > What's the best? That's your homework. Write 500 describing what is
> > the Best editor and why.
> 
> Emacs doesn't take up the whole screen. It integrates seamlessly with
> the Unix way of doing things (but has some trouble with non-Unix culture
> items like Java). It can be run perfectly fine in a text terminal
> session. It takes care of all of your typing needs: when you type, type
> in emacs. Shell, email, news, documentation (with ASCII graphics!),
> programming...
> 
> 
> Marko

Having expatiatated all that you could have added some tips to OP on handling unicode in emacs :-)

Some emacs tips
[Note If recommending emacs ⇒ recommender = sadist; blame is on first mention!]

Emacs has a modeline at bottom which tells all sorts of things -- one of them
the coding system (as it detects/decides) at the left corner.
For latin-1 it should show a '1' and then there should be no problem
If it shows 'U' then its utf-something (usually UTF-8) and you have a likely
problem

To force latin-1 type
C-x RET f (ie control-X followed by return followed by an 'f')
It will ask for what coding system to save file
Say latin-1-unix
[the unix is for LF line endings]
And the U should change to 1 and you are done

OTOH there may be a non-latin-1-able character it will complain and put the cursor on the offending char

[
For that matter if I had to guess whats happened I'd hazard that you cut-pasted
something from a pdf which converted ASCII quotes -- '  " -- into one
of ‘ “ And unfortunately thats not very visible
]

If this is the case emacs will helpfully tell you to do something about these

In order to check for sure put the cursor on the char and type
C-u C-x =

eg On the “ I get
============================
             position: 13 of 13 (92%), column: 0
            character: “ (displayed as “) (codepoint 8220, #o20034, #x201c)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x201C
               script: symbol
               syntax: . 	which means: punctuation
             category: .:Base, c:Chinese, h:Korean, j:Japanese
             to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
          buffer code: #xE2 #x80 #x9C
            file code: #xFF #xFE #x1C #x20 (encoded by coding system utf-16-le-unix)
              display: by this font (glyph code)
    xft:-DAMA-Ubuntu Mono-normal-normal-normal-*-17-*-*-*-m-0-iso10646-1 (#x70)

Character code properties: customize what to show
  name: LEFT DOUBLE QUOTATION MARK
  old-name: DOUBLE TURNED COMMA QUOTATION MARK
  general-category: Pi (Punctuation, Initial quote)
  decomposition: (8220) ('“')
================================

Yeah thats a mouthful but that the codepoint > 127 indicates you have a problem

[toc] | [prev] | [next] | [standalone]


#110160

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2016-06-20 10:38 +1200
Message-ID<dsol7bFes93U1@mid.individual.net>
In reply to#110088
Michael Vilain wrote:
> BBEdit has been around a long time and for it's price ($130) it does a 
> lot but it's falling behind the times. New versions aren't really adding 
> much in terms of new features.

There's a free version of BBEdit called TextWrangler that's
pretty good. I'm currently using it for all my Mac programming
work.

-- 
Greg

[toc] | [prev] | [next] | [standalone]


Page 1 of 5  [1] 2 3 4 5  Next page →

Back to top | Article view | comp.lang.python


csiph-web