Re: IDLE: clearing the screen

2024-06-10 Thread Michael F. Stemper via Python-list

On 08/06/2024 14.18, Rob Cliffe wrote:

OK, here is the advanced version:
import os
class _cls(object):
     def __repr__(self):
         os.system('cls')
         return ''
cls = _cls()

Now when you type
cls
it clears the screen.  The only flaw is that there is a blank line at the very top of the screen, 
and the ">>>" prompt appears on the SECOND line.
(This blank line is because the IDLE prints the blank value returned by "return 
''" and adds a newline to it, as it does when printing the value of any expression.)


Why have it return anything at all?

--
Michael F. Stemper
Indians scattered on dawn's highway bleeding;
Ghosts crowd the young child's fragile eggshell mind.

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


Re: IDLE: clearing the screen

2024-06-10 Thread Michael F. Stemper via Python-list

On 10/06/2024 09.32, Stefan Ram wrote:

"Michael F. Stemper"  wrote or quoted:

On 08/06/2024 14.18, Rob Cliffe wrote:

OK, here is the advanced version:
import os
class _cls(object):
      def __repr__(self):
          os.system('cls')
          return ''
cls = _cls()

...

Why have it return anything at all?


   Because __repr__ needs to return a str.


Got it. Thanks for clarifying.

--
Michael F. Stemper
87.3% of all statistics are made up by the person giving them.

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


Re: IDLE: clearing the screen

2024-06-09 Thread Alan Gauld via Python-list
On 08/06/2024 20:18, Rob Cliffe via Python-list wrote:
> OK, here is the advanced version:
> import os
> class _cls(object):
>      def __repr__(self):
>          os.system('cls')
>          return ''
> cls = _cls()
> 
> Now when you type
> cls
> it clears the screen.  

For me on a Mac it clears the terminal screen that I used
to launch IDLE and prints a single blank line on the IDLE
shell. (And I have to use "clear" instead of "cls" of course.

A quick Google suggests that printing Ctrl-L (formfeed?) might
be a platform agnostic solution. But that didn't work for me
in IDLE either. I think this is one where the best bet is to go
into the IDLE code and add a Shell submenu to clear screen!
Apparently it's been on the workstack at idle-dev for a long
time but is considered low priority...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


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


Re: IDLE: clearing the screen

2024-06-08 Thread Rob Cliffe via Python-list

OK, here is the advanced version:
import os
class _cls(object):
    def __repr__(self):
        os.system('cls')
        return ''
cls = _cls()

Now when you type
cls
it clears the screen.  The only flaw is that there is a blank line at 
the very top of the screen, and the ">>>" prompt appears on the SECOND 
line.
(This blank line is because the IDLE prints the blank value returned by 
"return ''" and adds a newline to it, as it does when printing the value 
of any expression.)


Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list


Re: Fwd: IDLE: clearing the screen

2024-06-05 Thread Rob Cliffe via Python-list



On 05/06/2024 04:09, Cameron Simpson wrote:

On 04Jun2024 22:43, Rob Cliffe  wrote:

import os
def cls(): x=os.system("cls")

Now whenever you type
cls()
it will clear the screen and show the prompt at the top of the screen.

(The reason for the "x=" is: os.system returns a result, in this case 
0.  When you evaluate an expression in the IDE, the IDE prints the 
result.  So without the "x=" you get an extra line at the top of the 
screen containing "0".)


Not if it's in a function, because the IDLE prints the result if it 
isn't None, and your function returns None. So:


    def cls():
    os.system("cls")

should be just fine.


Yes, you're right.
Rob Cliffe

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


Re: Fwd: IDLE: clearing the screen

2024-06-04 Thread Cameron Simpson via Python-list

On 04Jun2024 22:43, Rob Cliffe  wrote:

import os
def cls(): x=os.system("cls")

Now whenever you type
cls()
it will clear the screen and show the prompt at the top of the screen.

(The reason for the "x=" is: os.system returns a result, in this case 
0.  When you evaluate an expression in the IDE, the IDE prints the 
result.  So without the "x=" you get an extra line at the top of the 
screen containing "0".)


Not if it's in a function, because the IDLE prints the result if it 
isn't None, and your function returns None. So:


def cls():
os.system("cls")

should be just fine.
--
https://mail.python.org/mailman/listinfo/python-list


Fwd: IDLE: clearing the screen

2024-06-04 Thread Rob Cliffe via Python-list

Welcome to Python!  A great language for program development.

Answers might be platform-dependent (are you using WIndows, Linux, etc.).
However, the following works for me on WIndows.  You can put it in the 
startup.py file so you don't have to type it every time you start up the 
IDLE.


import os
def cls(): x=os.system("cls")

Now whenever you type
cls()
it will clear the screen and show the prompt at the top of the screen.

(The reason for the "x=" is: os.system returns a result, in this case 
0.  When you evaluate an expression in the IDE, the IDE prints the 
result.  So without the "x=" you get an extra line at the top of the 
screen containing "0".)


I am sure that some jiggery-pokery could be used so you don't have to 
type the "()".  But that's more advanced ...


Best wishes
Rob Cliffe


On 04/06/2024 14:34, Cave Man via Python-list wrote:

Hello everyone,

I am  new to Python, and I have been using IDLE (v3.10.11) to run 
small Python code. However, I have seen that the output scrolls to the 
bottom in the output window.


Is there a way to clear the output window (something like cls in 
command prompt or clear in terminal), so that output stays at the top?



Thanks in anticipation!


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


IDLE: clearing the screen

2024-06-04 Thread Cave Man via Python-list

Hello everyone,

I am  new to Python, and I have been using IDLE (v3.10.11) to run small 
Python code. However, I have seen that the output scrolls to the bottom 
in the output window.


Is there a way to clear the output window (something like cls in command 
prompt or clear in terminal), so that output stays at the top?



Thanks in anticipation!
--
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE editor suggestion.

2023-12-12 Thread MRAB via Python-list

On 2023-12-13 01:28, Steve GS via Python-list wrote:

Does anything from the Visual Studio family of software have a pull down menu 
that lists previous searches so that I don’t have to enter them every time?

SGA

Visual Studio search box has a dropdown list that's shown when you press 
the down arrow key.



-Original Message-
From: Friedrich Romstedt 
Sent: Tuesday, December 12, 2023 12:52 PM
To: Steve GS 
Cc: python-list@python.org
Subject: Re: IDLE editor suggestion.

Hi!

Am Di., 12. Dez. 2023 um 09:28 Uhr schrieb Steve GS via Python-list
:


Maybe this already exists but
I have never seen it in any
editor that I have used.


You might want to choose Microsoft Code from its Visual Studio family of 
software, or, if you're ready for a deep dive, you might try using vim. 
Personally I am using both.

HTH,
Friedrich



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


RE: IDLE editor suggestion.

2023-12-12 Thread Steve GS via Python-list
Does anything from the Visual Studio family of software have a pull down menu 
that lists previous searches so that I don’t have to enter them every time?

SGA

-Original Message-
From: Friedrich Romstedt  
Sent: Tuesday, December 12, 2023 12:52 PM
To: Steve GS 
Cc: python-list@python.org
Subject: Re: IDLE editor suggestion.

Hi!

Am Di., 12. Dez. 2023 um 09:28 Uhr schrieb Steve GS via Python-list
:
>
> Maybe this already exists but
> I have never seen it in any
> editor that I have used.

You might want to choose Microsoft Code from its Visual Studio family of 
software, or, if you're ready for a deep dive, you might try using vim. 
Personally I am using both.

HTH,
Friedrich

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


Re: IDLE editor suggestion.

2023-12-12 Thread Mats Wichmann via Python-list

On 12/12/23 13:50, Thomas Passin via Python-list wrote:

On 2023-12-12 08:22, Steve GS via Python-list wrote:
 > Maybe this already exists but
 > I have never seen it in any
 > editor that I have used.
 >
 > It would be nice to have a
 > pull-down text box that lists
 > all of the searches I have
 > used during this session. It
 > would make editing a lot
 > easier if I could select the
 > previous searches rather than
 > having to enter it every time.
 >
 > If this is inappropriate to
 > post this here, please tell me
 > where to go.
 > Life should be so
 > complicated.
 >
EditPad has this.

So do Notepad++, EditPlus (not free but low cost, Windows only, and very 
good), and I'm sure many others that are much simpler than Visual Studio 
Code, for example.



Every now and then I pop up and suggest people look at Eric.  Odd name 
for an editor? Well, it continues the long pun history in the Python 
world (Eric Idle... get it?).  It has search history, among many other 
things, I think once it was considered to be sort of IDLE++, but it's 
grown to a lot more than that.   Not saying Eric is better-than-XYZ-IDE, 
but it is a cool project...



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


Re: IDLE editor suggestion.

2023-12-12 Thread Thomas Passin via Python-list

On 2023-12-12 08:22, Steve GS via Python-list wrote:
> Maybe this already exists but
> I have never seen it in any
> editor that I have used.
>
> It would be nice to have a
> pull-down text box that lists
> all of the searches I have
> used during this session. It
> would make editing a lot
> easier if I could select the
> previous searches rather than
> having to enter it every time.
>
> If this is inappropriate to
> post this here, please tell me
> where to go.
> Life should be so
> complicated.
>
EditPad has this.

So do Notepad++, EditPlus (not free but low cost, Windows only, and very 
good), and I'm sure many others that are much simpler than Visual Studio 
Code, for example.

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


Re: IDLE editor suggestion.

2023-12-12 Thread Friedrich Romstedt via Python-list
Hi!

Am Di., 12. Dez. 2023 um 09:28 Uhr schrieb Steve GS via Python-list
:
>
> Maybe this already exists but
> I have never seen it in any
> editor that I have used.

You might want to choose Microsoft Code from its Visual Studio family
of software, or, if you're ready for a deep dive, you might try using
vim. Personally I am using both.

HTH,
Friedrich
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE editor suggestion.

2023-12-12 Thread MRAB via Python-list

On 2023-12-12 08:22, Steve GS via Python-list wrote:

Maybe this already exists but
I have never seen it in any
editor that I have used.

It would be nice to have a
pull-down text box that lists
all of the searches I have
used during this session. It
would make editing a lot
easier if I could select the
previous searches rather than
having to enter it every time.

If this is inappropriate to
post this here, please tell me
where to go.
Life should be so
complicated.


EditPad has this.
--
https://mail.python.org/mailman/listinfo/python-list


IDLE editor suggestion.

2023-12-12 Thread Steve GS via Python-list
Maybe this already exists but
I have never seen it in any
editor that I have used.

It would be nice to have a
pull-down text box that lists
all of the searches I have
used during this session. It
would make editing a lot
easier if I could select the
previous searches rather than
having to enter it every time.

If this is inappropriate to
post this here, please tell me
where to go.
Life should be so
complicated.

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


Re: Why does IDLE use a subprocess?

2023-05-31 Thread James Schaffler via Python-list
On Tuesday, May 30th, 2023 at 10:18 PM, Chris Angelico wrote:
> Yep, what you're seeing there is the namespace and nothing else. But
> if you mess with an actual builtin object, it'll be changed for the
> other interpreter too.
> 
> > > > import ctypes
> > > > ctypes.cast(id(42), ctypes.POINTER(ctypes.c_int))[6] = 43
> > > > 41+1
> 
> 43
> 
> > > > from code import InteractiveInterpreter
> > > > interp = InteractiveInterpreter()
> > > > interp.runcode("print(41+1)")
> 
> 43
> 
> (Note that this only works in CPython and only with integers small
> enough to be in the cache, meaning that there is only one such object
> representing that integer.)
> 
> The same is true of C extensions, which often have their own internal
> state, and that state isn't isolated to a single interpreter.
> 
> Better isolation is coming with PEP 554
> https://peps.python.org/pep-0554/ which also has some great
> information about what currently is NOT isolated. (Also, even then,
> some things won't be fully isolated; I think that the ctypes trick
> above might still affect a subinterpreter even in a post-PEP554
> world.)

Amazing example! Thank you everyone for the detailed responses - will be sure 
to check out the PEP as well.

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


Re: Why does IDLE use a subprocess?

2023-05-30 Thread Chris Angelico
On Wed, 31 May 2023 at 12:03, James Schaffler via Python-list
 wrote:
>
> On Tuesday, May 30th, 2023 at 9:14 PM, Greg Ewing wrote:
> > Globals you create by executing code in the REPL have their own
> > namespace. But everything else is shared -- builtins, imported
> > Python modules, imported C extension modules, etc. etc.
>
> Thanks for the explanation. Could you elaborate on precisely how "everything 
> else is shared"? As far as I understand, if you run the following code:
>
> from code import InteractiveInterpreter
> interp = InteractiveInterpreter()
> import numpy as np
> interp.runcode("np.__name__")
>
> this will result in the error
> Traceback (most recent call last):
>   File "", line 1, in 
> NameError: name 'np' is not defined
>
> which seems to imply that imports in the parent shell are not shared with 
> interpreters and vice versa (if you swap the places of the import and the 
> __name__ call).
>

Yep, what you're seeing there is the namespace and nothing else. But
if you mess with an actual builtin object, it'll be changed for the
other interpreter too.

>>> import ctypes
>>> ctypes.cast(id(42), ctypes.POINTER(ctypes.c_int))[6] = 43
>>> 41+1
43
>>> from code import InteractiveInterpreter
>>> interp = InteractiveInterpreter()
>>> interp.runcode("print(41+1)")
43

(Note that this only works in CPython and only with integers small
enough to be in the cache, meaning that there is only one such object
representing that integer.)

The same is true of C extensions, which often have their own internal
state, and that state isn't isolated to a single interpreter.

Better isolation is coming with PEP 554
https://peps.python.org/pep-0554/ which also has some great
information about what currently is NOT isolated. (Also, even then,
some things won't be fully isolated; I think that the ctypes trick
above might still affect a subinterpreter even in a post-PEP554
world.)

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


Re: Why does IDLE use a subprocess?

2023-05-30 Thread James Schaffler via Python-list
On Tuesday, May 30th, 2023 at 9:14 PM, Greg Ewing wrote:
> Globals you create by executing code in the REPL have their own
> namespace. But everything else is shared -- builtins, imported
> Python modules, imported C extension modules, etc. etc.

Thanks for the explanation. Could you elaborate on precisely how "everything 
else is shared"? As far as I understand, if you run the following code:

from code import InteractiveInterpreter
interp = InteractiveInterpreter()
import numpy as np
interp.runcode("np.__name__")

this will result in the error
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'np' is not defined

which seems to imply that imports in the parent shell are not shared with 
interpreters and vice versa (if you swap the places of the import and the 
__name__ call).

Thanks,
Jim
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Why does IDLE use a subprocess?

2023-05-30 Thread Greg Ewing via Python-list

On 29/05/23 8:10 am, James Schaffler wrote:

However, some minimal testing of InteractiveInterpreter leads me to believe 
that the Interpreter object has its own view of local/global variables and 
therefore shouldn't be able to affect the calling interpreter


Globals you create by executing code in the REPL have their own
namespace. But everything else is shared -- builtins, imported
Python modules, imported C extension modules, etc. etc.

There's a long-running project to make it possible to have
multiple fully-isolated Python interpreters in one process, but
the way CPython is structured makes that very difficult to achieve,
and as far as I know it's not there yet.

In the case of IDLE, there's really no reason not to use a
subprocess[1]. It's easy and guarantees 100% isolation.

[1] Well, mostly. There used to be a small hitch on Windows with
the default firewall settings not letting you connect to a local
socket (nice one, Microsoft). I don't know whether that's still
an issue.

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


Re: Why does IDLE use a subprocess?

2023-05-30 Thread Chris Angelico
On Wed, 31 May 2023 at 08:16, Barry  wrote:
> I don’t think it security but robustness that needs the subprocess.
>
> Also if your code use tk then it would conflict with idle’s use of tk.
>

From my memory, it's precisely this - it's much MUCH easier to allow
you to use Tk in your own program without conflicting with Idle's own
use of it. I'm sure it would be possible to make everything work in
one process, but the cost of doing so would be greater than the costs
of juggling two processes.

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


Re: Why does IDLE use a subprocess?

2023-05-30 Thread Barry


> On 30 May 2023, at 21:10, James Schaffler via Python-list 
>  wrote:
> 
> Originally posted to idle-dev, but thought this might be a better place. Let 
> me know if it isn't.
> 
> Hi,
> 
> I was curious about the internals of IDLE, and noticed that IDLE uses 
> executes user code in a "subprocess" that's separate from the Python 
> interpreter that is running IDLE itself (which does tasks such as making the 
> window and coloring the text).
> 
> As far as I understand, IDLE runs a modified version of 
> code.InteractiveInterpreter by sending user code through a socket. Even the 
> IDLE documentation says that without a subprocess, "user code is not isolated 
> from IDLE itself." However, some minimal testing of InteractiveInterpreter 
> leads me to believe that the Interpreter object has its own view of 
> local/global variables and therefore shouldn't be able to affect the calling 
> interpreter (please correct me if I'm wrong).
> 
> So my question is a combination of "Why does IDLE use a subprocess?" and "Why 
> is InteractiveInterpreter not secureuldenough?" What possible security 
> vulnerabilities exist if one uses IDLE without the subprocess? If anyone 
> knows (or could point me to information on) why IDLE is designed this way, 
> I'd really appreciate it. Thank you!

I don’t think it security but robustness that needs the subprocess.

You can crash idle with bugs in the code that you are developing.
By running your code in a subprocess idle protects itself, and your edits from 
bugs in your code.

Also if your code use tk then it would conflict with idle’s use of tk.

That is my assumption on why the subprocess is required.

Barry

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

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


Why does IDLE use a subprocess?

2023-05-30 Thread James Schaffler via Python-list
Originally posted to idle-dev, but thought this might be a better place. Let me 
know if it isn't.

Hi,

I was curious about the internals of IDLE, and noticed that IDLE uses executes 
user code in a "subprocess" that's separate from the Python interpreter that is 
running IDLE itself (which does tasks such as making the window and coloring 
the text).

As far as I understand, IDLE runs a modified version of 
code.InteractiveInterpreter by sending user code through a socket. Even the 
IDLE documentation says that without a subprocess, "user code is not isolated 
from IDLE itself." However, some minimal testing of InteractiveInterpreter 
leads me to believe that the Interpreter object has its own view of 
local/global variables and therefore shouldn't be able to affect the calling 
interpreter (please correct me if I'm wrong).

So my question is a combination of "Why does IDLE use a subprocess?" and "Why 
is InteractiveInterpreter not secure enough?" What possible security 
vulnerabilities exist if one uses IDLE without the subprocess? If anyone knows 
(or could point me to information on) why IDLE is designed this way, I'd really 
appreciate it. Thank you!

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


Re: IDLE "Codepage" Switching?

2023-01-18 Thread Eryk Sun
On 1/17/23, Stephen Tucker  wrote:
>
> 1. Can anybody explain the behaviour in IDLE (Python version 2.7.10)
> reported below? (It seems that the way it renders a given sequence of bytes
> depends on the sequence.)

In 2.x, IDLE tries to decode a byte string via unicode() before
writing to the Tk text widget. However, if the locale encoding (e.g.
the process ANSI code page) fails to decode one or more characters,
IDLE lets Tk figure out how to decode the byte string.

Python 2.7 has an older version of Tk that has peculiar behavior on
Windows when bytes in the range 0x80-0xBF are written to a text box.
Bytes in this range get translated to native wide characters (16-bit
characters) in the halfwidth/fullwidth Unicode block, i.e. translated
to Unicode U+FF80 - U+FFBF.

If IDLE decodes using code page 1252, then the ordinals 0x81, 0x8d,
0x8f, 0x90 and 0x9d can't be decoded. IDLE thus passes the undecoded
byte string to Tk. The example you provided that demonstrates the
behavior contains ordinal 0x9d (157).

I get similar behavior for the other undefined ordinal values in code
page 1252. For example, using IDLE 2.7.18 on Windows:

>>> print '\x81\xa1'
チᄀ
>>> print 'a\xa1'
a¡

In the first case, ordinal 0x81 causes decoding to fail in IDLE, so
the byte string is passed as is to Tk, which maps it to
'\uff81\uffa1'. In the second case, OTOH, "\xa1" is decoded by IDLE as
"¡".

> 2. Does the IDLE in Python 3.x behave the same way?

No, in 3.x only Unicode str() objects are written to the Tk text
widget. Moreover, the text widget doesn't have the same behavior in
newer versions. It ignores bytes in the control-block range 0x80-0x9F,
and it decodes bytes in the range 0xA0-0xBF normally.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE "Codepage" Switching?

2023-01-18 Thread Peter J. Holzer
On 2023-01-18 11:05:24 -0500, Thomas Passin wrote:
> On 1/18/2023 5:43 AM, Stephen Tucker wrote:
> > Thanks for these responses.
> > 
> > I was encouraged to read that I'm not the only one to find this all
> > confusing.
> > 
> > I have investigated a little further.
> > 
> > 1. I produced the following IDLE log:
> > 
> > > > > mylongstr = ""
> > > > > for thisCP in range (1, 256):
> > mylongstr += chr (thisCP) + " " + str (ord (chr (thisCP))) + ", "
> > 
> > 
> > > > > print mylongstr
> > 1, 2, 3, 4, 5, 6, 7, 8, 9,
> >   10, 11, 12,
> >   13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
> > 31,   32, ! 33, " 34, # 35, $ 36, % 37, & 38, ' 39, ( 40, ) 41, * 42, + 43,
> > , 44, - 45, . 46, / 47, 0 48, 1 49, 2 50, 3 51, 4 52, 5 53, 6 54, 7 55, 8
> > 56, 9 57, : 58, ; 59, < 60, = 61, > 62, ? 63, @ 64, A 65, B 66, C 67, D 68,
> > E 69, F 70, G 71, H 72, I 73, J 74, K 75, L 76, M 77, N 78, O 79, P 80, Q
> > 81, R 82, S 83, T 84, U 85, V 86, W 87, X 88, Y 89, Z 90, [ 91, \ 92, ] 93,
> > ^ 94, _ 95, ` 96, a 97, b 98, c 99, d 100, e 101, f 102, g 103, h 104, i
> > 105, j 106, k 107, l 108, m 109, n 110, o 111, p 112, q 113, r 114, s 115,
> > t 116, u 117, v 118, w 119, x 120, y 121, z 122, { 123, | 124, } 125, ~
> > 126, 127, タ 128, チ 129, ツ 130, テ 131, ト 132, ナ 133, ニ 134, ヌ 135, ネ 136, ノ
> > 137, ハ 138, ヒ 139, フ 140, ヘ 141, ホ 142, マ 143, ミ 144, ム 145, メ 146, モ 147,
> > ヤ 148, ユ 149, ヨ 150, ラ 151, リ 152, ル 153, レ 154, ロ 155, ワ 156, ン 157, ゙
> > 158, ゚ 159, ᅠ 160, ᄀ 161, ᄁ 162, ᆪ 163, ᄂ 164, ᆬ 165, ᆭ 166, ᄃ 167, ᄄ 168,
> > ᄅ 169, ᆰ 170, ᆱ 171, ᆲ 172, ᆳ 173, ᆴ 174, ᆵ 175, ᄚ 176, ᄆ 177, ᄇ 178, ᄈ
> > 179, ᄡ 180, ᄉ 181, ᄊ 182, ᄋ 183, ᄌ 184, ᄍ 185, ᄎ 186, ᄏ 187, ᄐ 188, ᄑ 189,
> > ᄒ 190, ﾿ 191, À 192, Á 193, Â 194, Ã 195, Ä 196, Å 197, Æ 198, Ç 199, È
> > 200, É 201, Ê 202, Ë 203, Ì 204, Í 205, Î 206, Ï 207, Ð 208, Ñ 209, Ò 210,
> > Ó 211, Ô 212, Õ 213, Ö 214, × 215, Ø 216, Ù 217, Ú 218, Û 219, Ü 220, Ý
> > 221, Þ 222, ß 223, à 224, á 225, â 226, ã 227, ä 228, å 229, æ 230, ç 231,
> > è 232, é 233, ê 234, ë 235, ì 236, í 237, î 238, ï 239, ð 240, ñ 241, ò
> > 242, ó 243, ô 244, õ 245, ö 246, ÷ 247, ø 248, ù 249, ú 250, û 251, ü 252,
> > ý 253, þ 254, ÿ 255,
> > > > > 
> > 
> > 2. I copied and pasted the IDLE log into a text file and ran a program on
> > it that told me about every byte in the log.
> > 
> > 3. I discovered the following:
> > 
> > Bytes 001 to 127 (01 to 7F hex) inclusive were printed as-is;

Which might mean that they are also UTF-8-encoded (there is no
difference between UTF-8-encoding and ASCII-encoding for these
characters).


> > Bytes 128 to 191 (80 to BF) inclusive were output as UTF-8-encoded
> > characters whose codepoints were FF00 hex more than the byte values (hence
> > the strange glyphs);
> > 
> > Bytes 192 to 255 (C0 to FF) inclusive were output as UTF-8-encoded
> > characters - without any offset being added to their codepoints in the
> > meantime!
> > 
> > I thought you might just be interested in this - there does seem to be some
> > method in IDLE's mind, at least.
> 
> This has nothing to do with IDLE.  The UTF-8 encoding of those code points
> uses two bytes instead of one.  See

That's not the peculiar thing. The peculiar thing is that characters
U+0080 to U+00BF are recoded to U+FF80 to U+FFBF (but U+00C0 to U+00FF
are printed normally).

I have no idea what's happening here. I can only urge Stephen to use
Python 3.x instead of Python 2.7. Python2 has been deprecated for years
has has reached its official end of life 3 years ago. There really
shouldn't be any reason to use Python 2.7 any more except
reverse-engineering old applications in order to port them to Python 3.

In particular, the type "str" is very different in Python2 and Python3.
In Python2 it is a sequence of bytes (similar to the Python3 type
"bytes") and in Python3 it is a sequence of (Unicode) characters
(similar to the Python2 type "unicode").

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE "Codepage" Switching?

2023-01-18 Thread Thomas Passin

On 1/18/2023 5:43 AM, Stephen Tucker wrote:

Thanks for these responses.

I was encouraged to read that I'm not the only one to find this all
confusing.

I have investigated a little further.

1. I produced the following IDLE log:


mylongstr = ""
for thisCP in range (1, 256):

mylongstr += chr (thisCP) + " " + str (ord (chr (thisCP))) + ", "



print mylongstr

1, 2, 3, 4, 5, 6, 7, 8, 9,
  10, 11, 12,
  13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31,   32, ! 33, " 34, # 35, $ 36, % 37, & 38, ' 39, ( 40, ) 41, * 42, + 43,
, 44, - 45, . 46, / 47, 0 48, 1 49, 2 50, 3 51, 4 52, 5 53, 6 54, 7 55, 8
56, 9 57, : 58, ; 59, < 60, = 61, > 62, ? 63, @ 64, A 65, B 66, C 67, D 68,
E 69, F 70, G 71, H 72, I 73, J 74, K 75, L 76, M 77, N 78, O 79, P 80, Q
81, R 82, S 83, T 84, U 85, V 86, W 87, X 88, Y 89, Z 90, [ 91, \ 92, ] 93,
^ 94, _ 95, ` 96, a 97, b 98, c 99, d 100, e 101, f 102, g 103, h 104, i
105, j 106, k 107, l 108, m 109, n 110, o 111, p 112, q 113, r 114, s 115,
t 116, u 117, v 118, w 119, x 120, y 121, z 122, { 123, | 124, } 125, ~
126, 127, タ 128, チ 129, ツ 130, テ 131, ト 132, ナ 133, ニ 134, ヌ 135, ネ 136, ノ
137, ハ 138, ヒ 139, フ 140, ヘ 141, ホ 142, マ 143, ミ 144, ム 145, メ 146, モ 147,
ヤ 148, ユ 149, ヨ 150, ラ 151, リ 152, ル 153, レ 154, ロ 155, ワ 156, ン 157, ゙
158, ゚ 159, ᅠ 160, ᄀ 161, ᄁ 162, ᆪ 163, ᄂ 164, ᆬ 165, ᆭ 166, ᄃ 167, ᄄ 168,
ᄅ 169, ᆰ 170, ᆱ 171, ᆲ 172, ᆳ 173, ᆴ 174, ᆵ 175, ᄚ 176, ᄆ 177, ᄇ 178, ᄈ
179, ᄡ 180, ᄉ 181, ᄊ 182, ᄋ 183, ᄌ 184, ᄍ 185, ᄎ 186, ᄏ 187, ᄐ 188, ᄑ 189,
ᄒ 190, ﾿ 191, À 192, Á 193, Â 194, Ã 195, Ä 196, Å 197, Æ 198, Ç 199, È
200, É 201, Ê 202, Ë 203, Ì 204, Í 205, Î 206, Ï 207, Ð 208, Ñ 209, Ò 210,
Ó 211, Ô 212, Õ 213, Ö 214, × 215, Ø 216, Ù 217, Ú 218, Û 219, Ü 220, Ý
221, Þ 222, ß 223, à 224, á 225, â 226, ã 227, ä 228, å 229, æ 230, ç 231,
è 232, é 233, ê 234, ë 235, ì 236, í 237, î 238, ï 239, ð 240, ñ 241, ò
242, ó 243, ô 244, õ 245, ö 246, ÷ 247, ø 248, ù 249, ú 250, û 251, ü 252,
ý 253, þ 254, ÿ 255,




2. I copied and pasted the IDLE log into a text file and ran a program on
it that told me about every byte in the log.

3. I discovered the following:

Bytes 001 to 127 (01 to 7F hex) inclusive were printed as-is;

Bytes 128 to 191 (80 to BF) inclusive were output as UTF-8-encoded
characters whose codepoints were FF00 hex more than the byte values (hence
the strange glyphs);

Bytes 192 to 255 (C0 to FF) inclusive were output as UTF-8-encoded
characters - without any offset being added to their codepoints in the
meantime!

I thought you might just be interested in this - there does seem to be some
method in IDLE's mind, at least.


This has nothing to do with IDLE.  The UTF-8 encoding of those code 
points uses two bytes instead of one.  See


https://stackoverflow.com/questions/8732025/why-degree-symbol-differs-from-utf-8-from-unicode#:~:text=UTF-8%20encodes%20the%20value%200xB0%20as%20two%20consecutive,on%20endianness%20(I%20suppose%20other%20orderings%20are%20possible).coding-in-vs-code-on-ubuntu-leading-to-unicode-error/62652695#62652695





Stephen Tucker.








On Wed, Jan 18, 2023 at 9:41 AM Peter J. Holzer  wrote:


On 2023-01-17 22:58:53 -0500, Thomas Passin wrote:

On 1/17/2023 8:46 PM, rbowman wrote:

On Tue, 17 Jan 2023 12:47:29 +, Stephen Tucker wrote:

2. Does the IDLE in Python 3.x behave the same way?


fwiw

Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license()" for more

information.

str = ""
for c in range(140, 169):
  str += chr(c) + " "

print(str)
Œ   Ž ‘ ’ “ ” • – — ˜ ™ š › œ   ž Ÿ   ¡ ¢ £ ¤ ¥
¦ § ¨


I don't know how this will appear since Pan is showing the icon for a
character not in its set.  However, even with more undefined characters
the printable one do not change. I get the same output running Python3
from the terminal so it's not an IDLE thing.


I'm not sure what explanation is being asked for here.  Let's take

Python3,

so we can be sure that the strings are in unicode.  The font being used

by

the console isn't mentioned, but there's no reason it should have glyphs

for

any random unicode character.


Also note that the characters between 128 (U+0080) and 159 (U+009F)
inclusive aren't printable characters. They are control characters.

 hp

--
_  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"
--
https://mail.python.org/mailman/listinfo/python-list



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


Re: IDLE "Codepage" Switching?

2023-01-18 Thread Stephen Tucker
Thanks for these responses.

I was encouraged to read that I'm not the only one to find this all
confusing.

I have investigated a little further.

1. I produced the following IDLE log:

>>> mylongstr = ""
>>> for thisCP in range (1, 256):
mylongstr += chr (thisCP) + " " + str (ord (chr (thisCP))) + ", "


>>> print mylongstr
1, 2, 3, 4, 5, 6, 7, 8, 9,
 10, 11, 12,
 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31,   32, ! 33, " 34, # 35, $ 36, % 37, & 38, ' 39, ( 40, ) 41, * 42, + 43,
, 44, - 45, . 46, / 47, 0 48, 1 49, 2 50, 3 51, 4 52, 5 53, 6 54, 7 55, 8
56, 9 57, : 58, ; 59, < 60, = 61, > 62, ? 63, @ 64, A 65, B 66, C 67, D 68,
E 69, F 70, G 71, H 72, I 73, J 74, K 75, L 76, M 77, N 78, O 79, P 80, Q
81, R 82, S 83, T 84, U 85, V 86, W 87, X 88, Y 89, Z 90, [ 91, \ 92, ] 93,
^ 94, _ 95, ` 96, a 97, b 98, c 99, d 100, e 101, f 102, g 103, h 104, i
105, j 106, k 107, l 108, m 109, n 110, o 111, p 112, q 113, r 114, s 115,
t 116, u 117, v 118, w 119, x 120, y 121, z 122, { 123, | 124, } 125, ~
126, 127, タ 128, チ 129, ツ 130, テ 131, ト 132, ナ 133, ニ 134, ヌ 135, ネ 136, ノ
137, ハ 138, ヒ 139, フ 140, ヘ 141, ホ 142, マ 143, ミ 144, ム 145, メ 146, モ 147,
ヤ 148, ユ 149, ヨ 150, ラ 151, リ 152, ル 153, レ 154, ロ 155, ワ 156, ン 157, ゙
158, ゚ 159, ᅠ 160, ᄀ 161, ᄁ 162, ᆪ 163, ᄂ 164, ᆬ 165, ᆭ 166, ᄃ 167, ᄄ 168,
ᄅ 169, ᆰ 170, ᆱ 171, ᆲ 172, ᆳ 173, ᆴ 174, ᆵ 175, ᄚ 176, ᄆ 177, ᄇ 178, ᄈ
179, ᄡ 180, ᄉ 181, ᄊ 182, ᄋ 183, ᄌ 184, ᄍ 185, ᄎ 186, ᄏ 187, ᄐ 188, ᄑ 189,
ᄒ 190, ﾿ 191, À 192, Á 193, Â 194, Ã 195, Ä 196, Å 197, Æ 198, Ç 199, È
200, É 201, Ê 202, Ë 203, Ì 204, Í 205, Î 206, Ï 207, Ð 208, Ñ 209, Ò 210,
Ó 211, Ô 212, Õ 213, Ö 214, × 215, Ø 216, Ù 217, Ú 218, Û 219, Ü 220, Ý
221, Þ 222, ß 223, à 224, á 225, â 226, ã 227, ä 228, å 229, æ 230, ç 231,
è 232, é 233, ê 234, ë 235, ì 236, í 237, î 238, ï 239, ð 240, ñ 241, ò
242, ó 243, ô 244, õ 245, ö 246, ÷ 247, ø 248, ù 249, ú 250, û 251, ü 252,
ý 253, þ 254, ÿ 255,
>>>

2. I copied and pasted the IDLE log into a text file and ran a program on
it that told me about every byte in the log.

3. I discovered the following:

Bytes 001 to 127 (01 to 7F hex) inclusive were printed as-is;

Bytes 128 to 191 (80 to BF) inclusive were output as UTF-8-encoded
characters whose codepoints were FF00 hex more than the byte values (hence
the strange glyphs);

Bytes 192 to 255 (C0 to FF) inclusive were output as UTF-8-encoded
characters - without any offset being added to their codepoints in the
meantime!

I thought you might just be interested in this - there does seem to be some
method in IDLE's mind, at least.

Stephen Tucker.








On Wed, Jan 18, 2023 at 9:41 AM Peter J. Holzer  wrote:

> On 2023-01-17 22:58:53 -0500, Thomas Passin wrote:
> > On 1/17/2023 8:46 PM, rbowman wrote:
> > > On Tue, 17 Jan 2023 12:47:29 +, Stephen Tucker wrote:
> > > > 2. Does the IDLE in Python 3.x behave the same way?
> > >
> > > fwiw
> > >
> > > Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
> > > Type "help", "copyright", "credits" or "license()" for more
> information.
> > > str = ""
> > > for c in range(140, 169):
> > >  str += chr(c) + " "
> > >
> > > print(str)
> > > Œ   Ž ‘ ’ “ ” • – — ˜ ™ š › œ   ž Ÿ   ¡ ¢ £ ¤ ¥
> > > ¦ § ¨
> > >
> > >
> > > I don't know how this will appear since Pan is showing the icon for a
> > > character not in its set.  However, even with more undefined characters
> > > the printable one do not change. I get the same output running Python3
> > > from the terminal so it's not an IDLE thing.
> >
> > I'm not sure what explanation is being asked for here.  Let's take
> Python3,
> > so we can be sure that the strings are in unicode.  The font being used
> by
> > the console isn't mentioned, but there's no reason it should have glyphs
> for
> > any random unicode character.
>
> Also note that the characters between 128 (U+0080) and 159 (U+009F)
> inclusive aren't printable characters. They are control characters.
>
> hp
>
> --
>_  | Peter J. Holzer| Story must make more sense than reality.
> |_|_) ||
> | |   | h...@hjp.at |-- Charles Stross, "Creative writing
> __/   | http://www.hjp.at/ |   challenge!"
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE "Codepage" Switching?

2023-01-18 Thread Peter J. Holzer
On 2023-01-17 22:58:53 -0500, Thomas Passin wrote:
> On 1/17/2023 8:46 PM, rbowman wrote:
> > On Tue, 17 Jan 2023 12:47:29 +, Stephen Tucker wrote:
> > > 2. Does the IDLE in Python 3.x behave the same way?
> > 
> > fwiw
> > 
> > Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
> > Type "help", "copyright", "credits" or "license()" for more information.
> > str = ""
> > for c in range(140, 169):
> >  str += chr(c) + " "
> > 
> > print(str)
> > Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ £ ¤ ¥
> > ¦ § ¨
> > 
> > 
> > I don't know how this will appear since Pan is showing the icon for a
> > character not in its set.  However, even with more undefined characters
> > the printable one do not change. I get the same output running Python3
> > from the terminal so it's not an IDLE thing.
> 
> I'm not sure what explanation is being asked for here.  Let's take Python3,
> so we can be sure that the strings are in unicode.  The font being used by
> the console isn't mentioned, but there's no reason it should have glyphs for
> any random unicode character.

Also note that the characters between 128 (U+0080) and 159 (U+009F)
inclusive aren't printable characters. They are control characters.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE "Codepage" Switching?

2023-01-17 Thread Thomas Passin

On 1/17/2023 8:46 PM, rbowman wrote:

On Tue, 17 Jan 2023 12:47:29 +, Stephen Tucker wrote:


2. Does the IDLE in Python 3.x behave the same way?


fwiw

Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license()" for more information.
str = ""
for c in range(157, 169):
 str += chr(c) + ""

 
print(str)

žŸ ¡¢£¤¥¦§¨
str = ""
for c in range(140, 169):
 str += chr(c) + " "

 
print(str)

Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ £ ¤ ¥
¦ § ¨


I don't know how this will appear since Pan is showing the icon for a
character not in its set.  However, even with more undefined characters
the printable one do not change. I get the same output running Python3
from the terminal so it's not an IDLE thing.


I'm not sure what explanation is being asked for here.  Let's take 
Python3, so we can be sure that the strings are in unicode.  The font 
being used by the console isn't mentioned, but there's no reason it 
should have glyphs for any random unicode character.  In my case, I see 
the same missing and printable characters as in the previous post 
(above).  The font is Source Code Pro Medium.


Changing the console's code page won't magically provide the missing glyphs.

I wrote these characters to a file using utf-8 encoding and opened it in 
an editor that recognized the content as utf-8 (EditPlus).  It displayed 
the same characters but had fewer leading spaces (i.e., missing glyphs), 
and did not show any default "missing-character" glyphs.  The editor is 
using the Cousine font.


The second factor that could be in play is what the default character 
encoding is, which is set by Windows and could be different in different 
places (locales).  I don't recall just now how Python3 handles this. 
Since Python2 strings are not unicode unless specified, and Python2 
probably handles the locale/default encoding differently from Python3, 
it would not be a surprise if the two give different results.


If you print such a Python2 string, you will get glyphs for (non-ascii) 
ord(chr) > 127 that come from the Windows code page table, which will be 
different from what Python3 will display.


Python3 uses Windows Unicode API functions, and isn't subject to the 
same limitations as Python2 was - Python2 had to go though the Windows 
code page apparatus and didn't use the Unicode API.  See PEP 528 - 
https://peps.python.org/pep-0528/)


IDLE sets up its own window itself, and probably uses a different font 
from the default Windows console, so there could be some differences 
there too, especially as to whether missing glyphs show a visible symbol 
or not.


Code Page 65001 was often claimed to be for utf-8.  It's not really 
correct in general, but it's OK for many utf-8 characters.  But in 
Python2, the codecs module does not know about code page 65001 - unless 
you apply a simple patch - so if you try to set the console to cp65001, 
you cannot get anything printed.  You get an exception raised instead.


Yes, it's all confusing, and especially with Python2.


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


Re: IDLE "Codepage" Switching?

2023-01-17 Thread rbowman
On Tue, 17 Jan 2023 12:47:29 +, Stephen Tucker wrote:

> 2. Does the IDLE in Python 3.x behave the same way?

fwiw

Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license()" for more information.
str = ""
for c in range(157, 169):
str += chr(c) + ""


print(str)
žŸ ¡¢£¤¥¦§¨
str = ""
for c in range(140, 169):
str += chr(c) + " "


print(str)
Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ £ ¤ ¥ 
¦ § ¨ 


I don't know how this will appear since Pan is showing the icon for a 
character not in its set.  However, even with more undefined characters 
the printable one do not change. I get the same output running Python3 
from the terminal so it's not an IDLE thing.
-- 
https://mail.python.org/mailman/listinfo/python-list


IDLE "Codepage" Switching?

2023-01-17 Thread Stephen Tucker
I have four questions.

1. Can anybody explain the behaviour in IDLE (Python version 2.7.10)
reported below? (It seems that the way it renders a given sequence of bytes
depends on the sequence.)

2. Does the IDLE in Python 3.x behave the same way?

3. If it does, is this as it should behave?

4. If it is, then why is it as it should behave?
==
>>> mylongstr = ""
>>> for thisCP in range (157, 169):
mylongstr += chr (thisCP) + " "


>>> print mylongstr
ン ゙ ゚ ᅠ ᄀ ᄁ ᆪ ᄂ ᆬ ᆭ ᄃ ᄄ
>>> mylongstr = ""
>>> for thisCP in range (158, 169):
mylongstr += chr (thisCP) + " "


>>> print mylongstr
ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨
>>> mylongstr = ""
>>> for thisCP in range (157, 169):
mylongstr += chr (thisCP) + " "


>>> print mylongstr
ン ゙ ゚ ᅠ ᄀ ᄁ ᆪ ᄂ ᆬ ᆭ ᄃ ᄄ
==

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


Bug report - Python 3.10 from Microsoft Store - IDLE won't start

2022-11-29 Thread Johan Gunnarsson via Python-list
Hello, IDLE won't start if ver. 3.10 is installed from Microsoft Store.
3.9 works just fine.

Thanks in advance!


Johan Gunnarsson
Lunds universitet
Medicinska fakulteten
Bibliotek & IKT
Box 118, 221 00 Lund<https://webmail.lu.se/owa/>
Besöksadress: Sölvegatan 19, 221 84 Lund<https://webmail.lu.se/owa/>
Telefon: +46 46 222 18 23
www.medicin.lu.se<http://www.medicin.lu.se/>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-14 Thread darkstone
Dear list,


>>So please check that you are running the right version of Python when 
>>you type "python".



If i type “python”, it is


C:\>python -V
Python 3.11.0
















Von: Thomas Passin
Gesendet: ‎Sonntag‎, ‎13‎. ‎November‎ ‎2022 ‎16‎:‎18
An: darkst...@o2online.de





On 11/13/2022 9:32 AM, Thomas Passin wrote:
> When you ran "python -V", the current directory was the top-level Python 
> directory.  So the Python version would automatically have been the same 
> as that directory's Python, that is, 3.11.
 >
 > When you ran the idlelib self test, you may have been in a different
 > directory, and so a different version of Python might possible have
 > been running.

To illustrate this point, on my system:

C:\Users\tom>python -V
Python 3.9.9

but

C:\Users\tom>py -V
Python 3.10.4

With the "py" script, I can run 3.9x this way:

py -3.9 -V
Python 3.9.9

and also:

C:\Users\tom>py -3.7 -V
Python 3.7.9

So please check that you are running the right version of Python when 
you type "python".
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-12 Thread Eryk Sun
On 11/12/22, darkst...@o2online.de  wrote:
>
 import _tkinter
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: DLL load failed while importing _tkinter: Das angegebene Modul
> wurd
> e nicht gefunden.

Loading the extension module "_tkinter.pyd" tries to load two TCL/Tk
DLL files that should be in the same directory: "tcl86t.dll" and
"tk86t.dll". Previously I asked you to look for these two files, and
you said they were there, but maybe one is corrupt.

Please try the following in the interactive shell:

import os, sys, ctypes
tcl86 = os.path.join(sys.prefix, 'DLLs', 'tcl86t.dll')
tk86 = os.path.join(sys.prefix, 'DLLs', 'tk86t.dll')

Run the following two statements one after the other in the shell:

ctypes.CDLL(tcl86)
ctypes.CDLL(tk86)

Either or both will fail if the DLL or one of its dependencies can't
be found or loaded.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-12 Thread Thomas Passin

On 11/12/2022 11:48 AM, darkst...@o2online.de wrote:

Hello Thomas,

there is a “_tkinter.pyd” in the *.dll Directory. Is there something 
more, I can check?


Yes, look in the "Lib" (NOT "libs") subdirectory of the Python tree and 
see if it has a subdirectory named "tkinter". That's where it is in my 
own Python installations.  If it's there check to see if it actually has 
anything in it.


Probably it will be populated.  The next thing would to see if we can 
work out what's going wrong.


As long as you are in the LIB directory, check and see if it has a 
subdirectory named "idlelib".  If it does, try to run its self-tests**. 
In a console window, type the following command:


python -m idlelib.idle_test.htest

If it works, there it will put up a succession of little Tk dialogs and 
windows.  If you get any of them, you can cancel out of it, since you 
won't need to run dozens of little self-tests.


NOTE - on your system, the command "python" might run Python 2.7 instead 
of Python 3.x.  So use the right name for your version of Python - or 
use "py" (no quotes), which recent Python installers set up so you 
probably have it.  BTW, what version(s) of Python do you have installed? 
  If you said in a previous post, I don't recall.  You can check what 
version is running when you use the name "python" by using this command 
line (Note the upper-case "V"):


python -V


** I found out about this self-test command line because I noticed a 
file README.txt in the idlelib\idle_test subdirectory, and read it.  It 
pays to be curious and nosy when trying to work out computer problems.



*Von:* Thomas Passin <mailto:li...@tompassin.net>
*Gesendet:* ‎Samstag‎, ‎12‎. ‎November‎ ‎2022 ‎14‎:‎42
*An:* darkst...@o2online.de <mailto:darkst...@o2online.de>
*Cc:* python-list@python.org <mailto:python-list@python.org>

All right, now let's verify that tk is not there (otherwise it might be
there but corrupted or not loadable for some reason).

Open Windows Explorer and navigate it to the Python directory as I
described in my last message. The navigate to the subdirectory named
"DLLs".  If tkinter is installed, there will be a file named
"_tkinter.pyd".  If that file is missing, then definitely tk isn't
there.  If it is, then it's been installed but something is wrong with
the install.

Probably it won't be there, but it's a good idea to check anyway.

If it's not there, I would suggest installing a different version of
Python.  There might be something wrong with the packaging of that
particular version, who knows?  And I would try a release with a lower
version if possible, just in case a later one accidentally used some
instruction not compatible with your version of Windows 8 (unlikely, but
just in case it could happen).  For example, if you currently have
Python 3.9.10, try Python 3.8.9.  The available releases are all here:

https://www.python.org/downloads/windows/

If this works, wonderful!  If it does not, I'm out of ideas for the moment.

On 11/11/2022 4:18 PM, darkst...@o2online.de wrote:
 > Hello,
 >
 > yes, its a Windows 8.1 with 32 bit. I have found my Installation ordner.
 >
 > If I type python
 >
 > ** IDLE can't import Tkinter.
 > Your Python may not configured for TK. **
 >
 > So I tried this:
 >
 >  >>> import _tkinter
 > Traceback (most recent call last):
 >    File "", line 1, in 
 > ImportError: DLL load failed while importing _tkinter: Das angegebene
 > Modul wurd
 > e nicht gefunden.
 >
 > So I it is a tkinter Problem and I tried this:
 >
 >  >>> import _tkinter
 > Traceback (most recent call last):
 >    File "", line 1, in 
 > ImportError: DLL load failed while importing _tkinter: Das angegebene
 > Modul wurd
 > e nicht gefunden.
 >
 > How can I go gon, to make it work?
 >
 >
 >
 >
 >
 > *Von:* Thomas Passin <mailto:li...@tompassin.net>
 > *Gesendet:* ‎Donnerstag‎, ‎10‎. ‎November‎ ‎2022 ‎03‎:‎00
 > *An:* python-list@python.org <mailto:python-list@python.org>
 >
 >
 > On 11/9/2022 7:02 PM, darkst...@o2online.de wrote:
 >  > Is there no one who can help?
 >
 > Is there a reason why you tried to install a 32-bit version?  Most
 > personal computers are 64-bit ones these days. Also, I don't remember if
 > you are running Windows or not.
 >
 > One problem for getting help from the list is that there have not been
 > many details given. "Doesn't start" is not helpful.  Are there error
 > messages displayed on the terminal?  How did you try to start it?  Does
 > Python run at all?
 >
 > A Python installation normally includes a batch file that launches idle.
 >    This batch file may not be on

Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-12 Thread Thomas Passin
All right, now let's verify that tk is not there (otherwise it might be 
there but corrupted or not loadable for some reason).


Open Windows Explorer and navigate it to the Python directory as I 
described in my last message. The navigate to the subdirectory named 
"DLLs".  If tkinter is installed, there will be a file named 
"_tkinter.pyd".  If that file is missing, then definitely tk isn't 
there.  If it is, then it's been installed but something is wrong with 
the install.


Probably it won't be there, but it's a good idea to check anyway.

If it's not there, I would suggest installing a different version of 
Python.  There might be something wrong with the packaging of that 
particular version, who knows?  And I would try a release with a lower 
version if possible, just in case a later one accidentally used some 
instruction not compatible with your version of Windows 8 (unlikely, but 
just in case it could happen).  For example, if you currently have 
Python 3.9.10, try Python 3.8.9.  The available releases are all here:


https://www.python.org/downloads/windows/

If this works, wonderful!  If it does not, I'm out of ideas for the moment.

On 11/11/2022 4:18 PM, darkst...@o2online.de wrote:

Hello,

yes, its a Windows 8.1 with 32 bit. I have found my Installation ordner.

If I type python

** IDLE can't import Tkinter.
Your Python may not configured for TK. **

So I tried this:

 >>> import _tkinter
Traceback (most recent call last):
   File "", line 1, in 
ImportError: DLL load failed while importing _tkinter: Das angegebene 
Modul wurd

e nicht gefunden.

So I it is a tkinter Problem and I tried this:

 >>> import _tkinter
Traceback (most recent call last):
   File "", line 1, in 
ImportError: DLL load failed while importing _tkinter: Das angegebene 
Modul wurd

e nicht gefunden.

How can I go gon, to make it work?





*Von:* Thomas Passin <mailto:li...@tompassin.net>
*Gesendet:* ‎Donnerstag‎, ‎10‎. ‎November‎ ‎2022 ‎03‎:‎00
*An:* python-list@python.org <mailto:python-list@python.org>


On 11/9/2022 7:02 PM, darkst...@o2online.de wrote:
 > Is there no one who can help?

Is there a reason why you tried to install a 32-bit version?  Most
personal computers are 64-bit ones these days. Also, I don't remember if
you are running Windows or not.

One problem for getting help from the list is that there have not been
many details given. "Doesn't start" is not helpful.  Are there error
messages displayed on the terminal?  How did you try to start it?  Does
Python run at all?

A Python installation normally includes a batch file that launches idle.
   This batch file may not be on your path for one reason or another.  If
so, it would not run when you type "idle" at a command line.

So the first thing to do is to figure out if you have either the Python
program idle.py or idle.pyw, or the batch file idle.bat (for Windows)
On Linux Mint, when I typed "idle" at a terminal, I got this message:

"Command 'idle' not found, but can be installed with:

sudo apt install idle"

So that's how you would get it with that flavor of Linux.

I'm going to walk through what I would probably do if I had the same
problem on Windows (I'm going to assume that you are running Windows).
It's a little long to write out, but not really that hard.  Basically,
there are only a few steps:

1. Find your Python installation;
2. Look in the installation location to see if the idle program is there;
3.  If it is, try to run it and note any error messages.

First you need to find out where your Python installation is located on
your system disk. If you don't know, one way to find out is to run the
following command in a console window:

where /R %USERPROFILE% python.exe

You may be surprised that there more several ones that you didn't
expect, such as (on my computer):

C:\Users\tom\AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\python.exe

It seems that Windows has its own Python installation; that's not the
one you want.  You are looking for one that looks like this (with your
own user name, of course, instead of mine):

C:\Users\tom\AppData\Local\Programs\Python\Python310\python.exe

Appdata\Local\Programs is where Python3 usually gets installed.  Now we
know that I have Python 3.10 at
C:\Users\tom\AppData\Local\Programs\Python.  You may be using a
different version of Python; if so, just use that version instead.

Idle is normally installed in the directory tree under python.  Let's
call the top of that tree %PYTH0N%.  On my system, as we see above, that
is C:\Users\tom\AppData\Local\Programs\Python\Python310.  Idle should be at

%PYTHON%\Lib\idlelib

Open Windows explorer, and navigate to that directory. If you have that
directory, then you should be able to run idle.  If it doesn't

Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-11 Thread Eryk Sun
On 11/11/22, darkst...@o2online.de  wrote:
>
> What can I do for the next step to find, why IDLE isn’t working?

The question is why tkinter isn't working. IDLE not working is just a
symptom of the underlying problem. In the command prompt, run 32-bit
Python 3.10 via `py -3.10-32`. In Python's interactive shell, run
`import _tkinter`. Please paste any resulting traceback and error
message in your reply to this message.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-09 Thread Thomas Passin
Sorry about the typo at the end.  If you need to search the entire disk, 
use this command instead of the one I had in my last post:


where /R c:\ python.exe

On 11/9/2022 9:00 PM, Thomas Passin wrote:


On 11/9/2022 7:02 PM, darkst...@o2online.de wrote:

Is there no one who can help?


Is there a reason why you tried to install a 32-bit version?  Most 
personal computers are 64-bit ones these days. Also, I don't remember if 
you are running Windows or not.


One problem for getting help from the list is that there have not been 
many details given. "Doesn't start" is not helpful.  Are there error 
messages displayed on the terminal?  How did you try to start it?  Does 
Python run at all?


A Python installation normally includes a batch file that launches idle. 
  This batch file may not be on your path for one reason or another.  If 
so, it would not run when you type "idle" at a command line.


So the first thing to do is to figure out if you have either the Python 
program idle.py or idle.pyw, or the batch file idle.bat (for Windows) On 
Linux Mint, when I typed "idle" at a terminal, I got this message:


"Command 'idle' not found, but can be installed with:

sudo apt install idle"

So that's how you would get it with that flavor of Linux.

I'm going to walk through what I would probably do if I had the same 
problem on Windows (I'm going to assume that you are running Windows). 
It's a little long to write out, but not really that hard.  Basically, 
there are only a few steps:


1. Find your Python installation;
2. Look in the installation location to see if the idle program is there;
3.  If it is, try to run it and note any error messages.

First you need to find out where your Python installation is located on 
your system disk. If you don't know, one way to find out is to run the 
following command in a console window:


where /R %USERPROFILE% python.exe

You may be surprised that there more several ones that you didn't 
expect, such as (on my computer):


C:\Users\tom\AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\python.exe

It seems that Windows has its own Python installation; that's not the 
one you want.  You are looking for one that looks like this (with your 
own user name, of course, instead of mine):


C:\Users\tom\AppData\Local\Programs\Python\Python310\python.exe

Appdata\Local\Programs is where Python3 usually gets installed.  Now we 
know that I have Python 3.10 at 
C:\Users\tom\AppData\Local\Programs\Python.  You may be using a 
different version of Python; if so, just use that version instead.


Idle is normally installed in the directory tree under python.  Let's 
call the top of that tree %PYTH0N%.  On my system, as we see above, that 
is C:\Users\tom\AppData\Local\Programs\Python\Python310.  Idle should be at


%PYTHON%\Lib\idlelib

Open Windows explorer, and navigate to that directory. If you have that 
directory, then you should be able to run idle.  If it doesn't exist, 
That's a problem and needs to be fixed, probably by a fresh install of 
Python.  If it does, you will see the batch file idle.bat.  Double-click 
it, and idle should run.  If it does not, see below.


That's not a convenient way to run idle time after time.  Either you 
need to get idle on your path, or perhaps it will be available using the 
windows Start menu.  Check that out by tapping the Windows key, then 
typing "idle" (without the quotes).  It may be there.  But look closely, 
for it may be the idle associated with a different version of Python 
than the one you want to use.  For example, on my system I have Idle in 
the Start Menu, but only for Python 3.7 and not Python 3.10 which is the 
most recent version I have.


If you double-clicked on the idle batch file but it failed to run, then 
you need to get any error messages.  You need to run it from a console 
so you can see any output.  Open a console. you want to run idle using 
python and not pythonw (because pythonw will not open a window).  So in 
the console, type "python " (without quotes but with the space), then 
the path to the file.


The path to the file is a lot to type, and it's easier to just drag the 
icon for the file (remember, it's idle.py) into the console window. 
Press the  key and idle should run.  If it doesn't, note any 
error messages.  Then come back here and tell us what they were.


It's possible that the "where" program didn't find your python 
installation.  That would be because it's installed somewhere outside of 
your user tree, like Program Files.  You can look again in the entire 
disk (assuming it's on the c: drive, which is almost certainly so):


where /R c:\% python.exe


Von: darkst...@o2online.de
Gesendet: ‎Freitag‎, ‎4‎. ‎November‎ ‎2022 ‎15‎:‎10
An: Eryk Sun
Cc: python-list@python.org





Y

Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-09 Thread Eryk Sun
On 11/9/22, darkst...@o2online.de  wrote:
> Is there no one who can help?

If you can't run IDLE via `py -3.10-32 -m idlelib`, then something
isn't installed properly. You reported an error that IDLE fails to
load because importing tkinter fails. Did you try `import tkinter` in
the REPL? tkinter depends on the _tkinter extension module. Try
`import _tkinter`. If the latter fails because of a missing DLL
dependency, check the "DLLs" directory in the installation directory
for the TCL/Tk dependencies. They're "tcl86t.dll" and "tk86t.dll" for
Python 3.10. The installation directory should also have a "tcl"
directory, which should contain "tcl8.6" and "tk8.6" directories among
others, with many .tcl files.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-09 Thread Dennis Lee Bieber
On Thu, 10 Nov 2022 00:02:44 +,  declaimed the
following:

>Is there no one who can help?
>

Your problem description isn't detailed enough to even guess what you
are finding incorrect.

If you are on Windows, once you've done an install, shove the installer
file off into some archive and don't touch it again unless you need to
reinstall or repair the existing install.


    Do a search for idle.*

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\Wulfraed> Get-ChildItem -Path C:\Python38\ -Recurse -Name
-Filter "idle.*"
Lib\idlelib\idle.bat
Lib\idlelib\idle.py
Lib\idlelib\idle.pyw
Lib\idlelib\Icons\idle.ico
Lib\site-packages\pythonwin\pywin\idle
Lib\site-packages\pythonwin\pywin\IDLE.cfg
PS C:\Users\Wulfraed> type C:\Python38\Lib\idlelib\idle.bat
@echo off
rem Start IDLE using the appropriate Python interpreter
set CURRDIR=%~dp0
start "IDLE" "%CURRDIR%..\..\pythonw.exe" "%CURRDIR%idle.pyw" %1 %2 %3 %4
%5 %6 %7 %8 %9
PS C:\Users\Wulfraed> c:\python38\lib\idlelib\idle.bat

... opens something IDLE related (seems to be an interactive Python shell,
but a configuration item allows setting it to open an edit window instead).

Interesting -- I could have sworn there was a Python38 entry on the
Windows start menu, but I seem to have removed it. I don't use IDLE, and
that was the primary item in the Python38 entry. I normally use an old
version of PythonWin (fyi: I'm using an old version of the ActiveState
Python package). I also have PyCharm installed.


-- 
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-09 Thread Thomas Passin


On 11/9/2022 7:02 PM, darkst...@o2online.de wrote:

Is there no one who can help?


Is there a reason why you tried to install a 32-bit version?  Most 
personal computers are 64-bit ones these days. Also, I don't remember if 
you are running Windows or not.


One problem for getting help from the list is that there have not been 
many details given. "Doesn't start" is not helpful.  Are there error 
messages displayed on the terminal?  How did you try to start it?  Does 
Python run at all?


A Python installation normally includes a batch file that launches idle. 
 This batch file may not be on your path for one reason or another.  If 
so, it would not run when you type "idle" at a command line.


So the first thing to do is to figure out if you have either the Python 
program idle.py or idle.pyw, or the batch file idle.bat (for Windows) 
On Linux Mint, when I typed "idle" at a terminal, I got this message:


"Command 'idle' not found, but can be installed with:

sudo apt install idle"

So that's how you would get it with that flavor of Linux.

I'm going to walk through what I would probably do if I had the same 
problem on Windows (I'm going to assume that you are running Windows). 
It's a little long to write out, but not really that hard.  Basically, 
there are only a few steps:


1. Find your Python installation;
2. Look in the installation location to see if the idle program is there;
3.  If it is, try to run it and note any error messages.

First you need to find out where your Python installation is located on 
your system disk. If you don't know, one way to find out is to run the 
following command in a console window:


where /R %USERPROFILE% python.exe

You may be surprised that there more several ones that you didn't 
expect, such as (on my computer):


C:\Users\tom\AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\python.exe

It seems that Windows has its own Python installation; that's not the 
one you want.  You are looking for one that looks like this (with your 
own user name, of course, instead of mine):


C:\Users\tom\AppData\Local\Programs\Python\Python310\python.exe

Appdata\Local\Programs is where Python3 usually gets installed.  Now we 
know that I have Python 3.10 at 
C:\Users\tom\AppData\Local\Programs\Python.  You may be using a 
different version of Python; if so, just use that version instead.


Idle is normally installed in the directory tree under python.  Let's 
call the top of that tree %PYTH0N%.  On my system, as we see above, that 
is C:\Users\tom\AppData\Local\Programs\Python\Python310.  Idle should be at


%PYTHON%\Lib\idlelib

Open Windows explorer, and navigate to that directory. If you have that 
directory, then you should be able to run idle.  If it doesn't exist, 
That's a problem and needs to be fixed, probably by a fresh install of 
Python.  If it does, you will see the batch file idle.bat.  Double-click 
it, and idle should run.  If it does not, see below.


That's not a convenient way to run idle time after time.  Either you 
need to get idle on your path, or perhaps it will be available using the 
windows Start menu.  Check that out by tapping the Windows key, then 
typing "idle" (without the quotes).  It may be there.  But look closely, 
for it may be the idle associated with a different version of Python 
than the one you want to use.  For example, on my system I have Idle in 
the Start Menu, but only for Python 3.7 and not Python 3.10 which is the 
most recent version I have.


If you double-clicked on the idle batch file but it failed to run, then 
you need to get any error messages.  You need to run it from a console 
so you can see any output.  Open a console. you want to run idle using 
python and not pythonw (because pythonw will not open a window).  So in 
the console, type "python " (without quotes but with the space), then 
the path to the file.


The path to the file is a lot to type, and it's easier to just drag the 
icon for the file (remember, it's idle.py) into the console window. 
Press the  key and idle should run.  If it doesn't, note any 
error messages.  Then come back here and tell us what they were.


It's possible that the "where" program didn't find your python 
installation.  That would be because it's installed somewhere outside of 
your user tree, like Program Files.  You can look again in the entire 
disk (assuming it's on the c: drive, which is almost certainly so):


where /R c:\% python.exe


Von: darkst...@o2online.de
Gesendet: ‎Freitag‎, ‎4‎. ‎November‎ ‎2022 ‎15‎:‎10
An: Eryk Sun
Cc: python-list@python.org





Yes, there is always the message “modified successfull”, “installed 
sucessfully”, but IDLE does’t start. I tried it with the newer Version, too. 
Ist 3.11.0 for 32 bit, but it also doesn’t work. Do you hav

Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-09 Thread darkstone
Is there no one who can help?






Von: darkst...@o2online.de
Gesendet: ‎Freitag‎, ‎4‎. ‎November‎ ‎2022 ‎15‎:‎10
An: Eryk Sun
Cc: python-list@python.org





Yes, there is always the message “modified successfull”, “installed 
sucessfully”, but IDLE does’t start. I tried it with the newer Version, too. 
Ist 3.11.0 for 32 bit, but it also doesn’t work. Do you have other suggetions, 
that it works?







Von: Eryk Sun
Gesendet: ‎Donnerstag‎, ‎3‎. ‎November‎ ‎2022 ‎22‎:‎50
An: darkst...@o2online.de
Cc: python-list@python.org





On 11/3/22, darkst...@o2online.de  wrote:
> Is there a reason, why it is not installed? Its the same check mark in the
> installer like IDLE…

Did you try what I suggested? Modify the installation to remove the
tkinter/IDLE component. Then modify it again to select the component
to be reinstalled. Also, try to repair the installation. This may
reset any DLLs or extension modules that were missing or that were the
wrong version.

Ignore the suggestion from Nithish to install tkinter via pip. tkinter
is part of the standard library and cannot be installed via pip. There
is no tkinter package on the Python package index (pypi.org).
-- 
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-04 Thread darkstone
Yes, there is always the message “modified successfull”, “installed 
sucessfully”, but IDLE does’t start. I tried it with the newer Version, too. 
Ist 3.11.0 for 32 bit, but it also doesn’t work. Do you have other suggetions, 
that it works?







Von: Eryk Sun
Gesendet: ‎Donnerstag‎, ‎3‎. ‎November‎ ‎2022 ‎22‎:‎50
An: darkst...@o2online.de
Cc: python-list@python.org





On 11/3/22, darkst...@o2online.de  wrote:
> Is there a reason, why it is not installed? Its the same check mark in the
> installer like IDLE…

Did you try what I suggested? Modify the installation to remove the
tkinter/IDLE component. Then modify it again to select the component
to be reinstalled. Also, try to repair the installation. This may
reset any DLLs or extension modules that were missing or that were the
wrong version.

Ignore the suggestion from Nithish to install tkinter via pip. tkinter
is part of the standard library and cannot be installed via pip. There
is no tkinter package on the Python package index (pypi.org).
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-03 Thread Eryk Sun
On 11/3/22, darkst...@o2online.de  wrote:
> Is there a reason, why it is not installed? Its the same check mark in the
> installer like IDLE…

Did you try what I suggested? Modify the installation to remove the
tkinter/IDLE component. Then modify it again to select the component
to be reinstalled. Also, try to repair the installation. This may
reset any DLLs or extension modules that were missing or that were the
wrong version.

Ignore the suggestion from Nithish to install tkinter via pip. tkinter
is part of the standard library and cannot be installed via pip. There
is no tkinter package on the Python package index (pypi.org).
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-01 Thread Eryk Sun
On 11/1/22, Nithish Ramasamy  wrote:
>
> pip install tkinter
> Wait some minutes to install tkinter

There is no tkinter package on PyPI. It's part of the standard library
and included with the python.org installer as an optional component.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-11-01 Thread Eryk Sun
On 11/1/22, darkst...@o2online.de  wrote:
>
> **IDLE can’t Import TKINTER
>
> Python may not be configured for TK**
>
> Checkmark for TK is set in the Installation Progress. What went wrong and ho
> can I fix it?

Run the following command to check whether the ImportError has any
further information.

py -3.10-32 -c "from tkinter import *"

It could be a missing extension module or DLL, or mismatched version.
You could try modifying the installation to remove tkinter and IDLE,
and then again to restore it.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-10-31 Thread Eryk Sun
On 10/31/22, darkst...@o2online.de  wrote:
>
> I installed the Standard Distribution from python.org again, and i ensured,
> that the checkmark test Suite is enabled. Idle does’nt start. The installer
> says “Installation successfully” at the end.
>
> What went wrong and how can I further delimit the fault/find the error?

Open a command prompt and run the following command:

py -3.10-32 -m idlelib

If it fails, an exception and traceback should be printed to the console.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-10-31 Thread Eryk Sun
On 10/31/22, darkst...@o2online.de  wrote:
>
> i uninstalled this, because my Idle doesn’t start by clicking on the Icon.
> Are there any Solutions for the problem?

If it's the standard distribution from python.org, run the installer
again, and ensure that the test suite is installed.

In 3.10.8, IDLE mistakenly depends on the test suite. This mistake is
fixed in 3.10.9, which is planned to be released in early December.
-- 
https://mail.python.org/mailman/listinfo/python-list


Problems with IDLE in Windows 8.1 and installer x86 Version 3.10.8

2022-10-31 Thread darkstone
Dear Sir or Madam,







i uninstalled this, because my Idle doesn’t start by clicking on the Icon. Are 
there any Solutions for the problem?




Thanks,




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


Re: when I open a python idle it's constantly showing subprocess connection error

2022-09-20 Thread Mats Wichmann

On 9/20/22 09:36, asika wrote:
 

 


Sent from [1]Mail for Windows

 


References

Visible links
1. https://go.microsoft.com/fwlink/?LinkId=550986


dunno if you were trying to send screenshots or something, that doesn't 
work here.


Try:

https://docs.python.org/3/library/idle.html#startup-failure

Hint: you usually named a file you were working on the same as something 
IDLE uses, that's the usual cause these days.


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


when I open a python idle it's constantly showing subprocess connection error

2022-09-20 Thread asika
    

    

   Sent from [1]Mail for Windows

    

References

   Visible links
   1. https://go.microsoft.com/fwlink/?LinkId=550986
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Help: Unable to find IDLE folder inside the Python Lib folder

2022-03-05 Thread MRAB

On 2022-03-05 20:36, Deji Olofinboba via Python-list wrote:


Dear Python officer,
Please I am new to programming. I have justinstalled the python 3.10.2. After 
the installation, I was able to locate thePython Shell but unable to locate 
IDLE despite checking it before downloading in the python installation folder. 
I also reinstalled Python and checked IDLE; still the IDLE is still missing. 
Please. explain to me how I can retrieve the python IDLE.
Thank You,


If you're on Windows 10, type "idle" into the search box on the taskbar.
Alternatively, look in python_folder\Lib\idlelib for idle.bat if you're 
on an older version of Windows.

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


Help: Unable to find IDLE folder inside the Python Lib folder

2022-03-05 Thread Deji Olofinboba via Python-list

Dear Python officer,
Please I am new to programming. I have justinstalled the python 3.10.2. After 
the installation, I was able to locate thePython Shell but unable to locate 
IDLE despite checking it before downloading in the python installation folder. 
I also reinstalled Python and checked IDLE; still the IDLE is still missing. 
Please. explain to me how I can retrieve the python IDLE.
Thank You,

 

Deji Olofinboba 

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


Re: how I can get python idle?

2021-12-02 Thread Mats Wichmann



On 12/2/21 13:37, nikos petsios wrote:


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

If you're on windows you likely have it if you installed Python.
--
https://mail.python.org/mailman/listinfo/python-list


how I can get python idle?

2021-12-02 Thread nikos petsios
    

    

   Sent from [1]Mail for Windows 10

    

   [2][IMG] Virus-free. [3]www.avast.com

References

   Visible links
   1. https://go.microsoft.com/fwlink/?LinkId=550986
   2. 
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon
   3. 
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE is not working after Python installation .

2021-06-22 Thread Mats Wichmann



On 6/21/21 11:14 PM, Ayaana Soni wrote:

I  have installed python from your site. After installation my IDLE doesn't
work.  IDLE is not in my search list. Plz help!!




Thank you!



you asked this before, and didn't answer the questions you got in reply.

What does "doesn't work" mean? How is the problem manifested?  Doesn't 
IDLE selected from the start menu come up? Normally the installation 
creates a shortcut there that "does the right thing".  On Windows you 
don't normally start IDLE by typing a command name. You *can* bring it 
up from a command-line if you type


py -m idlelib

but this is definitely not the most common way to launch.

If you haven't read it, look at

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


among other things, the Microsoft Store version of Python is sometimes a 
little easier to get started with (it's the same programs, just packaged 
differently)

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


Re: IDLE is not working after Python installation .

2021-06-22 Thread Terry Reedy

On 6/22/2021 1:14 AM, Ayaana Soni wrote:

I  have installed python from your site.


For what OS.


After installation my IDLE doesn't work.


How did you try to start it?  Did you read the Using Python doc on the 
website?  Can you start python?



 IDLE is not in my search list.


On Windows and macOS, IDLE is usually started from an installed icon.

--
Terry Jan Reedy

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


IDLE is not working after Python installation .

2021-06-21 Thread Ayaana Soni
I  have installed python from your site. After installation my IDLE doesn't
work.  IDLE is not in my search list. Plz help!!




Thank you!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE python

2021-03-13 Thread Terry Reedy

On 3/11/2021 10:28 AM, Yoosuf Oluwatosin via Python-list wrote:


I have tried to startup my IDLE python severally but it keeps giving the 
following message:
IDLE’s  subprocess didn’t make connection. See the ‘Startup Failure’ section of 
the IDLE doc online at 
https://docs.python.org/3/library/idle.html#startup-failure.
I have gone to the page and followed all the procedures listed there but there is still no change. 


Did you try starting from a command line?

I need help on this.

I included in that page every reason and remedy I knew or could find on 
stackoverflow.  But what OS and Python version?  How did you try to 
start IDLE?  What happens with "python -m idlelib -e" on a command line 
(where 'python' is the word to start 3.x)?


--
Terry Jan Reedy


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


IDLE python

2021-03-11 Thread Yoosuf Oluwatosin via Python-list

I have tried to startup my IDLE python severally but it keeps giving the 
following message:
IDLE’s  subprocess didn’t make connection. See the ‘Startup Failure’ section of 
the IDLE doc online at 
https://docs.python.org/3/library/idle.html#startup-failure. 
I have gone to the page and followed all the procedures listed there but there 
is still no change. I need help on this
Sent from Mail for Windows 10

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


Re: Idle Python issue

2021-02-24 Thread Terry Reedy

On 2/24/2021 5:32 AM, jak wrote:

Hello everybody,
I encounter a problem using Idle Python in Windows when I use utf8 
characters longer than 2 bytes such as the character representing the 
smile emoticon:


The problem is with 'astral' unicode characters, those not in the Basic 
Multilingual Plane (BMP).  tcl/tk does not directly support them.



:-)
that is this:
😊
Try to write this in Idle:
"😊".encode('utf8')
b'\xf0\x9f\x98\x8a'


Up until 1 1/2 years ago, you could not do this.  Now you can, as long 
as you do not try to edit anything after the astral character.  I 
thought I added something to the doc about this, but cannot find it, so 
it should be easier to find.



now try to write this:
"".encode('utf8')
now position the cursor between the double quotes and paste the smile 
character


Up until 1.5 years ago, this would have crashed either the window or 
IDLE itself.  For input, if one wants to edit, one is still better off 
using \U000# excapes.  At least now print('\U0001'), for 
instance, works to display the character is the OS font system supports it.



and try to add some text to the string (eg: 'the smile').
You may notice problems with editing.
Is there any way to prevent this from happening? It is an annoying problem.


Help the tcl/tk people to add full unicode support to tcl/tk. ;-)  They 
know it is needed.  I don't know what their timetable is now.



--
Terry Jan Reedy


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


Idle Python issue

2021-02-24 Thread jak

Hello everybody,
I encounter a problem using Idle Python in Windows when I use utf8 
characters longer than 2 bytes such as the character representing the 
smile emoticon:

:-)
that is this:
😊
Try to write this in Idle:
"😊".encode('utf8')
b'\xf0\x9f\x98\x8a'
now try to write this:
"".encode('utf8')
now position the cursor between the double quotes and paste the smile 
character and try to add some text to the string (eg: 'the smile').

You may notice problems with editing.
Is there any way to prevent this from happening? It is an annoying problem.
Thanks for your attention.

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


Re: IDLE

2021-02-16 Thread Terry Reedy

On 2/16/2021 11:52 AM, Mats Wichmann wrote:

On 2/16/21 8:09 AM, Will Anderson wrote:

    Hi, I hope you are having a good day. I have a small IDLE problem and
    can’t seem to fix it. I have a .py file that I want to open using 
IDLE but

    there is no option I have even tried totally wiping python and
    reinstalling it nothing seems to work. Please help.


Can you describe what you mean by "there is no option"?

Normally, you click on the File menu, then click on Open. If you don't 
see these, maybe you have the wrong thing open in the first place?


Will, include what version of what operating system, the python versions 
you have and where obtained, whether you can run python itself, and how 
you tried run IDLE and open a file.


--
Terry Jan Reedy


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


Re: IDLE

2021-02-16 Thread Mats Wichmann

On 2/16/21 8:09 AM, Will Anderson wrote:

Hi, I hope you are having a good day. I have a small IDLE problem and
can’t seem to fix it. I have a .py file that I want to open using IDLE but
there is no option I have even tried totally wiping python and
reinstalling it nothing seems to work. Please help.


Can you describe what you mean by "there is no option"?

Normally, you click on the File menu, then click on Open. If you don't 
see these, maybe you have the wrong thing open in the first place?

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


IDLE

2021-02-16 Thread Will Anderson
   Hi, I hope you are having a good day. I have a small IDLE problem and
   can’t seem to fix it. I have a .py file that I want to open using IDLE but
   there is no option I have even tried totally wiping python and
   reinstalling it nothing seems to work. Please help.

    

    

   Will Anderson

   [1]andersonwill...@gmail.com

   [2]Website

    

    

References

   Visible links
   1. mailto:andersonwill...@gmail.com
   2. https://sites.google.com/view/willanderson/home
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Files can only be modified in IDLE, but not via Powershell

2021-02-09 Thread Stefan Ritter

Thanks for your advice! To be honest i'm not quite sure what did the
trick, I just played a little bit around with the paths. Anyway, now its
working as expected. Bless your crystal ball!

Needless to say: Many thanks for all the other responses i did receive!

Am 09.02.2021 um 10:50 schrieb Peter Otten:

On 08/02/2021 22:33, Stefan Ritter wrote:


Hi,

It would be highly appreciated if you could offer me some advice to
solve a problem I'm currently facing:

I have a Windows 10 ADM64 desktop and a Windows 10 AMD64 Laptop.

I wrote some code to insert text in a .txt-file. It works perfectly on
my laptop.

On my desktop it works only if i run it in IDLE, the text appears
afterwards in the file . However it does not work if run it in
Powershell (or anything else), there are no changes made in the file.

I do not understand why this is the case. Python version, installation
paths and user are the same on desktop and laptop. I searched a bit and
found out that this issue might be caused by my antivirus software
comodo, but even after I replaced it with antivir, an reinstalled python
this didn't change anything.

As mentionned, any help is highly appreciated. If you need any
additional information please let me know!


My crystal ball says Idle and the shell use different working
directories; you have a relative path, change one file and are looking
at the other.

If that's not the case -- show us the code.
If there is an error message and a traceback provide that, too.

Use copy-and-paste for both code and error.

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


Re: Files can only be modified in IDLE, but not via Powershell

2021-02-09 Thread Dan Stromberg
On Mon, Feb 8, 2021 at 4:22 PM Stefan Ritter  wrote:

>
> Hi,
>
> It would be highly appreciated if you could offer me some advice to
> solve a problem I'm currently facing:
>


> afterwards in the file . However it does not work if run it in
> Powershell (or anything else), there are no changes made in the file.
>
> I do not understand why this is the case. Python version, installation
> paths and user are the same on desktop and laptop. I searched a bit and
> found out that this issue might be caused by my antivirus software
> comodo, but even after I replaced it with antivir, an reinstalled python
> this didn't change anything.
>
> As mentionned, any help is highly appreciated. If you need any
> additional information please let me know!
>
It's probably either two different paths, or an ignored traceback.

Please cut and paste the output of your script - one paste for the working
output, and one for the nonworking output.

You may want to use os.path.abspath(*path*) on your path, and print it to
the screen.  Then compare that to Resolve-Path pathname in Powershell.

HTH

References:
https://docs.python.org/3/library/os.path.html
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/resolve-path?view=powershell-7.1
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Files can only be modified in IDLE, but not via Powershell

2021-02-09 Thread Alan Gauld via Python-list
On 08/02/2021 21:33, Stefan Ritter wrote:

> I have a Windows 10 ADM64 desktop and a Windows 10 AMD64 Laptop.

So notionally identical.

> I wrote some code to insert text in a .txt-file. It works perfectly on
> my laptop.
> 
> On my desktop it works only if i run it in IDLE, the text appears
> afterwards in the file . However it does not work if run it in
> Powershell (or anything else), there are no changes made in the file.

You only mention powershell in the context of the desktop.

How are you running the code.
Can you show us the command line for both laptop and desktop?
Or describe exactly what you are doing if using a GUI tool.

Showing us the code may help too!

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


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


Re: Files can only be modified in IDLE, but not via Powershell

2021-02-09 Thread Terry Reedy

On 2/8/2021 4:33 PM, Stefan Ritter wrote:


Hi,

It would be highly appreciated if you could offer me some advice to
solve a problem I'm currently facing:

I have a Windows 10 ADM64 desktop and a Windows 10 AMD64 Laptop.

I wrote some code to insert text in a .txt-file. It works perfectly on
my laptop.

On my desktop it works only if i run it in IDLE, the text appears
afterwards in the file . However it does not work if run it in
Powershell (or anything else), there are no changes made in the file.


Find the minimum code that exhibits a behavior difference.  It should be 
short enough to post here, along with the command you used to run it in 
PowerShell or CommandPrompt and how you ran it in IDLE.



I do not understand why this is the case. Python version, installation
paths and user are the same on desktop and laptop. I searched a bit and
found out that this issue might be caused by my antivirus software
comodo, but even after I replaced it with antivir, an reinstalled python
this didn't change anything.

As mentionned, any help is highly appreciated. If you need any
additional information please let me know!

Best regards,
Stefan





--
Terry Jan Reedy

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


Re: Files can only be modified in IDLE, but not via Powershell

2021-02-09 Thread Peter Otten

On 08/02/2021 22:33, Stefan Ritter wrote:


Hi,

It would be highly appreciated if you could offer me some advice to
solve a problem I'm currently facing:

I have a Windows 10 ADM64 desktop and a Windows 10 AMD64 Laptop.

I wrote some code to insert text in a .txt-file. It works perfectly on
my laptop.

On my desktop it works only if i run it in IDLE, the text appears
afterwards in the file . However it does not work if run it in
Powershell (or anything else), there are no changes made in the file.

I do not understand why this is the case. Python version, installation
paths and user are the same on desktop and laptop. I searched a bit and
found out that this issue might be caused by my antivirus software
comodo, but even after I replaced it with antivir, an reinstalled python
this didn't change anything.

As mentionned, any help is highly appreciated. If you need any
additional information please let me know!


My crystal ball says Idle and the shell use different working 
directories; you have a relative path, change one file and are looking 
at the other.


If that's not the case -- show us the code.
If there is an error message and a traceback provide that, too.

Use copy-and-paste for both code and error.

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


Re: Files can only be modified in IDLE, but not via Powershell

2021-02-08 Thread MRAB

On 2021-02-08 21:33, Stefan Ritter wrote:


Hi,

It would be highly appreciated if you could offer me some advice to
solve a problem I'm currently facing:

I have a Windows 10 ADM64 desktop and a Windows 10 AMD64 Laptop.

I wrote some code to insert text in a .txt-file. It works perfectly on
my laptop.

On my desktop it works only if i run it in IDLE, the text appears
afterwards in the file . However it does not work if run it in
Powershell (or anything else), there are no changes made in the file.

I do not understand why this is the case. Python version, installation
paths and user are the same on desktop and laptop. I searched a bit and
found out that this issue might be caused by my antivirus software
comodo, but even after I replaced it with antivir, an reinstalled python
this didn't change anything.

As mentionned, any help is highly appreciated. If you need any
additional information please let me know!


It's difficult to troubleshoot with any code.
--
https://mail.python.org/mailman/listinfo/python-list


Files can only be modified in IDLE, but not via Powershell

2021-02-08 Thread Stefan Ritter



Hi,

It would be highly appreciated if you could offer me some advice to
solve a problem I'm currently facing:

I have a Windows 10 ADM64 desktop and a Windows 10 AMD64 Laptop.

I wrote some code to insert text in a .txt-file. It works perfectly on
my laptop.

On my desktop it works only if i run it in IDLE, the text appears
afterwards in the file . However it does not work if run it in
Powershell (or anything else), there are no changes made in the file.

I do not understand why this is the case. Python version, installation
paths and user are the same on desktop and laptop. I searched a bit and
found out that this issue might be caused by my antivirus software
comodo, but even after I replaced it with antivir, an reinstalled python
this didn't change anything.

As mentionned, any help is highly appreciated. If you need any
additional information please let me know!

Best regards,
Stefan


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


Re: Python idle did not open even after trying many times

2020-12-09 Thread Terry Reedy

On 12/9/2020 11:08 AM, avinash gaur wrote:

Dear Sir/Mam,
I am facing a problem with Python Idle. I am unable to open python idle
even after clicking on it so many times. I am using Python 3.7 on Windows.


What are you clicking on?
Did IDLE work before?  (If you just installed 3.7, why?)

Can you start interactive Python?  and get >>> prompt?
Does 'import tkinter' work?
Does 'import idlelib.idle' work?
--
Terry Jan Reedy

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


Python idle did not open even after trying many times

2020-12-09 Thread avinash gaur
Dear Sir/Mam,
I am facing a problem with Python Idle. I am unable to open python idle
even after clicking on it so many times. I am using Python 3.7 on Windows.
I have already installed and uninstalled python 3.7 so many times. But it
is not working
Any help will be appreciated
Thanking you
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE error

2020-12-01 Thread Igor Korot
Hi, Alvaro,

On Tue, Dec 1, 2020 at 9:11 PM Álvaro d'Ors
 wrote:
>
> The IDLE seems to be malfunctioning, I just re-installed Python and used
> the reapir function but I can’t open the IDLE, please help.

What OS do you use?
Are you trying to run it by double-clicking on the icon?
What happens? Does it give you any error?

Thank you.

>
>
>
> --
> Nestares D. Álvaro
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


IDLE error

2020-12-01 Thread Álvaro d'Ors
The IDLE seems to be malfunctioning, I just re-installed Python and used
the reapir function but I can’t open the IDLE, please help.



-- 
Nestares D. Álvaro
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Weird behavior for IDLE...

2020-10-13 Thread Terry Reedy

On 10/13/2020 4:51 AM, Steve wrote:

Why does IDLE always open with the lowest three lines of the window end up
hidden below the bottom of the screen behind the task bar? Every time I use
it,  I have to stop and grab the top of the window and drag it up to see the
line and row information.  I explored the Options/Configure IDLE but did not
see anything that would help.


The issue is lines on the screen, which depends on screen, font, and 
fontsize, versus lines in the editor window plus lines above the editor 
window.  On the General tab, you can ask for fewer lines in the editor 
window.


Use Options -> Zoom Height to get the max lines possible.

The positioning of the top of the window is the tk default.  This might 
be changed if it became the highest priority.


--
Terry Jan Reedy

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


Weird behavior for IDLE...

2020-10-13 Thread Steve
Why does IDLE always open with the lowest three lines of the window end up
hidden below the bottom of the screen behind the task bar? Every time I use
it,  I have to stop and grab the top of the window and drag it up to see the
line and row information.  I explored the Options/Configure IDLE but did not
see anything that would help.

It is most annoying, is there a fix for it?
I explored 
Steve
==
Footnote: 
Mars is the only known planet in our solar system solely inhabited by
functioning robots.


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


Re: IDLE: New Feature?

2020-08-11 Thread Terry Reedy

On 8/11/2020 4:26 AM, Steve wrote:

<< Simplest specification:
<< one list for all 3 search boxes;
<< start fresh each session

I do not understand what this means...


A proposed feature needs a specification with sufficient details to code 
and review.  Your proposal "a pull-down history list for Find' is too 
general."  This is typical of proposals, especially for IDLE it seems.


Should there be a list only for Find and not for Find/Replace and Find 
in Files?  Makes no sense.  A separate list for each?  What if you start 
with Find and then realize you want to replace?  Or find in the current 
file and realize that you want to find in multiple files.  I would want 
one list so I could transfer search terms.  (Another solution would be 
to link the boxes so one can transfer directly.)


How long is history kept?  Forever across sessions, or just for one 
session?  The latter is much easier.


--
Terry Jan Reedy

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


RE: IDLE: New Feature?

2020-08-11 Thread Steve
<< Simplest specification:
<< one list for all 3 search boxes;
<< start fresh each session

I do not understand what this means...



Footnote:
The only time "incorrectly" is spelled incorrectly 
is when it is spelled "incorrectly".

-Original Message-
From: Python-list  On
Behalf Of Terry Reedy
Sent: Sunday, August 9, 2020 9:51 PM
To: python-list@python.org
Subject: Re: IDLE: New Feature?

On 8/9/2020 7:39 PM, Steve wrote:
> Where would the conversation have to happen to get the forces-that-be 
> to install a pull-down/history menu for the Find option in IDLE?  To 
> have to retype the search option over and over when I am toggling 
> between two or more searches gets tiresome.  I would rather spend my 
> brain cells and bandwidth thinking about coding.
The IDLE-dev mail list
https://mail.python.org/mailman/listinfo/idle-dev
may or may not be active at any time.

Simplest specification:
one list for all 3 search boxes;
start fresh each session

If search boxes were non-modal, it might work to have two open for same
editor (not sure).

> Footnote:
> There's 99 bugs in the code, in the code.
> 99 bugs in the code.
> Take one down and patch it all around.
> Now there's 117 bugs in the code.

Argh!  I sometimes find a bug fixing a bug, but more often think of multiple
possible improvement when implementing one.

--
Terry Jan Reedy

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

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


Re: IDLE: New Feature?

2020-08-09 Thread Terry Reedy

On 8/9/2020 7:39 PM, Steve wrote:

Where would the conversation have to happen to get the forces-that-be to
install a pull-down/history menu for the Find option in IDLE?  To have to
retype the search option over and over when I am toggling between two or
more searches gets tiresome.  I would rather spend my brain cells and
bandwidth thinking about coding.

The IDLE-dev mail list
https://mail.python.org/mailman/listinfo/idle-dev
may or may not be active at any time.

Simplest specification:
one list for all 3 search boxes;
start fresh each session

If search boxes were non-modal, it might work to have two open for same 
editor (not sure).



Footnote:
There's 99 bugs in the code, in the code.
99 bugs in the code.
Take one down and patch it all around.
Now there's 117 bugs in the code.


Argh!  I sometimes find a bug fixing a bug, but more often think of 
multiple possible improvement when implementing one.


--
Terry Jan Reedy

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


Re: IDLE: New Feature?

2020-08-09 Thread Chris Angelico
On Mon, Aug 10, 2020 at 9:40 AM Steve  wrote:
>
> Where would the conversation have to happen to get the forces-that-be to
> install a pull-down/history menu for the Find option in IDLE?  To have to
> retype the search option over and over when I am toggling between two or
> more searches gets tiresome.  I would rather spend my brain cells and
> bandwidth thinking about coding.
>

You could raise that on python-ideas, but if you want to put some
effort into making it really really easy for Terry, you could try
implementing it - or at least the beginnings of it - as a pull
request. Idle is written in Python, so you can tinker with it without
writing any C code.

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


IDLE: New Feature?

2020-08-09 Thread Steve
Where would the conversation have to happen to get the forces-that-be to
install a pull-down/history menu for the Find option in IDLE?  To have to
retype the search option over and over when I am toggling between two or
more searches gets tiresome.  I would rather spend my brain cells and
bandwidth thinking about coding.

Steve


Footnote:
There's 99 bugs in the code, in the code.
99 bugs in the code.
Take one down and patch it all around.
Now there's 117 bugs in the code.

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


Re: IDLE 3.8.4 [was 3.8.3] -- bug report

2020-08-03 Thread Ned Deily
On 2020-08-03 15:37, Halvard Tislavoll wrote:
> I'am dealing with a bug
[...]
> Python 3.8.4 (default, Jul 20 2020, 20:20:14)
> IDLE 3.8.4
> 
> I have been using IDLE for many years. But now I can not do it.
> 
> Example:
> I write a heading for a python script in my text editor, xed and save as 
> 'test.py'.
> ..
>     #! /usr/bin/env python
>     #  -*- coding: utf-8 -*-
> 
>     # ... pandas-techniques-python-data-manipulation/
> 
>     import pandas as pd
>     import numpy as np
> 
>     #---
> ...
> Then I open 'test.py' in IDLE. Everything looks normal.
> 
> I am testing whether it is possible to save with the shortcut ctrl-s. OK.
> 
> But then I write the following line:
> 
>     print ("\ n # 1 - Boolean Indexing in Pandas \ n")
> 
> Result:
> storage no longer works. And IDLE becomes useless!
> 
> The problem is that print statement no longer support my sign "-" U + 2013 EN 
> DASH
> 
> but this sign goes well;  "-" U + 002D HYPHEN-MINUS

See https://bugs.python.org/issue41300

The problem was introduced in Python 3.8.4 (released 2020-07-13) and has
been fixed in 3.8.5 which was released 2020-07-20.


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


IDLE 3.8.3 -- bug report

2020-08-03 Thread Halvard Tislavoll

I'am dealing with a bug

My machine:
Type: Laptop
    System: Hewlett-Packard
    product: HP EliteBook 8770w
    v: A1029D1102
    Prosessor: Intel© Core™ i7-3720QM CPU @ 2.60GHz × 4
    RAM: 15.6 GiB
    Hd: 2577.6 GB
    Graphic card: NVIDIA Corporation GK104GLM [Quadro K3000M]

Operating system:   Linux Mint 20 Cinnamon
    Cinnamon version: 4.6.6
    Linux kernal: 5.4.0-42-generic

pyenv 1.2.20
Python 3.8.4 (default, Jul 20 2020, 20:20:14)
IDLE 3.8.4

I have been using IDLE for many years. But now I can not do it.

Example:
I write a heading for a python script in my text editor, xed and save as 
'test.py'.
..
    #! /usr/bin/env python
    #  -*- coding: utf-8 -*-

    # ... pandas-techniques-python-data-manipulation/

    import pandas as pd
    import numpy as np

    #---
...
Then I open 'test.py' in IDLE. Everything looks normal.

I am testing whether it is possible to save with the shortcut ctrl-s. OK.

But then I write the following line:

    print ("\ n # 1 - Boolean Indexing in Pandas \ n")

Result:
storage no longer works. And IDLE becomes useless!

The problem is that print statement no longer support my sign "-" U + 2013 EN 
DASH

but this sign goes well;  "-" U + 002D HYPHEN-MINUS

Want to get this fixed

Thank you in advance, Halvard Tislavoll
 


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


Re: Having trouble importing the python turtle on idle

2020-05-17 Thread Terry Reedy

On 5/16/2020 8:58 AM, KINGHAMED io wrote:


Hello my name is Hamed
I have purchased python for kids.
I have installed idle and Python launcher 3.8.3 with my 11 inch MacBook
Air (Mac OS Sierra)version 10.12.6
I have followed all the instructions all the way through for installation
I even downloaded activetcl and had no issues with instructions until
chapter 4 page 45


The activetcl instructions in the book are obsolete.  The 3.8 python.org 
macOS installer comes with a recent version of tcl/tk (8.6.8) compiled 
to work with the 3.8 that it installs.  Another tcl/tk binary may not work.


First, when running IDLE, select on the menu IDLE and About IDLE.  What 
is the tk version? It should be 8.6.8.


Second, start Terminal and enter
... $ python3.8 -m turtle
This should start a turtle demo that draws and erases two patterns.


which is importing the python turtle on to my screen.
However I have troubleshooted every possible way to get this right even


What is wrong?


uninstalling and reinstalling Python several times.
Can you please advise me on how to import the python turtle.


Any of the following.

import turtle
import turtle as t
from turtle import *


--
Terry Jan Reedy

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


Re: Having trouble importing the python turtle on idle

2020-05-16 Thread Souvik Dutta
What is the error?

Souvik flutter dev

On Sat, May 16, 2020, 8:27 PM KINGHAMED io  wrote:

> On Sat, 16 May 2020 at 4:38 PM KINGHAMED io 
> wrote:
>
> > Hello my name is Hamed
> > I have purchased python for kids.
> > I have installed idle and Python launcher 3.8.3 with my 11 inch MacBook
> > Air (Mac OS Sierra)version 10.12.6
> > I have followed all the instructions all the way through for installation
> > I even downloaded activetcl and had no issues with instructions until
> > chapter 4 page 45
> > which is importing the python turtle on to my screen.
> > However I have troubleshooted every possible way to get this right even
> > uninstalling and reinstalling Python several times.
> > Can you please advise me on how to import the python turtle.
> >
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Having trouble importing the python turtle on idle

2020-05-16 Thread Bischoop
On 2020-05-16, KINGHAMED io  wrote:
> On Sat, 16 May 2020 at 4:38 PM KINGHAMED io 
> wrote:
>
>> Hello my name is Hamed
>> I have purchased python for kids.
>> I have installed idle and Python launcher 3.8.3 with my 11 inch MacBook
>> Air (Mac OS Sierra)version 10.12.6
>> I have followed all the instructions all the way through for installation
>> I even downloaded activetcl and had no issues with instructions until
>> chapter 4 page 45
>> which is importing the python turtle on to my screen.
>> However I have troubleshooted every possible way to get this right even
>> uninstalling and reinstalling Python several times.
>> Can you please advise me on how to import the python turtle.
>>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Having trouble importing the python turtle on idle

2020-05-16 Thread KINGHAMED io
On Sat, 16 May 2020 at 4:38 PM KINGHAMED io 
wrote:

> Hello my name is Hamed
> I have purchased python for kids.
> I have installed idle and Python launcher 3.8.3 with my 11 inch MacBook
> Air (Mac OS Sierra)version 10.12.6
> I have followed all the instructions all the way through for installation
> I even downloaded activetcl and had no issues with instructions until
> chapter 4 page 45
> which is importing the python turtle on to my screen.
> However I have troubleshooted every possible way to get this right even
> uninstalling and reinstalling Python several times.
> Can you please advise me on how to import the python turtle.
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: PROBLEM WITH PYTHON IDLE

2020-05-14 Thread Mats Wichmann
On 5/14/20 5:15 AM, aduojo samson wrote:
> Hello, my name is Samson Haruna and I am from Nigeria.I have a problem with
> my python 3.8, any time I click on it to write my python code I get this
> error message "IDLE subprocess didn't make connection". I have uninstalled
> and reinstalled several times, I have even deleted and downloaded a new
> one, it works for some time then it stops giving me the above mentioned
> error message. what can I do.

Did you read the instructions in the link presented when it gives you
that error?

https://docs.python.org/3/library/idle.html#startup-failure

Does this help?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: PROBLEM WITH PYTHON IDLE

2020-05-14 Thread Souvik Dutta
What is your os? Where have you downloaded it from? What type of package
did you download?
Souvik flutter dev

On Thu, May 14, 2020, 5:36 PM aduojo samson  wrote:

> Hello, my name is Samson Haruna and I am from Nigeria.I have a problem with
> my python 3.8, any time I click on it to write my python code I get this
> error message "IDLE subprocess didn't make connection". I have uninstalled
> and reinstalled several times, I have even deleted and downloaded a new
> one, it works for some time then it stops giving me the above mentioned
> error message. what can I do.
>
> Samson.A.Haruna
> 08106587039
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


PROBLEM WITH PYTHON IDLE

2020-05-14 Thread aduojo samson
Hello, my name is Samson Haruna and I am from Nigeria.I have a problem with
my python 3.8, any time I click on it to write my python code I get this
error message "IDLE subprocess didn't make connection". I have uninstalled
and reinstalled several times, I have even deleted and downloaded a new
one, it works for some time then it stops giving me the above mentioned
error message. what can I do.

Samson.A.Haruna
08106587039
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Idle not opening

2020-05-07 Thread Terry Reedy

On 5/6/2020 9:46 AM, Rance Victor wrote:

Hey there,
After successfully installing Python 3.8.2(64 bit)  on my system(windows 10
64 bit OS), my idle is not opening. I've tried uninstalling and
reinstalling it again but still the same result.


Was the box for installing tkinter and IDLE checked?
How did you try to run IDLE?
Can you run Python itself -- from the start menu or command prompt, the 
latter either with > py or > python
Is so, does 'import tkinter' work?  Does 'dir(tkinter)' has a couple 
hundred entries?
If the above, what does 'import idlelib.idle' do, or at command line, 
'py -m idlelib'?


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


Re: Idle not opening

2020-05-06 Thread Souvik Dutta
What exactly are you seeing when you try to open idle? Don't attach any
file or photo. Just say verbally.

Souvik flutter dev

On Wed, May 6, 2020, 7:40 PM Rance Victor  wrote:

> Hey there,
> After successfully installing Python 3.8.2(64 bit)  on my system(windows 10
> 64 bit OS), my idle is not opening. I've tried uninstalling and
> reinstalling it again but still the same result.
> Looking forward to a fix please.
> Thanks
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Idle not opening

2020-05-06 Thread Rance Victor
Hey there,
After successfully installing Python 3.8.2(64 bit)  on my system(windows 10
64 bit OS), my idle is not opening. I've tried uninstalling and
reinstalling it again but still the same result.
Looking forward to a fix please.
Thanks
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: IDLE, TCP/IP problem.

2020-01-16 Thread Greg Ewing

On 16/01/20 10:06 pm, Muju's message wrote:


“IDLE cannot bind to a TCP/IP port, which is necessary to communicate
with its Python execution server. This might be because no networking
is installed on this computer.


There might be firewall settings or anti-virus software preventing
the port from being opened.

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


IDLE, TCP/IP problem.

2020-01-16 Thread Muju's message


Sent from Mail for Windows 10

When I open IDLE a popup appears, which says

“IDLE cannot bind to a TCP/IP port, which is necessary to communicate with its 
Python execution server. This might be because no networking is installed on 
this computer. Run IDLE with the -n command line switch to start without a 
subprocess and refer to HELP/IDLE Help ‘Running without a subprocess’ for 
further detail.” 

What should I do now? I am new to python and have recently installed python 
3.8.1 in my pc (Windows 10).

Any help is appreciated 😊.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Funny behavior of IDLE 3.7.0

2019-11-12 Thread Chris Angelico
On Wed, Nov 13, 2019 at 11:00 AM Terry Reedy  wrote:
>
> On 11/12/2019 12:00 PM, Chris Angelico wrote:
> > On Wed, Nov 13, 2019 at 3:57 AM Terry Reedy  wrote:
> >>
> >> On 11/12/2019 8:29 AM, Chris Angelico wrote:
> >>
> >>> The OP said that the equals sign in the *first* line was flagged as
> >>> invalid syntax. Implication being that the error is being reported on
> >>> the line "i = 4", not on the print at the end. And in fact, I can
> >>> confirm this. Run | Check Module reports an error where i is assigned
> >>> to. Here's how it looks in command-line Python:
> >>>
> >>> $ python3.7 demo.py
> >>> File "", line 1
> >>>   (i=)
> >>> ^
> >>> SyntaxError: invalid syntax
> >>>
> >>> Newer Pythons are happy with this example, but if you replace the
> >>> error with something else - say, f'{i+}' - then the same phenomenon
> >>> occurs. Command-line Python reports the error on line 1 of
> >>> "", and Idle misinterprets that as line 1 of the original
> >>> file.
> >>>
> >>> This looks like an error reporting flaw in f-string handling.
> >>
> >> Can you open a bug issue (if not one already) and nosy me?
> >> This is awful for any IDE that processes error messages.
> >>
> >> Replacing {} with () is a secondary bug.  The actual code
> >> {i=}
> >> would be clearer, and make it easier for an IDE to search for the real 
> >> line.
> >>
> >
> > I can do that, but I actually think the correct fix isn't inside Idle.
>
> Right.  I meant a bug report against core Python.
>
> If the real bug is not fixed, I might do a workaround for IDLE, but I
> would prefer not.
>

Gotcha!

Turns out there is actually an open bug:

https://bugs.python.org/issue34364

But it cites a GitHub PR that has been merged already:

https://github.com/python/cpython/pull/10021

So I'm not sure what status actually is, since the current master
branch still has the problem.

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


Re: Funny behavior of IDLE 3.7.0

2019-11-12 Thread Terry Reedy

On 11/12/2019 12:00 PM, Chris Angelico wrote:

On Wed, Nov 13, 2019 at 3:57 AM Terry Reedy  wrote:


On 11/12/2019 8:29 AM, Chris Angelico wrote:


The OP said that the equals sign in the *first* line was flagged as
invalid syntax. Implication being that the error is being reported on
the line "i = 4", not on the print at the end. And in fact, I can
confirm this. Run | Check Module reports an error where i is assigned
to. Here's how it looks in command-line Python:

$ python3.7 demo.py
File "", line 1
  (i=)
^
SyntaxError: invalid syntax

Newer Pythons are happy with this example, but if you replace the
error with something else - say, f'{i+}' - then the same phenomenon
occurs. Command-line Python reports the error on line 1 of
"", and Idle misinterprets that as line 1 of the original
file.

This looks like an error reporting flaw in f-string handling.


Can you open a bug issue (if not one already) and nosy me?
This is awful for any IDE that processes error messages.

Replacing {} with () is a secondary bug.  The actual code
{i=}
would be clearer, and make it easier for an IDE to search for the real line.



I can do that, but I actually think the correct fix isn't inside Idle.


Right.  I meant a bug report against core Python.

If the real bug is not fixed, I might do a workaround for IDLE, but I 
would prefer not.



See the followup regarding the difference between SyntaxError and
NameError; in the latter case, the error is more usefully reported.

ChrisA




--
Terry Jan Reedy

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


Re: Funny behavior of IDLE 3.7.0

2019-11-12 Thread Chris Angelico
On Wed, Nov 13, 2019 at 3:57 AM Terry Reedy  wrote:
>
> On 11/12/2019 8:29 AM, Chris Angelico wrote:
>
> > The OP said that the equals sign in the *first* line was flagged as
> > invalid syntax. Implication being that the error is being reported on
> > the line "i = 4", not on the print at the end. And in fact, I can
> > confirm this. Run | Check Module reports an error where i is assigned
> > to. Here's how it looks in command-line Python:
> >
> > $ python3.7 demo.py
> >File "", line 1
> >  (i=)
> >^
> > SyntaxError: invalid syntax
> >
> > Newer Pythons are happy with this example, but if you replace the
> > error with something else - say, f'{i+}' - then the same phenomenon
> > occurs. Command-line Python reports the error on line 1 of
> > "", and Idle misinterprets that as line 1 of the original
> > file.
> >
> > This looks like an error reporting flaw in f-string handling.
>
> Can you open a bug issue (if not one already) and nosy me?
> This is awful for any IDE that processes error messages.
>
> Replacing {} with () is a secondary bug.  The actual code
>{i=}
> would be clearer, and make it easier for an IDE to search for the real line.
>

I can do that, but I actually think the correct fix isn't inside Idle.
See the followup regarding the difference between SyntaxError and
NameError; in the latter case, the error is more usefully reported.

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


Re: Funny behavior of IDLE 3.7.0

2019-11-12 Thread Terry Reedy

On 11/12/2019 8:29 AM, Chris Angelico wrote:


The OP said that the equals sign in the *first* line was flagged as
invalid syntax. Implication being that the error is being reported on
the line "i = 4", not on the print at the end. And in fact, I can
confirm this. Run | Check Module reports an error where i is assigned
to. Here's how it looks in command-line Python:

$ python3.7 demo.py
   File "", line 1
 (i=)
   ^
SyntaxError: invalid syntax

Newer Pythons are happy with this example, but if you replace the
error with something else - say, f'{i+}' - then the same phenomenon
occurs. Command-line Python reports the error on line 1 of
"", and Idle misinterprets that as line 1 of the original
file.

This looks like an error reporting flaw in f-string handling.


Can you open a bug issue (if not one already) and nosy me?
This is awful for any IDE that processes error messages.

Replacing {} with () is a secondary bug.  The actual code
  {i=}
would be clearer, and make it easier for an IDE to search for the real line.


IMO it
should just count the entire f-string as being at the line and file
that the f-string starts; when working with triple-quoted f-strings, I
was only able to get line numbers above 1 by having a multi-line
braced expression, and that's not something we should be encouraging.
This is also consistent with the way other errors in triple-quoted
strings are handled:

print('''hello
world
\N{ASDF}
asdf
qwer''')

   File "/home/rosuav/tmp/demo.py", line 1
 print('''hello
   ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes
in position 12-19: unknown Unicode character name

If it can find the position of the specific braced expression within
the string, great! But at very least, it should report the location of
the string in its original file.



--
Terry Jan Reedy

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


  1   2   3   4   5   6   7   8   9   10   >