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


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

Which Python editor has this feature?

Started byjfong@ms4.hinet.net
First post2016-01-10 17:59 -0800
Last post2016-01-26 16:09 -0200
Articles 20 on this page of 32 — 12 participants

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


Contents

  Which Python editor has this feature? jfong@ms4.hinet.net - 2016-01-10 17:59 -0800
    Re: Which Python editor has this feature? Chris Angelico <rosuav@gmail.com> - 2016-01-11 13:58 +1100
      Re: Which Python editor has this feature? jfong@ms4.hinet.net - 2016-01-11 03:04 -0800
        Re: Which Python editor has this feature? Terry Reedy <tjreedy@udel.edu> - 2016-01-11 16:21 -0500
          Re: Which Python editor has this feature? jfong@ms4.hinet.net - 2016-01-11 17:51 -0800
            Re: Which Python editor has this feature? Terry Reedy <tjreedy@udel.edu> - 2016-01-12 02:55 -0500
              Re: Which Python editor has this feature? wxjmfauth@gmail.com - 2016-01-12 00:28 -0800
                Re: Which Python editor has this feature? jfong@ms4.hinet.net - 2016-01-12 17:27 -0800
                  Re: Which Python editor has this feature? Chris Angelico <rosuav@gmail.com> - 2016-01-13 12:51 +1100
                  Re: Which Python editor has this feature? Steven D'Aprano <steve@pearwood.info> - 2016-01-13 13:04 +1100
                    Re: Which Python editor has this feature? wxjmfauth@gmail.com - 2016-01-13 00:04 -0800
                    Re: Which Python editor has this feature? wxjmfauth@gmail.com - 2016-01-13 07:24 -0800
              Re: Which Python editor has this feature? jfong@ms4.hinet.net - 2016-01-12 17:20 -0800
                Re: Which Python editor has this feature? Terry Reedy <tjreedy@udel.edu> - 2016-01-13 04:10 -0500
                  Re: Which Python editor has this feature? jfong@ms4.hinet.net - 2016-01-13 16:48 -0800
        Re: Which Python editor has this feature? Chris Angelico <rosuav@gmail.com> - 2016-01-12 11:14 +1100
        Re: Which Python editor has this feature? Bernardo Sulzbach <mafagafogigante@gmail.com> - 2016-01-11 22:55 -0200
          Re: Which Python editor has this feature? Grant Edwards <invalid@invalid.invalid> - 2016-01-12 18:31 +0000
        Re: Which Python editor has this feature? Chris Angelico <rosuav@gmail.com> - 2016-01-12 12:09 +1100
        Re: Which Python editor has this feature? Terry Reedy <tjreedy@udel.edu> - 2016-01-12 03:27 -0500
        Re: Which Python editor has this feature? Chris Angelico <rosuav@gmail.com> - 2016-01-12 21:18 +1100
        Re: Which Python editor has this feature? Terry Reedy <tjreedy@udel.edu> - 2016-01-13 04:05 -0500
        Re: Which Python editor has this feature? Chris Angelico <rosuav@gmail.com> - 2016-01-13 21:09 +1100
    Re: Which Python editor has this feature? Tim Chase <python.list@tim.thechases.com> - 2016-01-10 20:37 -0600
      Re: Which Python editor has this feature? jfong@ms4.hinet.net - 2016-01-11 03:08 -0800
        Re: Which Python editor has this feature? Tim Chase <python.list@tim.thechases.com> - 2016-01-11 05:59 -0600
    Re: Which Python editor has this feature? Rustom Mody <rustompmody@gmail.com> - 2016-01-10 19:49 -0800
      Re: Which Python editor has this feature? Frank Haun <fh@fhaun.de> - 2016-01-11 11:54 +0000
    Re: Which Python editor has this feature? Gordon Levi <gordon@address.invalid> - 2016-01-11 19:40 +1100
      Re: Which Python editor has this feature? jfong@ms4.hinet.net - 2016-01-11 03:16 -0800
      Re: Which Python editor has this feature? Fabio Zadrozny <fabiofz@gmail.com> - 2016-01-26 16:10 -0200
    Re: Which Python editor has this feature? Fabio Zadrozny <fabiofz@gmail.com> - 2016-01-26 16:09 -0200

