# Python Help

**URL:** https://discuss.python.org/c/help/7.md

[Latest](https://discuss.python.org/latest.md) · [Categories](https://discuss.python.org/categories.md) · [Tags](https://discuss.python.org/tags.md)

---

## [About the Python Help category](https://discuss.python.org/t/about-the-python-help-category/42)

<div class="topic-metadata">

**Author:** [@system](https://discuss.python.org/u/system)\
**Replies:** 4\
**Last updated:** [May 31, 2022, 3:09am UTC](https://discuss.python.org/t/about-the-python-help-category/42 "2022-05-31T03:09:27Z")

</div>

General help/discussion forum for the Python programming language. All welcome. Please format your pasted code using Markdown backticks like this: \`\`\`python # YOUR CODE GOES HERE if me.is\_hungry: me.bake("bagel") \`\`…

---

## [Python spell checker](https://discuss.python.org/t/python-spell-checker/109252)

<div class="topic-metadata">

**Author:** [@jason1](https://discuss.python.org/u/jason1)\
**Replies:** 6\
**Last updated:** [September 27, 2026, 2:01pm UTC](https://discuss.python.org/t/python-spell-checker/109252 "2026-09-27T14:01:19Z")

</div>

I’m trying to make spell checker program that will compare words from a text file to a dictionary of words that are in alphabetical order. If the words don’t appear in the dictionary they should show up in a list as pote…

---

## [Building different versions of a package for different editable venvs from a single checkout](https://discuss.python.org/t/building-different-versions-of-a-package-for-different-editable-venvs-from-a-single-checkout/109247)

<div class="topic-metadata">

**Author:** [@yannd](https://discuss.python.org/u/yannd)\
**Replies:** 2\
**Last updated:** [September 26, 2026, 9:19pm UTC](https://discuss.python.org/t/building-different-versions-of-a-package-for-different-editable-venvs-from-a-single-checkout/109247 "2026-09-26T21:19:54Z")

</div>

There is a dependency of a project of mine, on which I’d like to hack. That dependency (kivy) declares a few optional dependencies, and builds a few native modules with cython; my project requires a given set of them (a…

---

## [Getting frustrated trying to setup my vim settings how I used to have them some years ago!](https://discuss.python.org/t/getting-frustrated-trying-to-setup-my-vim-settings-how-i-used-to-have-them-some-years-ago/109250)

<div class="topic-metadata">

**Author:** [@useronetoothreeeee](https://discuss.python.org/u/useronetoothreeeee)\
**Replies:** 0\
**Last updated:** [September 26, 2026, 2:31pm UTC](https://discuss.python.org/t/getting-frustrated-trying-to-setup-my-vim-settings-how-i-used-to-have-them-some-years-ago/109250 "2026-09-26T14:31:29Z")

</div>

Just getting back into it after a few years and trying to set up Vim nicely how I remember it as when I started coding the settings came back to me of how I used to have them but been mucking about for about an hour now …

---

## [Type-hinting instance variables](https://discuss.python.org/t/type-hinting-instance-variables/109240)

<div class="topic-metadata">

**Author:** [@NickC](https://discuss.python.org/u/NickC)\
**Replies:** 4\
**Last updated:** [September 26, 2026, 2:22pm UTC](https://discuss.python.org/t/type-hinting-instance-variables/109240 "2026-09-26T14:22:48Z")

</div>

Not sure if I am doing this correctly, so far I have been type-hinting my instance variables by listing them under the class definition which seems to be the recommended Python way. However I am now getting concerned abo…

---

## [In IDLE, display id in Debug Control window](https://discuss.python.org/t/in-idle-display-id-in-debug-control-window/109201)

<div class="topic-metadata">

**Author:** [@Belami](https://discuss.python.org/u/Belami)\
**Replies:** 10\
**Last updated:** [September 25, 2026, 10:14pm UTC](https://discuss.python.org/t/in-idle-display-id-in-debug-control-window/109201 "2026-09-25T22:14:28Z")

</div>

It’s a very simple suggestion. In IDLE, display id in Debug Control window.

---

## [Struggling with packaging Pygame (Python 3.13.5) for Android APK under restricted network environment (China)](https://discuss.python.org/t/struggling-with-packaging-pygame-python-3-13-5-for-android-apk-under-restricted-network-environment-china/109026)

<div class="topic-metadata">

**Author:** [@asdd](https://discuss.python.org/u/asdd)\
**Replies:** 5\
**Last updated:** [September 25, 2026, 1:32pm UTC](https://discuss.python.org/t/struggling-with-packaging-pygame-python-3-13-5-for-android-apk-under-restricted-network-environment-china/109026 "2026-09-25T13:32:46Z")

</div>

Hi everyone, I am developing a 2D game using Python 3.13.5 and Pygame. I’ve spent over a month trying to package it as an APK for Android, but faced unsolvable issues due to toolchain incompatibilities and network restr…

---

## [Subclassing mysql.connector](https://discuss.python.org/t/subclassing-mysql-connector/109202)

<div class="topic-metadata">

**Author:** [@NickC](https://discuss.python.org/u/NickC)\
**Replies:** 6\
**Last updated:** [September 24, 2026, 4:12pm UTC](https://discuss.python.org/t/subclassing-mysql-connector/109202 "2026-09-24T16:12:15Z")

</div>

Any idea why I can’t subclass mysql.connector like this: import mysql.connector class Database(mysql.connector.MySQLConnection): def \_\_init\_\_(self, \*args, \*\*kwargs): super().\_\_init\_\_(\*\*kwargs) db\_config={'…

---

## [Whatsnewt - A TUI text adventure through what's new in Python 3.15 a TUI adventure](https://discuss.python.org/t/whatsnewt-a-tui-text-adventure-through-whats-new-in-python-3-15-a-tui-adventure/109204)

<div class="topic-metadata">

**Author:** [@barry](https://discuss.python.org/u/barry)\
**Replies:** 1\
**Last updated:** [September 24, 2026, 11:32am UTC](https://discuss.python.org/t/whatsnewt-a-tui-text-adventure-through-whats-new-in-python-3-15-a-tui-adventure/109204 "2026-09-24T11:32:21Z")

</div>

With Python 3.15 scheduled for release in 8 days, I had this idea to whip up a little TUI adventure game that takes you through a What’s New in Python 3.15. With the help of my agent buddy, I present to you “whatsnewt”: …

---

## [How to cleanly close sql connection pool](https://discuss.python.org/t/how-to-cleanly-close-sql-connection-pool/109200)

<div class="topic-metadata">

**Author:** [@NickC](https://discuss.python.org/u/NickC)\
**Replies:** 0\
**Last updated:** [September 23, 2026, 2:54pm UTC](https://discuss.python.org/t/how-to-cleanly-close-sql-connection-pool/109200 "2026-09-23T14:54:56Z")

</div>

How do I cleanly shutdown an sql connection pool and release all idle connections? I have looked at both mysql-connector-python and MyPySQL but neither seem to have a method to close all connections. This raises the qu…

---

## [Exceptions some time can be lost](https://discuss.python.org/t/exceptions-some-time-can-be-lost/109190)

<div class="topic-metadata">

**Author:** [@FeelUsM](https://discuss.python.org/u/FeelUsM)\
**Replies:** 17\
**Last updated:** [September 23, 2026, 1:50pm UTC](https://discuss.python.org/t/exceptions-some-time-can-be-lost/109190 "2026-09-23T13:50:38Z")

</div>

Main problem: exceptions some time can be lost. Assume E1 and E2 are two completely unrelated exceptions. (For example E1 is FileNotFoundError and E2 is AttributeError) class E1(Exception): pass class E2(Exception): p…

---

## [I have issues with Python IDLE 3.xx under windows](https://discuss.python.org/t/i-have-issues-with-python-idle-3-xx-under-windows/108951)

<div class="topic-metadata">

**Author:** [@beta-tester](https://discuss.python.org/u/beta-tester)\
**Replies:** 3\
**Last updated:** [September 23, 2026, 1:42pm UTC](https://discuss.python.org/t/i-have-issues-with-python-idle-3-xx-under-windows/108951 "2026-09-23T13:42:09Z")

</div>

hi, i am new here. i have issues with Python IDLE 3.13.15 under Windows 11. if i have entries under “File|Recent Files \>” in Python IDLE Shell where the underlying file does not exist anymore, and i click that entry, …

---

## [Please help I'm beginner](https://discuss.python.org/t/please-help-im-beginner/109198)

<div class="topic-metadata">

**Author:** [@Bludingtonn](https://discuss.python.org/u/Bludingtonn)\
**Replies:** 2\
**Last updated:** [September 23, 2026, 11:14am UTC](https://discuss.python.org/t/please-help-im-beginner/109198 "2026-09-23T11:14:44Z")

</div>

I am trying to use append command, and it doesnt work. Is this code written correctly? cool\_list = “luisgamercool”, “flimflam”, “flamingo” print(cool\_list) cool\_list.append(“ok”) print(cool\_list)

---

## [How to write binary file in python and read it in C++](https://discuss.python.org/t/how-to-write-binary-file-in-python-and-read-it-in-c/109187)

<div class="topic-metadata">

**Author:** [@Machiel](https://discuss.python.org/u/Machiel)\
**Replies:** 7\
**Last updated:** [September 22, 2026, 1:08pm UTC](https://discuss.python.org/t/how-to-write-binary-file-in-python-and-read-it-in-c/109187 "2026-09-22T13:08:19Z")

</div>

Hi, I have some C++ code that reads binary data from a file. When I use a C++ code to write to it, everything works. But I need a python code to write the file. It works for the first word that I write (using “\`fout.wri…

---

## [Understand gil in practical scenarios](https://discuss.python.org/t/understand-gil-in-practical-scenarios/108404)

<div class="topic-metadata">

**Author:** [@anandkaka](https://discuss.python.org/u/anandkaka)\
**Replies:** 7\
**Last updated:** [September 22, 2026, 3:27am UTC](https://discuss.python.org/t/understand-gil-in-practical-scenarios/108404 "2026-09-22T03:27:16Z")

</div>

i need to understand gill in practical way. Some of the facts i understood - it is for reference count of objects without gil or with gil, still if there is possibility of race condition it will crash or misbehave no-…

---

## [Is urllib.parse.urljoin() harmful](https://discuss.python.org/t/is-urllib-parse-urljoin-harmful/109165)

<div class="topic-metadata">

**Author:** [@mcepl](https://discuss.python.org/u/mcepl)\
**Replies:** 0\
**Last updated:** [September 21, 2026, 11:47pm UTC](https://discuss.python.org/t/is-urllib-parse-urljoin-harmful/109165 "2026-09-21T23:47:15Z")

</div>

I was fixing security issue in WebOb for openSUSE and in one of the concerned commits I found this: Subject: Replace the use of Python’s stdlib urljoin with our own Reliance on the version shipped with Python has led …

---

## [Checking if reused mySQL connection is still live before use](https://discuss.python.org/t/checking-if-reused-mysql-connection-is-still-live-before-use/109158)

<div class="topic-metadata">

**Author:** [@NickC](https://discuss.python.org/u/NickC)\
**Replies:** 0\
**Last updated:** [September 21, 2026, 10:26pm UTC](https://discuss.python.org/t/checking-if-reused-mysql-connection-is-still-live-before-use/109158 "2026-09-21T22:26:21Z")

</div>

Does anyone know if it is necessary to check whether a mysql.connector is connected each time I reuse ti before running any SQL statements or is this something which is already built-in to mysql.connector? Do I need to c…

---

## [Hasattr() performance on objects with \_\_slots\_\_](https://discuss.python.org/t/hasattr-performance-on-objects-with-slots/109134)

<div class="topic-metadata">

**Author:** [@crj](https://discuss.python.org/u/crj)\
**Replies:** 4\
**Last updated:** [September 20, 2026, 3:49pm UTC](https://discuss.python.org/t/hasattr-performance-on-objects-with-slots/109134 "2026-09-20T15:49:32Z")

</div>

For a particular application I was wondering whether to represent a state by the absence of an attribute, or by the attribute being None. Curious, I decided to benchmark it, and the result surprised me a lot: hasattr() …

---

## [Minimal debugger for C++ application Python script](https://discuss.python.org/t/minimal-debugger-for-c-application-python-script/109093)

<div class="topic-metadata">

**Author:** [@dan-t](https://discuss.python.org/u/dan-t)\
**Replies:** 6\
**Last updated:** [September 20, 2026, 10:39am UTC](https://discuss.python.org/t/minimal-debugger-for-c-application-python-script/109093 "2026-09-20T10:39:31Z")

</div>

Hi, we’ve a C++ Qt application that’s scriptable by Python. We would like to have a minimal debugger when such a Python script is executed with the application. Being able to set breakpoints, single stepping and step…

---

## [Wrong types in ctypes structures](https://discuss.python.org/t/wrong-types-in-ctypes-structures/109115)

<div class="topic-metadata">

**Author:** [@BjarneM](https://discuss.python.org/u/BjarneM)\
**Replies:** 3\
**Last updated:** [September 19, 2026, 11:40am UTC](https://discuss.python.org/t/wrong-types-in-ctypes-structures/109115 "2026-09-19T11:40:00Z")

</div>

Hi. I am trying to generate some structures using ctypes. The integer fields embedded in structures appear to get the wrong type when the structure is instantiated. It creates problems when I try to use the structures, s…

---

## [Second window resizes, when moving Main window](https://discuss.python.org/t/second-window-resizes-when-moving-main-window/109045)

<div class="topic-metadata">

**Author:** [@laurieh](https://discuss.python.org/u/laurieh)\
**Replies:** 2\
**Last updated:** [September 19, 2026, 3:21am UTC](https://discuss.python.org/t/second-window-resizes-when-moving-main-window/109045 "2026-09-19T03:21:17Z")

</div>

this is only a brain exercise for a 72 yo…coding may be messy, but it works..lol What happens is after generating the random numbers, if you drag the main window, to a new location, the second window resizes…how can I s…

---

## [Import function into current namespace](https://discuss.python.org/t/import-function-into-current-namespace/109090)

<div class="topic-metadata">

**Author:** [@NickC](https://discuss.python.org/u/NickC)\
**Replies:** 12\
**Last updated:** [September 18, 2026, 7:39pm UTC](https://discuss.python.org/t/import-function-into-current-namespace/109090 "2026-09-18T19:39:19Z")

</div>

Is there some way I can reference a variable in the current namespace from an imported function? I want to be able to put my standard functions in a Constants.py file and then use them directly as if they were in each m…

---

## [Why I built another Python for the edge (and how it differs from MicroPython)](https://discuss.python.org/t/why-i-built-another-python-for-the-edge-and-how-it-differs-from-micropython/108270)

<div class="topic-metadata">

**Author:** [@dylan\_sutton\_chavez](https://discuss.python.org/u/dylan_sutton_chavez)\
**Replies:** 9\
**Last updated:** [September 18, 2026, 7:49am UTC](https://discuss.python.org/t/why-i-built-another-python-for-the-edge-and-how-it-differs-from-micropython/108270 "2026-09-18T07:49:20Z")

</div>

When I started programming Edge Python more than six months ago, I was looking for a version of Python that weighed less than 200 kb so it could reach any device, sandboxed by design, built with browsers in mind, decoupl…

---

## [Differentiate between a string and an expression](https://discuss.python.org/t/differentiate-between-a-string-and-an-expression/109065)

<div class="topic-metadata">

**Author:** [@NickC](https://discuss.python.org/u/NickC)\
**Replies:** 10\
**Last updated:** [September 18, 2026, 7:39am UTC](https://discuss.python.org/t/differentiate-between-a-string-and-an-expression/109065 "2026-09-18T07:39:28Z")

</div>

Is there a way to differentiate between a variable containing a plain string and one containing an expression, like an isexpression() function? For example how can I establish between these two: test1 = 'print("hello")'…

---

## [Import everything from another module](https://discuss.python.org/t/import-everything-from-another-module/109102)

<div class="topic-metadata">

**Author:** [@NickC](https://discuss.python.org/u/NickC)\
**Replies:** 2\
**Last updated:** [September 18, 2026, 12:37am UTC](https://discuss.python.org/t/import-everything-from-another-module/109102 "2026-09-18T00:37:27Z")

</div>

Is there any way to import absolutely everything from one module into another? At the moment I have to use import Script;from Script import \*;from Script import \_\_html\_\_, \_hx to get everything I need imported but I wa…

---

## [Intermittent File locking collisions](https://discuss.python.org/t/intermittent-file-locking-collisions/109095)

<div class="topic-metadata">

**Author:** [@Gmilway](https://discuss.python.org/u/Gmilway)\
**Replies:** 4\
**Last updated:** [September 17, 2026, 6:31pm UTC](https://discuss.python.org/t/intermittent-file-locking-collisions/109095 "2026-09-17T18:31:17Z")

</div>

Greetings In trying to track down the cause of some file corruption in a shared filesystem (AWS EFS), I have discovered some strange behaviour. I have used the following setup to execute to processes trying to take a f…

---

## [Python Web Application Becomes Unresponsive When Handling Concurrent Requests](https://discuss.python.org/t/python-web-application-becomes-unresponsive-when-handling-concurrent-requests/109056)

<div class="topic-metadata">

**Author:** [@benstokes](https://discuss.python.org/u/benstokes)\
**Replies:** 2\
**Last updated:** [September 16, 2026, 5:59pm UTC](https://discuss.python.org/t/python-web-application-becomes-unresponsive-when-handling-concurrent-requests/109056 "2026-09-16T17:59:30Z")

</div>

Hi All, I am working on a Python-based web application for my website and have been running into an intermittent performance issue where the application becomes unresponsive when several requests arrive within a short p…

---

## [Why is my client waiting?](https://discuss.python.org/t/why-is-my-client-waiting/108437)

<div class="topic-metadata">

**Author:** [@srslysasquatch](https://discuss.python.org/u/srslysasquatch)\
**Replies:** 3\
**Last updated:** [September 16, 2026, 3:18pm UTC](https://discuss.python.org/t/why-is-my-client-waiting/108437 "2026-09-16T15:18:12Z")

</div>

client code: import socket try: #when using select, i created the read\_set somewhere here s = socket.socket() s.connect(("localhost", 80)) def receive\_bytes(sock): """Receives response from ser…

---

## [Why does my website just keep on loading and loading and loading when it has to return the content sent from the server's response?](https://discuss.python.org/t/why-does-my-website-just-keep-on-loading-and-loading-and-loading-when-it-has-to-return-the-content-sent-from-the-servers-response/109057)

<div class="topic-metadata">

**Author:** [@srslysasquatch](https://discuss.python.org/u/srslysasquatch)\
**Replies:** 5\
**Last updated:** [September 16, 2026, 3:16pm UTC](https://discuss.python.org/t/why-does-my-website-just-keep-on-loading-and-loading-and-loading-when-it-has-to-return-the-content-sent-from-the-servers-response/109057 "2026-09-16T15:16:39Z")

</div>

if environ\["PATH\_INFO"\] == "/signup": info = pformat(environ\["wsgi.input"\].read(int(environ\["CONTENT\_LENGTH"\]))) print(info) binfo = environ\["wsgi.input"\].read(int(environ\["CONTENT\_LENGTH"\])) …

---

## [How do i make a text button or smt in terminal using python. like a gui but completly in text not using downloadble liberys](https://discuss.python.org/t/how-do-i-make-a-text-button-or-smt-in-terminal-using-python-like-a-gui-but-completly-in-text-not-using-downloadble-liberys/108971)

<div class="topic-metadata">

**Author:** [@ISeeThatManLoL](https://discuss.python.org/u/ISeeThatManLoL)\
**Replies:** 19\
**Last updated:** [September 16, 2026, 8:49am UTC](https://discuss.python.org/t/how-do-i-make-a-text-button-or-smt-in-terminal-using-python-like-a-gui-but-completly-in-text-not-using-downloadble-liberys/108971 "2026-09-16T08:49:22Z")

</div>

i wanted to do this but they said i need textual and i really dont like how it looks. i want something like \> start settings exit and being navigatble like start \> settings exit

[Next page](https://discuss.python.org/c/help/7.md?page=1)
