All things Python

45 readers
1 users here now

A magazine for the discussion of the Python programming language

founded 1 year ago
1
 
 

Handling machine vision cameras in Python

2
 
 

3.12.0 now available!

3
 
 

Created URL shortener with Tracker and API using Flask and PostgreSQL

Hello, I have created URL shortener using Flask and PostgreSQL hosted on Vercel and using neon.tech PostgreSQL database and IPInfo Geolocation API.

It tracks every click of shorten link and also provide API for integration to other projects.

Link to URL shortener: https://www.f4nsix.xyz

#python

4
 
 

Instagram has introduced Immortal Objects – PEP-683 – to Python. Now, objects can bypass reference count checks and live throughout the entire execution of the runtime, unlocking exciting avenues...

5
 
 

There doesn't seem to be an active python learning community so I'll post here. Feel free to redirect me if there is somewhere more appropriate.

I've finished a couple of fairly beginner python courses (introtopython.org and 100 days of python on Replit), and was wondering if people had suggestions of where to go next? Are there more intermediate level courses? Should I just start working on a project or something?

6
 
 

Hello!

I'm teaching Python from scratch at local charity this September.
I'll use existing lessons from other Python courses I've done in the past.

I need your help with the starting project.
In my other courses I usually do a mix of text editor, flashcards, note taking, to-do list, calculator, dice rolling, quiz game, etc.
Those have worked in the past and will do the job, but are kinda lame.
I'll will still go trough some of those as there are lessons there.

Looking for something that will capture attention at start.
Trying to create a "Aha!" moment for the students.

Is there a perfect starter app that can be built up from a small start?

Thank you for any answers!

7
 
 

Posting for the whole Steering Council, on the subject of @colesbury’s PEP 703 (Making the Global Interpreter Lock Optional in CPython). Thank you, everyone, for responding to the poll on the no-GIL proposal. It’s clear that the overall sentiment is positive, both for the general idea and for PEP 703 specifically. The Steering Council is also largely positive on both. We intend to accept PEP 703, although we’re still working on the acceptance details.

8
 
 

Did any of you ever tried to compile a python app that uses selenium with PyInstaller? The app works perfectly if launched as a python script, but when in binary format I get an error like this:

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

#python

9
 
 
10
 
 

Congratulations to the five new Board members-elect!
Cheuk Ting Ho
Denny Perez
Georgi Ker
Christopher Neugebauer
KwonHan Bae

11
 
 

I'm learning python and starting learning list comprehension. I though I would create a quick list from 1 to 50 in .1 increments to test logic etc and notice when I run the program the output is as shown below. My question is why am I not just getting .3. Which would be the next number in the sequence

To get the output I want would I have to use a rounding function? Or limit the value to one place.

Thanks

[0, 0.1, 0.2, 0.30000000000000004, 0.4, 0.5, 0.6, 0.7, 0.7999999999999999, 0.8999999999999999, 0.9999999999999999, 1.0999999999999999, 1.2, 1.3, 1.4000000000000001, 1.5000000000000002, 1.6000000000000003, 1.7000000000000004, 1.8000000000000005, 1.9000000000000006, 2.0000000000000004, 2.100000000000000

count = 0
a = []
while count < 50.1:
a.append(count)
count = count + .1
print(a)

#python

12
 
 

Gevent seems pretty straightforward. Check out this example:

Here is a tutorial.

Unlike asyncio, with gevent you can continue to use the libraries you're familiar with, and the exact same codebase can be run with or without gevent "enabled". You don't need special async versions of each library, as you do with async/await code.

What are the issues you ran in to while using gevent, that asyncio solved?

Why did AsyncIO take off when we already had gevent?

13
 
 

ChatGPT-based chatbots can now call your custom code to get information it doesn't know. e.g. current weather, scrape the web, access APIs, etc.

I've added a #Python ( #Flask ) demo of this to my chatbot quickstart repository.

14
 
 

20 standard library modules are being removed in 3.13 as stipulated in PEP 594, so called "dead batteries".

15
 
 

The plan for 3.13 is similar to early plans for 3.12.

16
 
 

Learn how to Create Python GUIs with Python & PyQt.

17
 
 

In this video we'll import the iris dataset and Train our Model!We'll import the iris dataset as a CSV file, and then tweak the last column a bit.Then we'll ...