Page 1 of 2  [1] 2  Next page →


#101454 — Which Python editor has this feature?

Fromjfong@ms4.hinet.net
Date2016-01-10 17:59 -0800
SubjectWhich Python editor has this feature?
Message-ID<830f6f97-22dd-488c-9dd6-e9cd92844307@googlegroups.com>
It lets you jump between the current cursor position and the line the upper level indentation start, something like the bracket matching in C editor. Because of Python use indentation as its code block mark, It might be helpful if we can jump between different level of it:-)


--Jach Fong

[toc] | [next] | [standalone]


#101455

FromChris Angelico <rosuav@gmail.com>
Date2016-01-11 13:58 +1100
Message-ID<mailman.0.1452481145.13488.python-list@python.org>
In reply to#101454
On Mon, Jan 11, 2016 at 12:59 PM,  <jfong@ms4.hinet.net> wrote:
> It lets you jump between the current cursor position and the line the upper level indentation start, something like the bracket matching in C editor. Because of Python use indentation as its code block mark, It might be helpful if we can jump between different level of it:-)

I coded this up as a patch for SciTE/Scintilla at one point, but it
didn't get accepted. It was used for a while at my work, but never
really settled in as being useful. Python code tends not to be as big
and complex as C code often is, so it's not as useful to have a
feature like this.

If you want it, I can probably hunt down the patch file somewhere.

ChrisA

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


#101472

Fromjfong@ms4.hinet.net
Date2016-01-11 03:04 -0800
Message-ID<5f1619e5-83ff-449e-b7e5-2374a37bd50b@googlegroups.com>
In reply to#101455
Chris Angelico at 2016/1/11  UTC+8 10:59:47AM wrote:
> On Mon, Jan 11, 2016 at 12:59 PM,  <jfong@ms4.hinet.net> wrote:
> > It lets you jump between the current cursor position and the line the upper level indentation start, something like the bracket matching in C editor. Because of Python use indentation as its code block mark, It might be helpful if we can jump between different level of it:-)
> 
> I coded this up as a patch for SciTE/Scintilla at one point, but it
> didn't get accepted. It was used for a while at my work, but never
> really settled in as being useful. Python code tends not to be as big
> and complex as C code often is, so it's not as useful to have a
> feature like this.
> 
> If you want it, I can probably hunt down the patch file somewhere.
> 
> ChrisA

I am studying the PyUSB package now as the learning object of how to write a Python program in a "formal" way. In those modules, there are many comment inserted between codes to explain what it does. It's good to the user comprehension, but also easily makes a Class size expanded to over 100 lines. Also many Classes has the same named method such as __getitem__ etc. When searching a specific name I usually have to roll back the screen a few times to find out what Class I am looking at. That's really annoy.

But, just like you said, this feature may be not so useful to a Python programmer. I should try the editor I am using now to see if I can "patch" a such feature, just as you had did on SciTE before:-)

--Jach

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


#101490

FromTerry Reedy <tjreedy@udel.edu>
Date2016-01-11 16:21 -0500
Message-ID<mailman.22.1452547329.13488.python-list@python.org>
In reply to#101472
On 1/11/2016 6:04 AM, jfong@ms4.hinet.net wrote:

> I am studying the PyUSB package now as the learning object of how to
> write a Python program in a "formal" way. In those modules, there are
> many comment inserted between codes to explain what it does. It's
> good to the user comprehension, but also easily makes a Class size
> expanded to over 100 lines. Also many Classes has the same named
> method such as __getitem__ etc. When searching a specific name I
> usually have to roll back the screen a few times to find out what
> Class I am looking at. That's really annoy.

