<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Python Forum - All Forums]]></title>
		<link>https://python-forum.io/</link>
		<description><![CDATA[Python Forum - https://python-forum.io]]></description>
		<pubDate>Mon, 19 Oct 2026 22:12:31 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Python Forum may close down in 2027]]></title>
			<link>https://python-forum.io/thread-46446.html</link>
			<pubDate>Sun, 18 Oct 2026 14:19:29 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=7">snippsat</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46446.html</guid>
			<description><![CDATA[As most have notice the traffic is down bye a lot if compare when forum was mot active.<br />
Eg in last month Threads/day: 0.37, Posts/day: 1.5,so not much traffick at all.<br />
Other forum see same trend eg <a href="https://www.devclass.com/ai-ml/2026/01/05/dramatic-drop-in-stack-overflow-questions-as-devs-look-elsewhere-for-help/4079575" target="_blank" rel="noopener" class="mycode_url">Stack Overflow </a> a 80 percent drop.<br />
<br />
One reason that make forum like(eg coding) harder run is that AI(LLM's) can answer all question that get ask here with ease.<br />
We have had mostly begginger question,and that don't make it eaiser.<br />
I have tried with many Post we get here(with a lot of AI(LLM's),<br />
and in genaral now(newest models) does usually give a better answer in seconds than we can give here.<br />
<br />
Will see how it goes but the trend dos not look good,<br />
can not hold a forum open that get 1 new Thread every 3 day,and under 2 Post per day.<br />
<br />
So i am the only Admin left all other have left forum a long time ago,and i have paid for server cost for many years now(lower cost now with less traffic).<br />
Moderators that still are here has done a fantastic job👍over the years,<br />
but with traffic that we have now not much to do🥱]]></description>
			<content:encoded><![CDATA[As most have notice the traffic is down bye a lot if compare when forum was mot active.<br />
Eg in last month Threads/day: 0.37, Posts/day: 1.5,so not much traffick at all.<br />
Other forum see same trend eg <a href="https://www.devclass.com/ai-ml/2026/01/05/dramatic-drop-in-stack-overflow-questions-as-devs-look-elsewhere-for-help/4079575" target="_blank" rel="noopener" class="mycode_url">Stack Overflow </a> a 80 percent drop.<br />
<br />
One reason that make forum like(eg coding) harder run is that AI(LLM's) can answer all question that get ask here with ease.<br />
We have had mostly begginger question,and that don't make it eaiser.<br />
I have tried with many Post we get here(with a lot of AI(LLM's),<br />
and in genaral now(newest models) does usually give a better answer in seconds than we can give here.<br />
<br />
Will see how it goes but the trend dos not look good,<br />
can not hold a forum open that get 1 new Thread every 3 day,and under 2 Post per day.<br />
<br />
So i am the only Admin left all other have left forum a long time ago,and i have paid for server cost for many years now(lower cost now with less traffic).<br />
Moderators that still are here has done a fantastic job👍over the years,<br />
but with traffic that we have now not much to do🥱]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Bug: After Update v3.14.7 to v3.14.8 on Win no file dragging on script shortcut possi]]></title>
			<link>https://python-forum.io/thread-46442.html</link>
			<pubDate>Sun, 11 Oct 2026 07:24:23 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=3010">pstein</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46442.html</guid>
			<description><![CDATA[Recently I updated a working v3.14.7 Python installation on Windows 10 to the newer v3.14.8 version.<br />
The installation itself seemed to work successfuly. No error occured.<br />
<br />
Later I found out that I cannot drag files onto Python script shortcuts on my Desktop background any more.<br />
At the end of the drag action the cursor turned into a forbidden symbol.<br />
<br />
This occurs for all my *.py script shortcuts on my Desktop background.<br />
The same worked in old v3.14.7 <br />
<br />
When I (without dragging) double click on such a shortcut the script tells "Please drag a file on this script"<br />
So python works in general too.<br />
<br />
Registry contains the following values (looks good):<br />
<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\Shell\open\command<br />
"C:\Windows\py.exe" "%L" %*<br />
<br />
and<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shellex\DropHandler<br />
{BEA218D2-6950-497B-9434-61683EC065FE}<br />
<br />
And drag &amp; drop works for other shortcut types like DOS batch scripts *.bat.<br />
<br />
Repairing by re-run the Python installation does not help.<br />
<br />
So its obvisouly a bug in Python update process in v3.14.8 which destroys the drag feature<br />
<br />
Whats wrong?<br />
<br />
Peter]]></description>
			<content:encoded><![CDATA[Recently I updated a working v3.14.7 Python installation on Windows 10 to the newer v3.14.8 version.<br />
The installation itself seemed to work successfuly. No error occured.<br />
<br />
Later I found out that I cannot drag files onto Python script shortcuts on my Desktop background any more.<br />
At the end of the drag action the cursor turned into a forbidden symbol.<br />
<br />
This occurs for all my *.py script shortcuts on my Desktop background.<br />
The same worked in old v3.14.7 <br />
<br />
When I (without dragging) double click on such a shortcut the script tells "Please drag a file on this script"<br />
So python works in general too.<br />
<br />
Registry contains the following values (looks good):<br />
<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\Shell\open\command<br />
"C:\Windows\py.exe" "%L" %*<br />
<br />
and<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shellex\DropHandler<br />
{BEA218D2-6950-497B-9434-61683EC065FE}<br />
<br />
And drag &amp; drop works for other shortcut types like DOS batch scripts *.bat.<br />
<br />
Repairing by re-run the Python installation does not help.<br />
<br />
So its obvisouly a bug in Python update process in v3.14.8 which destroys the drag feature<br />
<br />
Whats wrong?<br />
<br />
Peter]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Python as alternative to AutoIt?]]></title>
			<link>https://python-forum.io/thread-46441.html</link>
			<pubDate>Fri, 09 Oct 2026 12:13:47 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=11957">Winfried</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46441.html</guid>
			<description><![CDATA[Hello,<br />
<br />
Title says it all: Can Python replace <a href="https://en.wikipedia.org/wiki/AutoIt" target="_blank" rel="noopener" class="mycode_url">AutoIt</a> to automate the GUI (in Windows at least)?<br />
<br />
It works OK, but the language feels so old (procedural instead of OO) and limited compared to Python… :-/<br />
<br />
Thank you.]]></description>
			<content:encoded><![CDATA[Hello,<br />
<br />
Title says it all: Can Python replace <a href="https://en.wikipedia.org/wiki/AutoIt" target="_blank" rel="noopener" class="mycode_url">AutoIt</a> to automate the GUI (in Windows at least)?<br />
<br />
It works OK, but the language feels so old (procedural instead of OO) and limited compared to Python… :-/<br />
<br />
Thank you.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Doom in python 100%]]></title>
			<link>https://python-forum.io/thread-46435.html</link>
			<pubDate>Thu, 01 Oct 2026 14:49:12 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=44101">vagucs</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46435.html</guid>
			<description><![CDATA[Hello friends,<br />
<br />
I'm working on generic Doom ports, I recently made one for Python, it's a good resource for everyone:<br />
<br />
<a href="https://youtu.be/2JdJ5zfdmkg" target="_blank" rel="noopener" class="mycode_url">https://youtu.be/2JdJ5zfdmkg</a><br />
<br />
<a href="https://github.com/vagucs/python_doom" target="_blank" rel="noopener" class="mycode_url">https://github.com/vagucs/python_doom</a><br />
<br />
Regards,<br />
Wagner]]></description>
			<content:encoded><![CDATA[Hello friends,<br />
<br />
I'm working on generic Doom ports, I recently made one for Python, it's a good resource for everyone:<br />
<br />
<a href="https://youtu.be/2JdJ5zfdmkg" target="_blank" rel="noopener" class="mycode_url">https://youtu.be/2JdJ5zfdmkg</a><br />
<br />
<a href="https://github.com/vagucs/python_doom" target="_blank" rel="noopener" class="mycode_url">https://github.com/vagucs/python_doom</a><br />
<br />
Regards,<br />
Wagner]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[AI help]]></title>
			<link>https://python-forum.io/thread-46433.html</link>
			<pubDate>Wed, 30 Sep 2026 17:40:00 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=292">Blue Dog</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46433.html</guid>
			<description><![CDATA[Is their any place that help with ai models and tools?<br />
thank you]]></description>
			<content:encoded><![CDATA[Is their any place that help with ai models and tools?<br />
thank you]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Bash fatigue vs. Python verbosity: How do you bridge the gap in 2026?]]></title>
			<link>https://python-forum.io/thread-46431.html</link>
			<pubDate>Wed, 30 Sep 2026 08:31:56 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=44095">vitovex</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46431.html</guid>
			<description><![CDATA[In DevOps and cloud automation, the gap between Bash and general-purpose languages remains frustrating:<br />
<br />
- Shell scripts (Bash/Zsh) are unmatched for running processes and pipes (<code class="icode">grep</code>, <code class="icode">curl</code>, <code class="icode">kubectl</code>), but break down quickly with complex data handling, JSON manipulation, and testing.<br />
- Python is excellent for logic and APIs, but <code class="icode">subprocess</code> or <code class="icode">shlex</code> boilerplate makes process orchestration tedious compared to native shell invocation.<br />
<br />
In the Node/TypeScript world, Google's <code class="icode">zx</code> addressed this ergonomics gap using tagged template literals, gaining massive traction.<br />
<br />
In Python, solutions usually rely on operator overloading or dynamic proxy objects (like <code class="icode">sh</code> or <code class="icode">plumbum</code>), which have ergonomic limitations and IDE typing quirks. Another approach is source-to-source transpilation—extending Python grammar with a native command syntax like <code class="icode">$(cmd)</code> that transpiles directly into standard CPython AST/source.<br />
<br />
I've been working on a lightweight prototype exploring this transpilation route: <a href="https://github.com/vitovex/pycli" target="_blank" rel="noopener" class="mycode_url">https://github.com/vitovex/pycli</a><br />
<br />
I’d love to hear how you this today:<br />
1. Do you write hybrid Bash/Python scripts, use Python wrapper libraries, or switch to Go/Rust for non-trivial CLI automation?<br />
2. Does a transpiled Python dialect make sense for DevOps workflows, or does moving away from pure <code class="icode">.py</code> introduce too much friction?]]></description>
			<content:encoded><![CDATA[In DevOps and cloud automation, the gap between Bash and general-purpose languages remains frustrating:<br />
<br />
- Shell scripts (Bash/Zsh) are unmatched for running processes and pipes (<code class="icode">grep</code>, <code class="icode">curl</code>, <code class="icode">kubectl</code>), but break down quickly with complex data handling, JSON manipulation, and testing.<br />
- Python is excellent for logic and APIs, but <code class="icode">subprocess</code> or <code class="icode">shlex</code> boilerplate makes process orchestration tedious compared to native shell invocation.<br />
<br />
In the Node/TypeScript world, Google's <code class="icode">zx</code> addressed this ergonomics gap using tagged template literals, gaining massive traction.<br />
<br />
In Python, solutions usually rely on operator overloading or dynamic proxy objects (like <code class="icode">sh</code> or <code class="icode">plumbum</code>), which have ergonomic limitations and IDE typing quirks. Another approach is source-to-source transpilation—extending Python grammar with a native command syntax like <code class="icode">$(cmd)</code> that transpiles directly into standard CPython AST/source.<br />
<br />
I've been working on a lightweight prototype exploring this transpilation route: <a href="https://github.com/vitovex/pycli" target="_blank" rel="noopener" class="mycode_url">https://github.com/vitovex/pycli</a><br />
<br />
I’d love to hear how you this today:<br />
1. Do you write hybrid Bash/Python scripts, use Python wrapper libraries, or switch to Go/Rust for non-trivial CLI automation?<br />
2. Does a transpiled Python dialect make sense for DevOps workflows, or does moving away from pure <code class="icode">.py</code> introduce too much friction?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Beginner question about MKV metadata and Python]]></title>
			<link>https://python-forum.io/thread-46429.html</link>
			<pubDate>Sun, 27 Sep 2026 02:13:38 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=44087">BobRichards</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46429.html</guid>
			<description><![CDATA[Sorry if this is a dumb question or if this is not the correct thread subforum to post it at. <br />
<br />
I'm not a programmer. My only experience with Python is two very simple programs I made with Copilot, precisely because I don't know any code. But the people I know that know code always say that Python is the best language. <br />
<br />
I have a collection of over 700 MKV videos, all with typical metadata, and one custom field called "DATE", which contains both date in time in format YYYY:MM:DD HH:MM:SS, the time being in 24 hr format. So for example, this is that field in one video:<br />
<br />
DATE: 2021:09:15 16:50:01<br />
<br />
These files are all in the same folder, and what I would like to achieve is to separate all those files into folders, the first level the year (they span about ten years), then the second level the month, and the third level the day. Alternatively, it could be a script that renames each file so the beginning of each file is the date (time is not needed), but because of file name restrictions, obviously it would have to be, in the case of the date above:<br />
<br />
2021-09-15 [file name]<br />
<br />
So basically the script would have to retrieve the custom metadata field DATE (just to clarify, this is NOT the usual "Date" metadata field, it's a field inserted by the people that created these videos.<br />
<br />
Is this possible in Python? I'm on Windows 11, and I think I have the latest Python version, if not I can download the latest installer.<br />
<br />
Of course I'm not asking anyone to code for me, I just would like to know if Python is capable of doing this, and if so, if it's a script that a total beginner can do or something really complicated that needs years of experience. My guess is that it shouldn't be that hard, and if that's the case, it would be a nice project to start learning Python, which is a "bucket list" kind of thing for me.]]></description>
			<content:encoded><![CDATA[Sorry if this is a dumb question or if this is not the correct thread subforum to post it at. <br />
<br />
I'm not a programmer. My only experience with Python is two very simple programs I made with Copilot, precisely because I don't know any code. But the people I know that know code always say that Python is the best language. <br />
<br />
I have a collection of over 700 MKV videos, all with typical metadata, and one custom field called "DATE", which contains both date in time in format YYYY:MM:DD HH:MM:SS, the time being in 24 hr format. So for example, this is that field in one video:<br />
<br />
DATE: 2021:09:15 16:50:01<br />
<br />
These files are all in the same folder, and what I would like to achieve is to separate all those files into folders, the first level the year (they span about ten years), then the second level the month, and the third level the day. Alternatively, it could be a script that renames each file so the beginning of each file is the date (time is not needed), but because of file name restrictions, obviously it would have to be, in the case of the date above:<br />
<br />
2021-09-15 [file name]<br />
<br />
So basically the script would have to retrieve the custom metadata field DATE (just to clarify, this is NOT the usual "Date" metadata field, it's a field inserted by the people that created these videos.<br />
<br />
Is this possible in Python? I'm on Windows 11, and I think I have the latest Python version, if not I can download the latest installer.<br />
<br />
Of course I'm not asking anyone to code for me, I just would like to know if Python is capable of doing this, and if so, if it's a script that a total beginner can do or something really complicated that needs years of experience. My guess is that it shouldn't be that hard, and if that's the case, it would be a nice project to start learning Python, which is a "bucket list" kind of thing for me.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[inventory management system]]></title>
			<link>https://python-forum.io/thread-46427.html</link>
			<pubDate>Mon, 21 Sep 2026 03:07:26 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=44076">StellaSalazar</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46427.html</guid>
			<description><![CDATA[Hi everyone,<br />
<br />
For my Python homework, I need to create a small inventory management program for a shop.<br />
<br />
The program should allow the user to:<br />
<br />
View the current stock.<br />
Add new products.<br />
Update the quantity of an existing product.<br />
Display products that have fewer than 5 items remaining.<br />
<br />
I started with a dictionary:<br />
<br />
<pre class="brush: python" title="Python Code:">inventory = {
"notebook": 12,
"pen": 25,
"backpack": 4,
"water bottle": 8
}

product = input("Enter product name: ")
quantity = int(input("Enter quantity to add: "))

inventory[product] += quantity

print(inventory)</pre>]]></description>
			<content:encoded><![CDATA[Hi everyone,<br />
<br />
For my Python homework, I need to create a small inventory management program for a shop.<br />
<br />
The program should allow the user to:<br />
<br />
View the current stock.<br />
Add new products.<br />
Update the quantity of an existing product.<br />
Display products that have fewer than 5 items remaining.<br />
<br />
I started with a dictionary:<br />
<br />
<pre class="brush: python" title="Python Code:">inventory = {
"notebook": 12,
"pen": 25,
"backpack": 4,
"water bottle": 8
}

product = input("Enter product name: ")
quantity = int(input("Enter quantity to add: "))

inventory[product] += quantity

print(inventory)</pre>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Homework question: Python file handling and average calculation]]></title>
			<link>https://python-forum.io/thread-46426.html</link>
			<pubDate>Mon, 21 Sep 2026 03:04:02 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=44076">StellaSalazar</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46426.html</guid>
			<description><![CDATA[I’m working on a Python homework assignment about reading data from a text file and calculating the average score of the students.<br />
<br />
The assignment asks me to:<br />
<br />
Read student names and scores from a text file.<br />
Calculate the average score for each student.<br />
Display the student with the highest average score.<br />
<br />
I tried to write the program myself, but I’m having trouble when I calculate the average. My program works for some inputs, but sometimes I get an error or an incorrect result.<br />
<br />
Here is a simplified version of my code:<br />
<br />
<pre class="brush: python" title="Python Code:">students = {
"Anna": [8, 7, 9],
"Ben": [6, 8, 7],
"Chris": [9, 10, 8]
}

averages = {}

for name, scores in students.items():
total = sum(scores)
average = total / len(scores)
averages[name] = average

highest = max(averages)

print("Average scores:", averages)
print("Student with the highest average:", highest)</pre>The output I expected was that Chris would have the highest average. However, the program prints the wrong student.<br />
<br />
I think the problem may be related to the way I use max(), but I’m not sure how to fix it.<br />
<br />
What I have tried:<br />
<br />
I checked the values stored in the averages dictionary.<br />
I used sum() and len() to calculate the averages.<br />
I searched for examples of using max() with dictionaries, but I’m still confused about how it works.<br />
<br />
Could someone explain what is wrong with my use of max() and give me a hint about how I should approach it? I’d like to understand the solution rather than just copy the code.<br />
<br />
System information:<br />
<br />
Python: 3.12<br />
OS: Windows 11<br />
IDE: Visual Studio Code]]></description>
			<content:encoded><![CDATA[I’m working on a Python homework assignment about reading data from a text file and calculating the average score of the students.<br />
<br />
The assignment asks me to:<br />
<br />
Read student names and scores from a text file.<br />
Calculate the average score for each student.<br />
Display the student with the highest average score.<br />
<br />
I tried to write the program myself, but I’m having trouble when I calculate the average. My program works for some inputs, but sometimes I get an error or an incorrect result.<br />
<br />
Here is a simplified version of my code:<br />
<br />
<pre class="brush: python" title="Python Code:">students = {
"Anna": [8, 7, 9],
"Ben": [6, 8, 7],
"Chris": [9, 10, 8]
}

averages = {}

for name, scores in students.items():
total = sum(scores)
average = total / len(scores)
averages[name] = average

highest = max(averages)

print("Average scores:", averages)
print("Student with the highest average:", highest)</pre>The output I expected was that Chris would have the highest average. However, the program prints the wrong student.<br />
<br />
I think the problem may be related to the way I use max(), but I’m not sure how to fix it.<br />
<br />
What I have tried:<br />
<br />
I checked the values stored in the averages dictionary.<br />
I used sum() and len() to calculate the averages.<br />
I searched for examples of using max() with dictionaries, but I’m still confused about how it works.<br />
<br />
Could someone explain what is wrong with my use of max() and give me a hint about how I should approach it? I’d like to understand the solution rather than just copy the code.<br />
<br />
System information:<br />
<br />
Python: 3.12<br />
OS: Windows 11<br />
IDE: Visual Studio Code]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[I made an app to automatically update Python]]></title>
			<link>https://python-forum.io/thread-46424.html</link>
			<pubDate>Sat, 19 Sep 2026 04:09:52 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=44074">JacRob32</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46424.html</guid>
			<description><![CDATA[Hi everyone,<br />
  I noticed there was not really any good way to automatically update the Python installation on a computer. So I made an app that automatically fetches the newset release from python.org, and asks you if you want to install it. The app then automatically pulls the update and installs it. <br />
  The app and the source code can be found at <span style="color: #3498DB;" class="mycode_color"><a href="https://github.com/JacRob32/Python-Updater" target="_blank" rel="noopener" class="mycode_url">https://github.com/JacRob32/Python-Updater</a></span>. It is currently only built for macOS, but I intend to make a Windows version soon. <br />
  If you have any suggestions or problems, let me know below. If you want to contribute or add a feature, you could mention it below and add a pull request on GitHub.<br />
<span style="font-weight: bold;" class="mycode_b">Image:<br />
</span><img src="https://res.cloudinary.com/weudzd6v/image/upload/v1789791172/Screenshot_2026-09-18_at_9.11.53_PM.png" loading="lazy"  alt="[Image: Screenshot_2026-09-18_at_9.11.53_PM.png]" class="mycode_img" />]]></description>
			<content:encoded><![CDATA[Hi everyone,<br />
  I noticed there was not really any good way to automatically update the Python installation on a computer. So I made an app that automatically fetches the newset release from python.org, and asks you if you want to install it. The app then automatically pulls the update and installs it. <br />
  The app and the source code can be found at <span style="color: #3498DB;" class="mycode_color"><a href="https://github.com/JacRob32/Python-Updater" target="_blank" rel="noopener" class="mycode_url">https://github.com/JacRob32/Python-Updater</a></span>. It is currently only built for macOS, but I intend to make a Windows version soon. <br />
  If you have any suggestions or problems, let me know below. If you want to contribute or add a feature, you could mention it below and add a pull request on GitHub.<br />
<span style="font-weight: bold;" class="mycode_b">Image:<br />
</span><img src="https://res.cloudinary.com/weudzd6v/image/upload/v1789791172/Screenshot_2026-09-18_at_9.11.53_PM.png" loading="lazy"  alt="[Image: Screenshot_2026-09-18_at_9.11.53_PM.png]" class="mycode_img" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[How can I improve the performance of a Python script that processes large amounts of]]></title>
			<link>https://python-forum.io/thread-46422.html</link>
			<pubDate>Fri, 18 Sep 2026 08:15:54 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=44071">molybdenumproducts1122</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46422.html</guid>
			<description><![CDATA[I’m working on a Python script that processes a relatively large dataset, and I’ve noticed that the execution time increases significantly as the amount of data grows<a href="https://molybdenumproducts.com/molybdenum/molybdenum-rod-manufacturer-india" target="_blank" rel="noopener" class="mycode_url"><span style="color: black;" class="mycode_color">.</span></a> I’m currently using standard loops and functions, but I’m wondering whether there are better approaches for improving performance.<br />
<br />
Would using list comprehensions, generators, built-in functions, or different data structures make a noticeable difference? Also, what is the best way to measure which part of the code is taking the most time?<br />
<br />
I’d appreciate any suggestions or examples of how you normally approach performance optimization in Python.]]></description>
			<content:encoded><![CDATA[I’m working on a Python script that processes a relatively large dataset, and I’ve noticed that the execution time increases significantly as the amount of data grows<a href="https://molybdenumproducts.com/molybdenum/molybdenum-rod-manufacturer-india" target="_blank" rel="noopener" class="mycode_url"><span style="color: black;" class="mycode_color">.</span></a> I’m currently using standard loops and functions, but I’m wondering whether there are better approaches for improving performance.<br />
<br />
Would using list comprehensions, generators, built-in functions, or different data structures make a noticeable difference? Also, what is the best way to measure which part of the code is taking the most time?<br />
<br />
I’d appreciate any suggestions or examples of how you normally approach performance optimization in Python.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[SOLVED] [listbox] Read-only?]]></title>
			<link>https://python-forum.io/thread-46413.html</link>
			<pubDate>Sat, 12 Sep 2026 10:37:10 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=11957">Winfried</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46413.html</guid>
			<description><![CDATA[Hello,<br />
<br />
Neither Google nor the archives here helped.<br />
<br />
Can a <a href="https://wxpython.org/Phoenix/docs/html/wx.ListBox.html" target="_blank" rel="noopener" class="mycode_url">listbox</a> be made read-only, so that the user cannot change the selections I made through code?<br />
<br />
Cheers,<br />
<br />
--<br />
Edit<br />
<br />
<pre class="brush: python" title="Python Code:">#Not good: User can't scroll :-/
self.lb1.Disable()</pre>--<br />
Edit: Work-around<br />
<br />
<pre class="brush: python" title="Python Code:">def __init__(self, *args, **kwargs):  
	...
	self.lb1 = wx.ListBox(panel, style=wx.LB_MULTIPLE)
	sizer.Add(self.lb1,1, wx.ALL | wx.EXPAND ,5)
	self.lb1.Bind(wx.EVT_LEFT_DOWN, self.on_input_intercept)
	self.lb1.Bind(wx.EVT_KEY_DOWN, self.on_input_intercept)
	...
	
def on_input_intercept(self, event):
	# Do NOT call event.Skip(). The event dies here, ignoring the user's action.
	return</pre>]]></description>
			<content:encoded><![CDATA[Hello,<br />
<br />
Neither Google nor the archives here helped.<br />
<br />
Can a <a href="https://wxpython.org/Phoenix/docs/html/wx.ListBox.html" target="_blank" rel="noopener" class="mycode_url">listbox</a> be made read-only, so that the user cannot change the selections I made through code?<br />
<br />
Cheers,<br />
<br />
--<br />
Edit<br />
<br />
<pre class="brush: python" title="Python Code:">#Not good: User can't scroll :-/
self.lb1.Disable()</pre>--<br />
Edit: Work-around<br />
<br />
<pre class="brush: python" title="Python Code:">def __init__(self, *args, **kwargs):  
	...
	self.lb1 = wx.ListBox(panel, style=wx.LB_MULTIPLE)
	sizer.Add(self.lb1,1, wx.ALL | wx.EXPAND ,5)
	self.lb1.Bind(wx.EVT_LEFT_DOWN, self.on_input_intercept)
	self.lb1.Bind(wx.EVT_KEY_DOWN, self.on_input_intercept)
	...
	
def on_input_intercept(self, event):
	# Do NOT call event.Skip(). The event dies here, ignoring the user's action.
	return</pre>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[SOLVED] [sqlite] ? + LIKE?]]></title>
			<link>https://python-forum.io/thread-46421.html</link>
			<pubDate>Tue, 15 Sep 2026 20:53:54 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=11957">Winfried</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46421.html</guid>
			<description><![CDATA[Hello,<br />
<br />
Google didn't help. I tried a bunch of things, but still can't find how to use the ? syntax to prevent SQL injection while still using the LIKE operator.<br />
<br />
<pre class="brush: python" title="Python Code:">book = input("Words to search for? ")
conn = sqlite3.connect(MYDB)
cur = conn.cursor()

#BAD cur.execute("SELECT DISTINCT title FROM books WHERE title LIKE '?'", "%book%")
#BAD cur.execute("SELECT DISTINCT title FROM books WHERE title LIKE '%?%'", book)
cur.execute("SELECT DISTINCT title FROM books WHERE title LIKE '%%?%%'", book)
for row in cur.fetchall():
	print(row[0])

conn.close()</pre>Thank  you.]]></description>
			<content:encoded><![CDATA[Hello,<br />
<br />
Google didn't help. I tried a bunch of things, but still can't find how to use the ? syntax to prevent SQL injection while still using the LIKE operator.<br />
<br />
<pre class="brush: python" title="Python Code:">book = input("Words to search for? ")
conn = sqlite3.connect(MYDB)
cur = conn.cursor()

#BAD cur.execute("SELECT DISTINCT title FROM books WHERE title LIKE '?'", "%book%")
#BAD cur.execute("SELECT DISTINCT title FROM books WHERE title LIKE '%?%'", book)
cur.execute("SELECT DISTINCT title FROM books WHERE title LIKE '%%?%%'", book)
for row in cur.fetchall():
	print(row[0])

conn.close()</pre>Thank  you.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[listbox] Edit items?]]></title>
			<link>https://python-forum.io/thread-46414.html</link>
			<pubDate>Sun, 13 Sep 2026 07:48:29 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=11957">Winfried</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46414.html</guid>
			<description><![CDATA[Hello,<br />
<br />
A search through Google and the archives here returned nothing.<br />
<br />
Is it possible to edit items in a listbox, either through wx.ListBox or the wx.ItemContainer? I'd like to append something to the strings as I perform a task in a loop:<br />
<br />
<pre class="brush: python" title="Python Code:">items = [self.lb1.GetString(i) for i in range(self.lb1.GetCount())]
for item in items:
	#do something
	#modify string in listbox</pre>Cheers,<br />
<br />
--<br />
Edit: Unless there's a way to get the item's position in the original list, I'll increment my own counter and use the SetString() method:<br />
<br />
<pre class="brush: python" title="Python Code:">items = [self.lb1.GetString(i) for i in range(self.lb1.GetCount())]
index = 0
for item in items:
	#do stuff
	self.lb1.SetString(index, f"{item} DONE")
	index += 1</pre>--<br />
Edit: Simpler way to get items:<br />
<br />
<pre class="brush: python" title="Python Code:">index = 0
for item in self.lb1.GetStrings():
	self.lb1.SetString(index, f"{item} DONE")
	index += 1</pre>]]></description>
			<content:encoded><![CDATA[Hello,<br />
<br />
A search through Google and the archives here returned nothing.<br />
<br />
Is it possible to edit items in a listbox, either through wx.ListBox or the wx.ItemContainer? I'd like to append something to the strings as I perform a task in a loop:<br />
<br />
<pre class="brush: python" title="Python Code:">items = [self.lb1.GetString(i) for i in range(self.lb1.GetCount())]
for item in items:
	#do something
	#modify string in listbox</pre>Cheers,<br />
<br />
--<br />
Edit: Unless there's a way to get the item's position in the original list, I'll increment my own counter and use the SetString() method:<br />
<br />
<pre class="brush: python" title="Python Code:">items = [self.lb1.GetString(i) for i in range(self.lb1.GetCount())]
index = 0
for item in items:
	#do stuff
	self.lb1.SetString(index, f"{item} DONE")
	index += 1</pre>--<br />
Edit: Simpler way to get items:<br />
<br />
<pre class="brush: python" title="Python Code:">index = 0
for item in self.lb1.GetStrings():
	self.lb1.SetString(index, f"{item} DONE")
	index += 1</pre>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[fixed] Separate File Name From File Path]]></title>
			<link>https://python-forum.io/thread-46412.html</link>
			<pubDate>Fri, 11 Sep 2026 12:45:50 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://python-forum.io/member.php?action=profile&uid=44059">kanungosteel</a>]]></dc:creator>
			<guid isPermaLink="false">https://python-forum.io/thread-46412.html</guid>
			<description><![CDATA[Hi,<br />
<br />
I'm working with Python's os.path module and I'm trying to find a simple way to extract the directory path from a complete file path. I have searched through the available functions, but I haven't found the exact one I need.<br />
<br />
For example, suppose I have the following path:<br />
<br />
/X/Y/Z/file.txt<br />
<br />
I want to get only the directory portion:<br />
<br />
/X/Y/Z<br />
<br />
Is there a built-in function in os.path that can do this easily? I'm looking for something similar to the reverse of os.path.join()<a href="https://kanungosteel.com" target="_blank" rel="noopener" class="mycode_url"><span style="color: black;" class="mycode_color">.</span></a><br />
<br />
I would appreciate any suggestions or examples.]]></description>
			<content:encoded><![CDATA[Hi,<br />
<br />
I'm working with Python's os.path module and I'm trying to find a simple way to extract the directory path from a complete file path. I have searched through the available functions, but I haven't found the exact one I need.<br />
<br />
For example, suppose I have the following path:<br />
<br />
/X/Y/Z/file.txt<br />
<br />
I want to get only the directory portion:<br />
<br />
/X/Y/Z<br />
<br />
Is there a built-in function in os.path that can do this easily? I'm looking for something similar to the reverse of os.path.join()<a href="https://kanungosteel.com" target="_blank" rel="noopener" class="mycode_url"><span style="color: black;" class="mycode_color">.</span></a><br />
<br />
I would appreciate any suggestions or examples.]]></content:encoded>
		</item>
	</channel>
</rss>