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 2 of 5 — ← Prev page 1 [2] 3 4 5  Next page →


#110105

FromMrJean1 <MrJean1@gmail.com>
Date2016-06-18 08:52 -0700
Message-ID<4b36cae1-7732-490d-972e-0f0b78f9e6b0@googlegroups.com>
In reply to#110069
Try TextWrangler from BareBones <http://www.barebones.com/products/textwrangler/>.  I've been using that for years on MacOS X.

/Jean

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


#110119

FromMichael Torrie <torriem@gmail.com>
Date2016-06-18 17:07 -0600
Message-ID<mailman.126.1466291230.2288.python-list@python.org>
In reply to#110069
On 06/17/2016 05:52 PM, Chris via Python-list wrote:
> Any suggestions for a good open source text editor for the Mac out
> there?  For now, I am going to stick with vim.

Good choice.

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


#110120

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-18 17:12 -0700
Message-ID<ac656b73-cc39-412b-81ec-02795aab98f8@googlegroups.com>
In reply to#110119
On Sunday, June 19, 2016 at 11:07:23 AM UTC+12, Michael Torrie wrote:
>
> On 06/17/2016 05:52 PM, Chris via Python-list wrote:
>>
>> Any suggestions for a good open source text editor for the Mac out
>> there?  For now, I am going to stick with vim.
> 
> Good choice.

The trouble with vim/vi/whatever, is that it doesn’t work like any other editor on Earth.

Pull up any old GUI-based editor you like, for example Windows (shudder) Notepad. If there are N characters in your file, then the insertion point can be placed at N + 1 positions: in-between two adjacent characters, or before the first character, or after the last character. And this makes sense: anything you type is inserted at the insertion point. All rational text editors (and word processors) work this way.

But not vi/vim. It only lets you place your cursor *on* a character, not *in-between* characters. That’s why you need two separate insertion commands, insert-before and insert-after. And one of those has the interesting side effect where, if you exit insertion mode without inserting anything, it doesn’t put you back in the same position as before. Why?

As to why you need insertion commands at all, that’s another thing...

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


#110121

FromJoel Goldstick <joel.goldstick@gmail.com>
Date2016-06-18 20:26 -0400
Message-ID<mailman.127.1466296345.2288.python-list@python.org>
In reply to#110120
On Sat, Jun 18, 2016 at 8:12 PM, Lawrence D’Oliveiro
<lawrencedo99@gmail.com> wrote:
> On Sunday, June 19, 2016 at 11:07:23 AM UTC+12, Michael Torrie wrote:
>>
>> On 06/17/2016 05:52 PM, Chris via Python-list wrote:
>>>
>>> Any suggestions for a good open source text editor for the Mac out
>>> there?  For now, I am going to stick with vim.
>>
>> Good choice.
>
> The trouble with vim/vi/whatever, is that it doesn’t work like any other editor on Earth.
>
> Pull up any old GUI-based editor you like, for example Windows (shudder) Notepad. If there are N characters in your file, then the insertion point can be placed at N + 1 positions: in-between two adjacent characters, or before the first character, or after the last character. And this makes sense: anything you type is inserted at the insertion point. All rational text editors (and word processors) work this way.
>
> But not vi/vim. It only lets you place your cursor *on* a character, not *in-between* characters. That’s why you need two separate insertion commands, insert-before and insert-after. And one of those has the interesting side effect where, if you exit insertion mode without inserting anything, it doesn’t put you back in the same position as before. Why?
>
> As to why you need insertion commands at all, that’s another thing...
> --
> https://mail.python.org/mailman/listinfo/python-list

I personally love vim.  But its clearly an acquired taste.  When you
get good at it its pretty amazing -- and no mouse.  The other thing
about vim is that it is on every linux system, so you don't have to
load your editor if you are ssh-ing to some machine

-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays

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


#110137