IDLE has an optional 'code context' feature that shows header lines that 
have scrolled up off the top of the screen.  This would let you see 
which class you are in,

In current releases, Code Context is configured in the Extensions tab of 
the Settings dialog.  For previous releases after Aug 2014, it was 
configured in the separate Extensions dialog.

The most important setting is the (fixed) number of lines in the context 
box (default 3).  I would like to make the box re-size as needed, so the 
outermost context (like the class statement) is always visible without 
using more screen space than needed.

The context is currently read-only.  Clicking on context lines does 
nothing.  As a result of this thread, I am thinking that clicking on a 
context line should scroll up the main text window to display that line 
at the top (and remove that line and any below from the context box).  I 
*think* that this should be fairly easy.

-- 
Terry Jan Reedy

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


#101511

Fromjfong@ms4.hinet.net
Date2016-01-11 17:51 -0800
Message-ID<a222eb02-e5c3-46e1-9713-6ec6d000c753@googlegroups.com>
In reply to#101490
Terry Reedy at 2016/1/12 UTC+8 5:22:35AM wrote:
> IDLE has an optional 'code context' feature that shows header lines that 
> have scrolled up off the top of the screen.  This would let you see 
> which class you are in,

Thanks, Terry. It's just what I am looking for:-)
By the way, do you know how to open file in a new tab, instead of in a separate window, in the IDLE editor?

--Jach Fong

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


#101523

FromTerry Reedy <tjreedy@udel.edu>
Date2016-01-12 02:55 -0500
Message-ID<mailman.41.1452585347.13488.python-list@python.org>
In reply to#101511
On 1/11/2016 8:51 PM, jfong@ms4.hinet.net wrote:
> Terry Reedy at 2016/1/12 UTC+8 5:22:35AM wrote:
>> IDLE has an optional 'code context' feature that shows header lines that
>> have scrolled up off the top of the screen.  This would let you see
>> which class you are in,
>
> Thanks, Terry. It's just what I am looking for:-)
> By the way, do you know how to open file in a new tab, instead of in a separate window, in the IDLE editor?

Revamping IDLE to 1. use ttk widgets and 2. become a modern single 
window app with multiple panes, including a tabbed editor pane, is a 
goal for 2016.


-- 
Terry Jan Reedy

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


#101529

Fromwxjmfauth@gmail.com
Date2016-01-12 00:28 -0800
Message-ID<256a4818-859e-46a1-9dee-6157a2dda23f@googlegroups.com>
In reply to#101523
IDLE ?
I need less than 10 seconds to make it crash.

The interesting aspect is not only to show that it crashes,
the very interesting point is to explain why it is crashing.

I doubt, this will change in a not too far future (unfortunately).

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


#101581

Fromjfong@ms4.hinet.net
Date2016-01-12 17:27 -0800
Message-ID<e5082523-ac37-45f8-b98a-6e5bef8858c3@googlegroups.com>
In reply to#101529
wxjm...@gmail.com at 2016/1/月12 4:29:08PM wrote:
> IDLE ?
> I need less than 10 seconds to make it crash.

Unwittingly or intentionally?

> The interesting aspect is not only to show that it crashes,
> the very interesting point is to explain why it is crashing.

Can you tell us (in a separate subject title)? I am willing to learn every aspects of Python.

--Jach Fong

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


#101584

FromChris Angelico <rosuav@gmail.com>
Date2016-01-13 12:51 +1100
Message-ID<mailman.87.1452649879.13488.python-list@python.org>
In reply to#101581
On Wed, Jan 13, 2016 at 12:27 PM,  <jfong@ms4.hinet.net> wrote:
> wxjm...@gmail.com at 2016/1/月12 4:29:08PM wrote:
>> IDLE ?
>> I need less than 10 seconds to make it crash.
>
> Unwittingly or intentionally?
>
>> The interesting aspect is not only to show that it crashes,
>> the very interesting point is to explain why it is crashing.
>
> Can you tell us (in a separate subject title)? I am willing to learn every aspects of Python.

