Re: idlelib re-use

2021-01-29 Thread Robin Becker

Thanks,

On 28/01/2021 19:57, Terry Reedy wrote:

On 1/28/2021 5:53 AM, Robin Becker wrote:
I googled in vain for instances where parts of idlelib are re-used in a simplistic way. I would like to use the editor 
functionality in a tkinter window and also probably run code in a subprocess.


Are there any examples around that do these sorts of things?


turtledemo reuses IDLE's colorizer and read-only textviews.  I have seen occasional hints on stackoverflow of other such 
uses.


One barrier to reuse is that the parts are highly interconnected, with numerous import loops.  (Changing the form of 
some imports from 'import x' to 'from x import y' can make IDLE startup fail.)  Some objects, like EditorWindow, are too 
monolithic.  You cannot put a toplevel inside another toplevel.




yes I found this out trying to reuse the editor window and shell.

Another, for those thinking long term, is that implementation modules in idlelib are defined as private since 3.6 
(PEP-434, idlelib.__init__).  I pushed for this in order to be able to refactor to reduce interconnections, and break 
some things apart, and also to switch to ttk widgets.


For instance, breaking EditorFrame apart from EditorWindow would allow me to put multiple editors on multiple tabs of a 
notebook in an application window.  It would also allow others to put an editor window in their tkinter window.


+1
--
Robin Becker

--
https://mail.python.org/mailman/listinfo/python-list


Reinstalling

2021-01-29 Thread Rafael Llera
Good day;

I installed Python3.9.1 and PyCharm two days ago and did a basic tutorial
and all went well.  My laptop got glitchy and I decided to uninstall and
reinstall both apps (don't ask).

Now I am having problems starting a project with the interpreter,  I cannot
find python3.

I just uninstalled both apps again and found a lot of *.pyc files, my
questions would it help to delete them all before reinstalling again, or is
this a different issue.  thank you in advance.

best regards,
Rafael
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Reinstalling

2021-01-29 Thread Mats Wichmann

On 1/29/21 11:29 AM, Rafael Llera wrote:

Good day;

I installed Python3.9.1 and PyCharm two days ago and did a basic tutorial
and all went well.  My laptop got glitchy and I decided to uninstall and
reinstall both apps (don't ask).

Now I am having problems starting a project with the interpreter,  I cannot
find python3.

I just uninstalled both apps again and found a lot of *.pyc files, my
questions would it help to delete them all before reinstalling again, or is
this a different issue.  thank you in advance.


different issue. not finding the interpreter is pretty much always a 
path issue.


You don't say which operating system you're using.  There are pages for 
the three main ones in the docs that might help, linked off of here:


https://docs.python.org/3/using/

If this is a problem *inside* PyCharm, you probably just have to 
re-teach it where to find an interpreter, whether to use a virtualenv, 
etc. PyCharm has decent enough docs on that if you just look for 
interpreter.





--
https://mail.python.org/mailman/listinfo/python-list