FromPete Forman <petef4+usenet@gmail.com>
Date2016-06-19 11:41 +0100
Message-ID<m14m8pwjdj.fsf@iKarel.lan>
In reply to#110121
Joel Goldstick <joel.goldstick@gmail.com> writes:

> On Sat, Jun 18, 2016 at 8:12 PM, Lawrence D’Oliveiro
> <lawrencedo99@gmail.com> wrote:
>> On Sunday, June 19, 2016 at 11:07:23 AM UTC+12, Michael Torrie wrote:
>>>
>>> On 06/17/2016 05:52 PM, Chris via Python-list wrote:
>>>>
>>>> Any suggestions for a good open source text editor for the Mac out
>>>> there?  For now, I am going to stick with vim.
>>>
>>> Good choice.
>>
>> The trouble with vim/vi/whatever, is that it doesn’t work like any
>> other editor on Earth.
>>
>> Pull up any old GUI-based editor you like, for example Windows
>> (shudder) Notepad. If there are N characters in your file, then the
>> insertion point can be placed at N + 1 positions: in-between two
>> adjacent characters, or before the first character, or after the last
>> character. And this makes sense: anything you type is inserted at the
>> insertion point. All rational text editors (and word processors) work
>> this way.
>>
>> But not vi/vim. It only lets you place your cursor *on* a character,
>> not *in-between* characters. That’s why you need two separate
>> insertion commands, insert-before and insert-after. And one of those
>> has the interesting side effect where, if you exit insertion mode
>> without inserting anything, it doesn’t put you back in the same
>> position as before. Why?
>>
>> As to why you need insertion commands at all, that’s another thing...
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>
> I personally love vim.  But its clearly an acquired taste.  When you
> get good at it its pretty amazing -- and no mouse.  The other thing
> about vim is that it is on every linux system, so you don't have to
> load your editor if you are ssh-ing to some machine

Both emacs and vim are powerful tools in the hands of experienced users
but I would recommend neither to someone starting out who is just
looking for a code-aware editor.

Emacs and vim are much more than editors. I'm composing this message
using Emacs/Gnus on a Mac. TRAMP is invaluable to me for my daily work.

-- 
Pete Forman

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


#110139

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-06-19 15:57 +0300
Message-ID<87r3btuyin.fsf@elektro.pacujo.net>
In reply to#110137
Pete Forman <petef4+usenet@gmail.com>:
> Both emacs and vim are powerful tools in the hands of experienced
> users but I would recommend neither to someone starting out who is
> just looking for a code-aware editor.

I don't know. I'm recommending emacs to everybody, especially the
complete beginners, who don't yet have to unlearn anything.


Marko

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


#110140

FromMichael Torrie <torriem@gmail.com>
Date2016-06-19 07:19 -0600
Message-ID<mailman.134.1466342380.2288.python-list@python.org>
In reply to#110137
On 06/19/2016 04:41 AM, Pete Forman wrote:
> Both emacs and vim are powerful tools in the hands of experienced users
> but I would recommend neither to someone starting out who is just
> looking for a code-aware editor.

In any case this doesn't matter here because the original poster already
said he was using vim.  Sticking with vim is a fine choice.

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


#110148

FromRustom Mody <rustompmody@gmail.com>
Date2016-06-19 09:20 -0700
Message-ID<242caeee-f489-4956-8261-680fe49f402d@googlegroups.com>
In reply to#110140
On Sunday, June 19, 2016 at 6:49:55 PM UTC+5:30, Michael Torrie wrote:
> On 06/19/2016 04:41 AM, Pete Forman wrote:
> > Both emacs and vim are powerful tools in the hands of experienced users
> > but I would recommend neither to someone starting out who is just
> > looking for a code-aware editor.
> 
> In any case this doesn't matter here because the original poster already
> said he was using vim.  Sticking with vim is a fine choice.

In general I would agree with this line.
In this case...
Yes the OP said he was using vim
And he could not handle a unicode encoding issue
I gave an emacs solution to the issue not because I find editor-wars engaging 
but because I dont know how to do *this* with vi.
I'd be surprised if vi actually cant do these:
1. Look under the unicode-hood to peek at what a char is -- C-u C-x = in emacs
2. Change file encoding -- C-x RET f in emacs