Take no notice of the troll.

ChrisA

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


#101587

FromSteven D'Aprano <steve@pearwood.info>
Date2016-01-13 13:04 +1100
Message-ID<5695b0bc$0$1586$c3e8da3$5496439d@news.astraweb.com>
In reply to#101581
On Wed, 13 Jan 2016 12:27 pm, jfong@ms4.hinet.net wrote:

> wxjm...@gmail.com at 2016/1/月12 4:29:08PM wrote:
>> IDLE ?
>> I need less than 10 seconds to make it crash.
> 
> Unwittingly or intentionally?
> 
>> The interesting aspect is not only to show that it crashes,
>> the very interesting point is to explain why it is crashing.
> 
> Can you tell us (in a separate subject title)? I am willing to learn every
> aspects of Python.

Pay no attention to wxjmfauth, he is our resident troll who is obsessed with
Python's Unicode implementation.

When he says "make it crash", he means "raise an exception", which is
absolutely trivial. We can all make Python raise an exception in a fraction
of a second:

1/0

will do it. Or if you prefer to stick to unicode:

u'£'.encode('ascii')


wxjmfauth's obsession started with an alpha release of Python 3.3 that had a
small performance decrease for some operations on non-ASCII characters
under some circumstances. He has taken this tiny decrease in performance as
proof of some grand conspiracy that the Python developers hate non-English
speaking Europeans (he never seems to care about Asians or other non-Latin
based characters, only French and other European ones) and that this small
performance decrease shows that Python can't do Unicode.

I think that is fair to say that he is what the English call "a nutter".


-- 
Steven

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


#101593

Fromwxjmfauth@gmail.com
Date2016-01-13 00:04 -0800
Message-ID<9a539fa2-e777-4e6a-a4a6-69347f91d798@googlegroups.com>
In reply to#101587
The unicode handling in Python and its "character encoding
model" is wrong by design [*].

- It is so wrong that it may lead to Python crashes.
- If you are lucky, it may *wrongly* raise an "UnicodeError"
with a valid string (consequence of [*]).
- Latin characters are very appropriate to illustrate
this guilty behaviour (also a consequence of [*]).
- Plus plenty of other consequences (due to [*]).

Steven: If you do not see it or do not understand it,
I can not help.

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


#101620

Fromwxjmfauth@gmail.com
Date2016-01-13 07:24 -0800
Message-ID<e06e00ac-2d93-4301-9fbf-103b324f1e8b@googlegroups.com>
In reply to#101587
Le mercredi 13 janvier 2016 03:05:04 UTC+1, Steven D'Aprano a écrit :
> On Wed, 13 Jan 2016 12:27 pm, jfong@ms4.hinet.net wrote:
> 
> > wxjm...@gmail.com at 2016/1/月12 4:29:08PM wrote:
> >> IDLE ?
> >> I need less than 10 seconds to make it crash.
> > 
> > Unwittingly or intentionally?
> > 
> >> The interesting aspect is not only to show that it crashes,
> >> the very interesting point is to explain why it is crashing.
> > 
> > Can you tell us (in a separate subject title)? I am willing to learn every
> > aspects of Python.
> 
> Pay no attention to wxjmfauth, he is our resident troll who is obsessed with
> Python's Unicode implementation.
> 
> When he says "make it crash", he means "raise an exception", which is
> absolutely trivial. We can all make Python raise an exception in a fraction
> of a second:
> 
> 1/0
> 
> will do it. Or if you prefer to stick to unicode:
> 
> u'£'.encode('ascii')
> 
> 
> wxjmfauth's obsession started with an alpha release of Python 3.3 that had a
> small performance decrease for some operations on non-ASCII characters
> under some circumstances. He has taken this tiny decrease in performance as
> proof of some grand conspiracy that the Python developers hate non-English
> speaking Europeans (he never seems to care about Asians or other non-Latin
> based characters, only French and other European ones) and that this small
> performance decrease shows that Python can't do Unicode.
> 
> I think that is fair to say that he is what the English call "a nutter".
> 
> 
> -- 
> Steven

