[issue41000] IDLE: only allow single instance

2020-07-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

We cannot prevent files being viewed and possibly modified by multiple programs 
and in general, should not.  I often open a file in more than one python 
version.  In any case, the proposed change would have a high chance on 
introducing bugs.  I just finished (I hope) repairing regressions in 3.8.4.  
And 

There are, however, two real issues.  One is being able to reload a file, 
either because it has been changed on disk or because one want to abandon edits 
since the last save.  The other is detecting when a file might need to be 
reloaded because of external changes.

Reloading is the subject of #1721083 (from 2007).  I just outlined a easy fix 
there. The hard part is adding tests for the affected method.  You can do that 
if you want, and say so before I do it.

Detecting file changes like Notepad++ does would be a different issue.

#38946 is about Catalina making incompatible changes in Apple graphics so that 
tcl/tk does not work as well as it does in Mohave.

To me, the main blocker for multiple tabs is separating editor frames with a 
text widget from editor windows with a menu.  And the need to refactor the 
hierarchy of text frames.  And to stop duplicating per class objects as per 
instance objects.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41000] IDLE: only allow single instance

2020-07-27 Thread E. Paine


E. Paine  added the comment:

Is it worth me developing a PR for this issue, as it may be a suitable fix for 
#38946? (I am not guaranteeing any code, though, but I will try). If not, I 
will probably close this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41000] IDLE: only allow single instance

2020-06-17 Thread E. Paine


E. Paine  added the comment:

I appreciate your concerns Terry and I guess I must start by saying as much as 
I like notepad++, I don't like how their instances work. This issue shouldn't 
change any behaviour (from a user's perspective) other than not being able to 
open the same file twice.

The idea is that each group (what we pretend is an instance) will be almost 
completely self-contained. Each instance will have its own shell (they will not 
share, etc.) and the windowed design will remain (for now...).

What they will share is the main tkinter root (Tk instance) and the bottom 
layer of a stack-like file-list system (which I failed to properly describe in 
the original message). Calls will only descend the stack as far as necessary, 
but it allows one group to bring another group's editor to the front when the 
file tries to open a second time (like how an instance can raise any of its 
editors).

The finer details are yet to be confirmed as I don't have any code, but it is 
likely that settings will take effect immediately across all groups and I have 
yet to decide whether the 'window' menu should be unified of per-group.

I understand that the immediate benefits of this issue are not worth the change 
required, however I believe it would be highly beneficial going forward for 
groups to be able to communicate (like my previous example of creating a tabbed 
interface).

--
title: IDLE only allow single instance -> IDLE: only allow single instance

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41000] IDLE only allow single instance

2020-06-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am somewhat dubious about this.  IDLE *must* allow side-by-side windows.  
AFAIK, single instance Notepad++ does not allow this.  Tiles rather than only 
tabbed windows can potentially be done with with one process (turtledemo), but 
we are not there yet.  I have no idea how easy it is to enforce 'one process' 
across platforms.

--
versions:  -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41000] IDLE only allow single instance

2020-06-17 Thread E. Paine


E. Paine  added the comment:

Sorry, I feel I need to clarify. When I say "... requires ... #40893 to be 
pulled ..." I mean that that would be the preferred way to transfer tabs. If 
TkDND is not available, or the version is a backport (which wouldn't have the 
bindings) then tab transfer will use Toplevels instead. The preferred method 
would be TkDND, but any change should not require it to provide full 
functionality.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41000] IDLE only allow single instance

2020-06-17 Thread E. Paine


New submission from E. Paine :

I propose that IDLE only allows a single instance, but behaves mostly like 
before (multiple shells, etc.). The main motivation for this issue is to (1) 
stop the same file being opened more than once and (2) make a tabbed interface 
easier to implement.

Starting with point (1), believe a file should not be allowed to be opened 
multiple times but enforcing this currently in IDLE would be incredibly 
difficult.

Instead, I propose that a socket-server sits on the main instance and any new 
instances send requests to the main instance (to open a file in a new 
'instance'). There would be two layers of file-lists, and the current one still 
acts as an 'instance' file-list but we also create a master list which controls 
all of the 'instances':

Instance flist  Instance flist
 |   |
  Master flist 

Secondly, point (2). I am currently in the planning phase of creating an IDLE 
tabbed interface (based loosely off the code currently found in #9262) but it 
requires both this issue and #40893 to be pulled before it can work effectively 
(dragging tabs between windows, etc.).

I don't currently have any code to propose, but I don't think it should be 
*too* difficult to implement (but now I've said that!...).

--
assignee: terry.reedy
components: IDLE
messages: 371722
nosy: epaine, taleinat, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE only allow single instance
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com