Please do suggest vi-ways of handling this -- that would be useful!

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


#110150

FromChristian Gollwitzer <auriocus@gmx.de>
Date2016-06-19 20:06 +0200
Message-ID<nk6mub$i56$1@dont-email.me>
In reply to#110148
Am 19.06.16 um 18:20 schrieb Rustom Mody:
> I gave an emacs solution to the issue not because I find editor-wars engaging
> but because I dont know how to do *this* with vi.
> I'd be surprised if vi actually cant do these:
> 1. Look under the unicode-hood to peek at what a char is -- C-u C-x = in emacs
> 2. Change file encoding -- C-x RET f in emacs
>
> Please do suggest vi-ways of handling this -- that would be useful!
>
Changing the encoding is

	:set fileencoding=utf-8

for instance. This will recode the buffer to utf-8, the rendering should 
stay the same. Saving the file would now write a bytestream which has an 
utf-8 interpretation in accordance to the display.

In any case, I'd suggest to install macvim on the Mac, instead of using 
the Apple-provided vim, because of it's GUI windows and overall better 
integration (file types, copy/paste etc.)

	Christian

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


#110151

FromRustom Mody <rustompmody@gmail.com>
Date2016-06-19 11:13 -0700
Message-ID<af29d72a-51df-4035-a7cf-b6cae92772e5@googlegroups.com>
In reply to#110150
On Sunday, June 19, 2016 at 11:36:17 PM UTC+5:30, Christian Gollwitzer wrote:
> Am 19.06.16 um 18:20 schrieb Rustom Mody:
> > I gave an emacs solution to the issue not because I find editor-wars engaging
> > but because I dont know how to do *this* with vi.
> > I'd be surprised if vi actually cant do these:
> > 1. Look under the unicode-hood to peek at what a char is -- C-u C-x = in emacs
> > 2. Change file encoding -- C-x RET f in emacs
> >
> > Please do suggest vi-ways of handling this -- that would be useful!
> >
> Changing the encoding is
> 
> 	:set fileencoding=utf-8

I was suggesting something like
:set fileencoding=latin-1

It does work in a way in the sense that a file that has chars that
would not encode to latin-1 does give errors
But only later when saving and not pinpointing where the error is

[Or I am doing something wrong maybe]

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


#110154

FromMichael Torrie <torriem@gmail.com>
Date2016-06-19 13:04 -0600
Message-ID<mailman.143.1466363094.2288.python-list@python.org>
In reply to#110150
On 06/19/2016 12:06 PM, Christian Gollwitzer wrote:
> Am 19.06.16 um 18:20 schrieb Rustom Mody:
>> I gave an emacs solution to the issue not because I find editor-wars engaging
>> but because I dont know how to do *this* with vi.
>> I'd be surprised if vi actually cant do these:
>> 1. Look under the unicode-hood to peek at what a char is -- C-u C-x = in emacs
>> 2. Change file encoding -- C-x RET f in emacs
>>
>> Please do suggest vi-ways of handling this -- that would be useful!
>>
> Changing the encoding is
> 
> 	:set fileencoding=utf-8
> 
> for instance. This will recode the buffer to utf-8, the rendering should 
> stay the same. Saving the file would now write a bytestream which has an 
> utf-8 interpretation in accordance to the display.

Actually it doesn't re-encode the buffer iteslf.  Upon saving it will
try to encode the buffer to that.

There's another variable, just "encoding" that I think refers the buffer
in memory. Not sure about that though.

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


#110153

FromMichael Torrie <torriem@gmail.com>
Date2016-06-19 12:58 -0600
Message-ID<mailman.142.1466362738.2288.python-list@python.org>
In reply to#110148
On 06/19/2016 10:20 AM, Rustom Mody wrote:
> Yes the OP said he was using vim
> And he could not handle a unicode encoding issue