You are a clever guy and and an experemented Python user.
I'm convinced that, you know, I'm right.

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


#101578

Fromjfong@ms4.hinet.net
Date2016-01-12 17:20 -0800
Message-ID<e157c4ed-3c5b-476f-9e0f-a95dc2bb7c41@googlegroups.com>
In reply to#101523
Terry Reedy at 2016/1/12 UTC+8 3:56:03PM wrote:
> Revamping IDLE to 1. use ttk widgets and 2. become a modern single 
> window app with multiple panes, including a tabbed editor pane, is a 
> goal for 2016.

That will be great, I'm looking forward to it.

By the way, when I was playing around with the IDLE editor yesterday, I had noticed that during the time the "Search Dialog" was opened, "Find Next" button will not highlight the item searched, unless the dialog was closed.

--Jach Fong

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


#101598

FromTerry Reedy <tjreedy@udel.edu>
Date2016-01-13 04:10 -0500
Message-ID<mailman.93.1452676505.13488.python-list@python.org>
In reply to#101578
On 1/12/2016 8:20 PM, jfong@ms4.hinet.net wrote:
> Terry Reedy at 2016/1/12 UTC+8 3:56:03PM wrote:
>> Revamping IDLE to 1. use ttk widgets and 2. become a modern single
>> window app with multiple panes, including a tabbed editor pane, is
>> a goal for 2016.
>
> That will be great, I'm looking forward to it.
>
> By the way, when I was playing around with the IDLE editor yesterday,
> I had noticed that during the time the "Search Dialog" was opened,
> "Find Next" button will not highlight the item searched, unless the
> dialog was closed.

This was a Windows specific problem that was fixed (for me) in all three 
recent (last November/December) bugfix releases.  If you have a problem 
with *current* IDLE, I would like to know.

-- 
Terry Jan Reedy

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


#101649

Fromjfong@ms4.hinet.net
Date2016-01-13 16:48 -0800
Message-ID<25f77bd2-9665-4119-a1e2-ad3745fc6280@googlegroups.com>
In reply to#101598
Terry Reedy at 2016/1/13 UTC+8 5:15:20PM wrote:
> This was a Windows specific problem that was fixed (for me) in all three 
> recent (last November/December) bugfix releases.  If you have a problem 
> with *current* IDLE, I would like to know.

I download/install the latest version 3.4.4 and it works perfectly.

It surprise me that how Python society is so active. I had version 3.4.3 installed 4 months ago and now this problem had already been taken care of:-) Thank you.

--Jach Fong

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


#101501

FromChris Angelico <rosuav@gmail.com>
Date2016-01-12 11:14 +1100
Message-ID<mailman.30.1452557708.13488.python-list@python.org>
In reply to#101472
On Tue, Jan 12, 2016 at 8:21 AM, Terry Reedy <tjreedy@udel.edu> wrote:
>
> The context is currently read-only.  Clicking on context lines does nothing.
> As a result of this thread, I am thinking that clicking on a context line
> should scroll up the main text window to display that line at the top (and
> remove that line and any below from the context box).  I *think* that this
> should be fairly easy.

That'd be pretty cool.

Next IDLE feature request: Can you make it so that, across all
platforms, it magically installs PostgreSQL and psycopg2? That would
solve so many of my students' problems...

ChrisA

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


#101506

FromBernardo Sulzbach <mafagafogigante@gmail.com>
Date2016-01-11 22:55 -0200
Message-ID<mailman.34.1452560197.13488.python-list@python.org>
In reply to#101472
On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico <rosuav@gmail.com> wrote:
>
> Next IDLE feature request: Can you make it so that, across all
> platforms, it magically installs PostgreSQL and psycopg2? That would
> solve so many of my students' problems...
>

