Re: Help on ImportError('Error: Reinit is forbidden')

2023-05-18 Thread Barry
> On 17 May 2023, at 20:35, Jason Qian via Python-list > wrote: > >  Hi, > > I Need some of your help. > > I have the following C code to import *Import python.* It works 99% of > the time, but sometimes receives "*ImportError('Error: Reinit is > forbidden')*". error. > **We run multi

Learning tkinter

2023-05-18 Thread Rob Cliffe via Python-list
I am trying to learn tkinter. Several examples on the internet refer to a messagebox class (tkinter.messagebox). But: Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> impor

Re: Help on ImportError('Error: Reinit is forbidden')

2023-05-18 Thread Jason Qian via Python-list
Hi Barry, void handleError(const char* msg) { ... PyErr_Fetch(&pyExcType, &pyExcValue, &pyExcTraceback); PyErr_NormalizeException(&pyExcType, &pyExcValue, &pyExcTraceback); PyObject* str_value = PyObject_Repr(pyExcValue); PyObject* pyExcValueStr = PyUnicode_AsEncodedString(str_value, "utf-8", "Er

Re: Learning tkinter

2023-05-18 Thread Grant Edwards
On 2023-05-12, Rob Cliffe via Python-list wrote: > > Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 > bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import tkinter > >>> tkinter.messagebox > Traceback (most recent cal

Re: Learning tkinter

2023-05-18 Thread Oscar Benjamin
On Thu, 18 May 2023 at 10:16, Rob Cliffe via Python-list wrote: > > I am trying to learn tkinter. > Several examples on the internet refer to a messagebox class > (tkinter.messagebox). > But: > > Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 > bit (Intel)] on win32 > Typ

Re: Learning tkinter

2023-05-18 Thread Chris Angelico
On Thu, 18 May 2023 at 19:15, Rob Cliffe via Python-list wrote: > > I am trying to learn tkinter. > Several examples on the internet refer to a messagebox class > (tkinter.messagebox). > But: > > Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 > bit (Intel)] on win32 > Typ

Re: Help on ImportError('Error: Reinit is forbidden')

2023-05-18 Thread Barry
On 18 May 2023, at 13:56, Jason Qian wrote:  Hi Barry, void handleError(const char* msg) { ... PyErr_Fetch(&pyExcType, &pyExcValue, &pyExcTraceback); PyErr_NormalizeException(&pyExcType, &pyExcValue, &pyExcTraceback); PyObject* str_value = PyObject_R

RE: Learning tkinter

2023-05-18 Thread Jim Schwartz
This works for me. Hope it helps. from tkinter import messagebox messagebox.showerror("Hi", f"Hello World") -Original Message- From: Python-list On Behalf Of Rob Cliffe via Python-list Sent: Friday, May 12, 2023 3:55 AM To: Python Subject: Learning tkinter I am trying to learn tkint

Error installing packages or upgrading pip

2023-05-18 Thread Test Only
Hi there, I hope you are in a great health I am having a problem with python even though I uninstall and reinstall it again multiple times the error I get when I try to upgrade or install a package for example pip install requests I get this error which I could not find a solution for pip in

Re: Learning tkinter

2023-05-18 Thread Thomas Passin
On 5/18/2023 9:13 AM, Grant Edwards wrote: On 2023-05-12, Rob Cliffe via Python-list wrote: Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. import tkinter tkinter.messagebox

Tkinter (related)~

2023-05-18 Thread Jack Dangler
I didn't want to hijack another thread... I thought the OP of the tkinter thread currently running may have needed to install the tkinter package (since I had the same missing component error message), so I tried to install the package on to my Ubu laptop - pip install tkinter Defaulting to u

Re: Tkinter (related)~

2023-05-18 Thread Mats Wichmann
On 5/18/23 10:06, Jack Dangler wrote: I didn't want to hijack another thread... I thought the OP of the tkinter thread currently running may have needed to install the tkinter package (since I had the same missing component error message), so I tried to install the package on to my Ubu laptop

Re: Learning tkinter

2023-05-18 Thread Mats Wichmann
On 5/18/23 08:50, Jim Schwartz wrote: This works for me. Hope it helps. from tkinter import messagebox messagebox.showerror("Hi", f"Hello World") It's probably instructive that IDLE always brings it in this way. Lib/idlelib/config_key.py:from tkinter import messagebox Lib/idlelib/configdial

Re: Tkinter (related)~

2023-05-18 Thread Jack Dangler
On 5/18/23 12:33, Mats Wichmann wrote: On 5/18/23 10:06, Jack Dangler wrote: I didn't want to hijack another thread... I thought the OP of the tkinter thread currently running may have needed to install the tkinter package (since I had the same missing component error message), so I tried t

Re: Learning tkinter

2023-05-18 Thread MRAB
On 2023-05-12 09:55, Rob Cliffe via Python-list wrote: I am trying to learn tkinter. Several examples on the internet refer to a messagebox class (tkinter.messagebox). But: Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32 Type "help", "copyright", "c

Re: Tkinter (related)~

2023-05-18 Thread Cameron Simpson
On 18May2023 12:06, Jack Dangler wrote: I thought the OP of the tkinter thread currently running may have needed to install the tkinter package (since I had the same missing component error message), so I tried to install the package on to my Ubu laptop - pip install tkinter Defaulting to us

Re: Tkinter (related)~

2023-05-18 Thread Grant Edwards
On 2023-05-19, Cameron Simpson wrote: > On 18May2023 12:06, Jack Dangler wrote: >>I thought the OP of the tkinter thread currently running may have >>needed to install the tkinter package (since I had the same missing >>component error message), so I tried to install the package on to my >>Ubu

txtorcon 23.5.0

2023-05-18 Thread meejah
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 I'm happy to announce txtorcon 23.5.0 with the following changes: * twisted.web.client.Agent instances now use the same HTTPS policy by default as twisted.web.client.Agent. It is possible to override this policy with the tls_context_fac

Silly (maybe) question re imported module(s)

2023-05-18 Thread Grizzy Adams via Python-list
Morning All I'm working through the tutorial and running / saving work that I wish to keep and build on, most times I can save and (re)import later with no difference to when typed in console or editor and run with F5 (which saves before it can run) But sometimes saved work (albeit small) whe