I missed that part! I somehow thought the unicode issues were coming
from his use of the built-in Mac text editor.

In any case, I have never had unicode problems with vim. It seems to
handle them just fine for me. I've never had a problem opening a UTF-8
file, using a unicode string literal, and running it in Python.

> I gave an emacs solution to the issue not because I find editor-wars engaging 
> but because I dont know how to do *this* with vi.
> I'd be surprised if vi actually cant do these:
> 1. Look under the unicode-hood to peek at what a char is -- C-u C-x = in emacs

When the cursor is over character, do command "ga" and it will show you
the hex code for that character.

http://vim.wikia.com/wiki/Showing_the_ASCII_value_of_the_current_character

> 2. Change file encoding -- C-x RET f in emacs

Display current encoding:
:set fileencoding

Set encoding to UTF-8:
:set filenecoding=utf-8

> Please do suggest vi-ways of handling this -- that would be useful!


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


#110163

FromSteven D'Aprano <steve@pearwood.info>
Date2016-06-20 11:32 +1000
Message-ID<576747c1$0$1585$c3e8da3$5496439d@news.astraweb.com>
In reply to#110153
On Mon, 20 Jun 2016 04:58 am, Michael Torrie wrote:

> When the cursor is over character, do command "ga" and it will show you
> the hex code for that character.
> 
> http://vim.wikia.com/wiki/Showing_the_ASCII_value_of_the_current_character

/me cries

Every time somebody refers to "the ASCII value" of non-ASCII characters, God
kills a puppy.


No wonder people find it so hard to understand Unicode. They have to unlearn
a bunch of misapprehensions first.


-- 
Steven

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


#110164 — ASCII or Unicode? (was best text editor for programming Python on a Mac)

FromRustom Mody <rustompmody@gmail.com>
Date2016-06-19 19:07 -0700
SubjectASCII or Unicode? (was best text editor for programming Python on a Mac)
Message-ID<f3f70d53-1caf-4a05-b4f2-8dbd6e97cea2@googlegroups.com>
In reply to#110163
On Monday, June 20, 2016 at 7:03:01 AM UTC+5:30, Steven D'Aprano wrote:
> On Mon, 20 Jun 2016 04:58 am, Michael Torrie wrote:
> 
> > When the cursor is over character, do command "ga" and it will show you
> > the hex code for that character.
> > 
> > http://vim.wikia.com/wiki/Showing_the_ASCII_value_of_the_current_character
> 
> /me cries
> 
> Every time somebody refers to "the ASCII value" of non-ASCII characters, God
> kills a puppy.
> 
> 
> No wonder people find it so hard to understand Unicode. They have to unlearn
> a bunch of misapprehensions first.

Ooooo! I LOVE crocodiles especially the crocodile-tears variety

The title says get ASCII value; the first line of the writeup says ASCII or Unicode.

If python were to do more than lip service to  REALLY being a unicode age language
why are things like this out of bounds even for discussion?

http://blog.languager.org/2014/04/unicoded-python.html

Note: Please make a distinction between
- Any ONE of these suggestions; none of which need to be taken too seriously individually
And
- The simple barefaced fact that not a single lexeme from python3 apart from
comments and identifiers allow elements from the set Unicode - ASCII.

Of which comments are arguably not in the language
And uncode identifiers are an opened pandora box with bigger disadvantages than advantages

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


#110167 — Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

FromSteven D'Aprano <steve@pearwood.info>
Date2016-06-20 13:29 +1000
SubjectRe: ASCII or Unicode? (was best text editor for programming Python on a Mac)
Message-ID<57676318$0$1621$c3e8da3$5496439d@news.astraweb.com>
In reply to#110164
On Mon, 20 Jun 2016 12:07 pm, Rustom Mody wrote:

> If python were to do more than lip service to  REALLY being a unicode age
> language why are things like this out of bounds even for discussion?
> 
> http://blog.languager.org/2014/04/unicoded-python.html

Quote:

"Why do we have to write x!=y then argue about the status of x<>y when we
can simply write x≠y?"

"Simply"?

This is how I write x≠y from scratch:

- press the 'x' key on my keyboard
- grab the mouse
- move mouse to Start menu
- pause and wait for "Utilities" submenu to appear
- move mouse over "Utilities" submenu
- pause and wait for "More Applications" submenu to appear
- move mouse to "More Applications" submenu
- move mouse to "Gnome charmap"
- click
- wait a second
- move mouse to "Character Map" window
- click on "Search" menu
- click on "Find" menu item
- release mouse
- type "unequal" and press ENTER
- press ENTER to dismiss the "Not Found" dialog
- type "not equal" and press ENTER
- press ESC to dismiss the Find dialog
- grab the mouse
- click the ≠ glyph
- pause and swear when nothing happens
- double-click the ≠ glyph
- move the mouse to the "Copy" button
- click "Copy"
- visually search the task bar for my editor
- click on the editor
- invariably I end up accidentally moving the insertion point, 
  so click after the 'x'
- release the mouse
- press Ctrl-V
- press the 'y' key

and I am done.

Now, I accept that some of those steps could probably be streamlined. Better
tooling would probably make it better, e.g. my editor could offer its own
char map, which hopefully wouldn't suck like Open Office's inbuilt "Insert
Special Character" function. It would be nice if the editor keep a cache
of "Frequently Inserted Characters", because realistically there's only a
set of about twenty or thirty that I use frequently.

A programmer's editor could even offer a per-language palette of non-ASCII
operators. Or there could be a keyboard shortcut which I probably wouldn't
remember. If I could remember a seemingly infinite number of arbitrary
keyboard commands, I'd use Emacs or Vi :-)

In theory most Linux apps support an X mechanism for inserting characters
that don't appear on the keyboard. Unfortunately, this gives no feedback
when you get it wrong, and discoverablity is terrible. It's taken me many
years to discover and learn the following:

WIN o WIN o gives °
WIN m WIN u gives µ
WIN s WIN s gives ß
WIN . . gives ·

(WIN is the Windows key)

Getting back to ≠ I tried:

WIN = WIN /
WIN / WIN =
WIN < WIN >
WIN ! WIN =

etc none of which do anything.

Another example of missing tooling is the lack of a good keyboard
application. Back in the 1980s, Apple Macs had a desk accessory that didn't
just simulate the keyboard, but showed what characters were available. If
you held down the Option key, the on-screen keyboard would display the
characters each key would insert. This increased discoverability and made
it practical for Hypertalk to accept non-ASCII synonyms such as

≤ for <=
≥ for >= 
≠ for <>

Without better tooling and more discoverability, non-ASCII characters as
syntax are an anti-feature.



-- 
Steven

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


#110169 — Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

FromPhil Boutros <philb@philb.ca>
Date2016-06-20 04:30 +0000
SubjectRe: ASCII or Unicode? (was best text editor for programming Python on a Mac)
Message-ID<slrnnmesbo.acv.philb@ah61.is-a-geek.com>
In reply to#110167
Steven D'Aprano <steve@pearwood.info> wrote:
>
> Quote:
>
> "Why do we have to write x!=y then argue about the status of x<>y when we
> can simply write x≠y?"
>
> "Simply"?
>
> This is how I write x≠y from scratch:
<snip long, arduous process>

    To wrap this back full circle, here's how it's done on vim:  

Ctrl-K, =, ! (last two steps interchangeable).  Done.  Result:  ≠

    It's still probably a horrible idea to have it in a programming
language, though, unless the original behaviour still also works.


Phil
-- 
AH#61  Wolf#14  BS#89  bus#1  CCB#1  SENS  KOTC#4       philb@philb.ca
http://philb.ca         EKIII rides with me:  http://eddiekieger.com

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


#110172 — Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