Wouldn't this make the installer much bigger?

-- 
Bernardo Sulzbach

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


#101567

FromGrant Edwards <invalid@invalid.invalid>
Date2016-01-12 18:31 +0000
Message-ID<n73gpk$drr$4@reader1.panix.com>
In reply to#101506
On 2016-01-12, Bernardo Sulzbach <mafagafogigante@gmail.com> wrote:
> On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico <rosuav@gmail.com> wrote:
>>
>> Next IDLE feature request: Can you make it so that, across all
>> platforms, it magically installs PostgreSQL and psycopg2? That would
>> solve so many of my students' problems...
>>
>
> Wouldn't this make the installer much bigger?

Whoosh!

-- 
Grant Edwards               grant.b.edwards        Yow! I feel like I am
                                  at               sharing a ``CORN-DOG''
                              gmail.com            with NIKITA KHRUSCHEV ...

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


#101508

FromChris Angelico <rosuav@gmail.com>
Date2016-01-12 12:09 +1100
Message-ID<mailman.36.1452560990.13488.python-list@python.org>
In reply to#101472
On Tue, Jan 12, 2016 at 11:55 AM, Bernardo Sulzbach
<mafagafogigante@gmail.com> wrote:
> On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico <rosuav@gmail.com> wrote:
>>
>> Next IDLE feature request: Can you make it so that, across all
>> platforms, it magically installs PostgreSQL and psycopg2? That would
>> solve so many of my students' problems...
>>
>
> Wouldn't this make the installer much bigger?

Yes, and it's also completely and utterly inappropriate. But I am
seeing a lot of cool magic getting added to Idle. Since I met Python,
it's gone from being "well, yeah, Python *does* include a GUI, but
it's pretty unexciting compared to others" to "Python includes a
pretty decent editor, but it's (unsurprisingly) Python-specific, so I
don't use it for multilingual work".

Shout-out to Terry and the other Idle devs for the work they've put in. Thanks!

ChrisA

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


#101528

FromTerry Reedy <tjreedy@udel.edu>
Date2016-01-12 03:27 -0500
Message-ID<mailman.47.1452587282.13488.python-list@python.org>
In reply to#101472
On 1/11/2016 8:09 PM, Chris Angelico wrote:
> On Tue, Jan 12, 2016 at 11:55 AM, Bernardo Sulzbach
> <mafagafogigante@gmail.com> wrote:
>> On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico <rosuav@gmail.com> wrote:
>>>
>>> Next IDLE feature request: Can you make it so that, across all
>>> platforms, it magically installs PostgreSQL and psycopg2? That would
>>> solve so many of my students' problems...

I detect an invisible smiley at the end of that.

PostgresSQL is not a Python package, hence would need a custom script to 
download and invoke, and would probably need user clicks anyway, at 
least on Windows.  Does/could psycopg2 have such for installing its 
dependency?

Can psycopg2 be installed with pip?  There is an issue (#23551) to make 
a pip GUI and make it accessible from IDLE.  We need someone with both 
pip and tkinter knowledge to either design and write it or mentor a GSOC 
student to do so.  One written, I would add an IDLE menu item to run it, 
in a separate process, just as done now with turtledemo.

>> Wouldn't this make the installer much bigger?

See invisible smiley ;-).

> Yes, and it's also completely and utterly inappropriate. But I am
> seeing a lot of cool magic getting added to Idle. Since I met Python,
> it's gone from being "well, yeah, Python *does* include a GUI, but
> it's pretty unexciting compared to others" to "Python includes a
> pretty decent editor, but it's (unsurprisingly) Python-specific, so I
> don't use it for multilingual work".
>
> Shout-out to Terry and the other Idle devs for the work they've put in.
 > Thanks!

Thank *you*.  It is sometimes thankless work.

-- 
Terry Jan Reedy

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


Page 1 of 2  [1] 2  Next page →

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


csiph-web