FromRustom Mody <rustompmody@gmail.com>
Date2016-06-19 22:03 -0700
SubjectRe: ASCII or Unicode? (was best text editor for programming Python on a Mac)
Message-ID<cbcc3abd-7338-4c6b-bdf9-a436683639b9@googlegroups.com>
In reply to#110169
On Monday, June 20, 2016 at 10:01:00 AM UTC+5:30, Phil Boutros wrote:
> Steven D'Aprano  wrote:
> >
> > Quote:
> >
> > "Why do we have to write x!=y then argue about the status of x<>y when we
> > can simply write x≠y?"
> >
> > "Simply"?
> >
> > This is how I write x≠y from scratch:
> <snip long, arduous process>
> 
>     To wrap this back full circle, here's how it's done on vim:  
> 
> Ctrl-K, =, ! (last two steps interchangeable).  Done.  Result:  ≠

Are these 'shortcuts' parameterizable?

> 
>     It's still probably a horrible idea to have it in a programming
> language, though, unless the original behaviour still also works.

That goes without saying:
Gradual evolutionary changes are more likely to be lasting than violent
revolutionary ones.

Which evolution is already happening:

Fortress: https://umbilicus.wordpress.com/2009/10/16/fortress-parallel-by-default/
[unfortunately died along with its patron Sun microsystems]

Agda: http://mazzo.li/posts/AgdaSort.html
which is based on Haskell but cleans up
-> to →
forall to ∀
In addition to allowing arbitrary operators like ≈

Julia: http://iaindunning.com/blog/julia-unicode.html

And of course the original APL: http://aplwiki.com/FinnAplIdiomLibrary

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


#110177 — Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

FromRandom832 <random832@fastmail.com>
Date2016-06-20 02:04 -0400
SubjectRe: ASCII or Unicode? (was best text editor for programming Python on a Mac)
Message-ID<mailman.148.1466402662.2288.python-list@python.org>
In reply to#110172
On Mon, Jun 20, 2016, at 01:03, Rustom Mody wrote:
> > Ctrl-K, =, ! (last two steps interchangeable).  Done.  Result:  ≠
> 
> Are these 'shortcuts' parameterizable?

They originate from RFC 1345, with the extension that they can be
reversed if the reverse doesn't itself exist as a RFC 1345 combination.

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


#110200 — Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

FromRustom Mody <rustompmody@gmail.com>
Date2016-06-20 07:00 -0700
SubjectRe: ASCII or Unicode? (was best text editor for programming Python on a Mac)
Message-ID<2575d623-e9e8-430f-b243-c9e8c1f736f3@googlegroups.com>
In reply to#110177
On Monday, June 20, 2016 at 11:34:36 AM UTC+5:30, Random832 wrote:
> On Mon, Jun 20, 2016, at 01:03, Rustom Mody wrote:
> > > Ctrl-K, =, ! (last two steps interchangeable).  Done.  Result:  ≠
> > 
> > Are these 'shortcuts' parameterizable?
> 
> They originate from RFC 1345, with the extension that they can be
> reversed if the reverse doesn't itself exist as a RFC 1345 combination.

Thanks!
Useful reference even though old

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


#110183 — Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-20 00:57 -0700
SubjectRe: ASCII or Unicode? (was best text editor for programming Python on a Mac)
Message-ID<e60d5bf2-7c72-4f92-b74c-925b94b1be5d@googlegroups.com>
In reply to#110169
On Monday, June 20, 2016 at 4:31:00 PM UTC+12, Phil Boutros wrote:
>
> Steven D'Aprano wrote:
>>
>> This is how I write x≠y from scratch:
> <snip long, arduous process>
> 
>     To wrap this back full circle, here's how it's done on vim:  
> 
> Ctrl-K, =, ! (last two steps interchangeable).  Done.  Result:  ≠

Standard Linux sequence: compose-slash-equals (or compose-equals-slash). Works in every sensible editor, terminal emulator, text-input field in web browsers and other GUI apps. In short, everywhere.

<http://wiki.wlug.org.nz/ComposeKey>

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


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

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


csiph-web