Julien Tayon: Bidirectionnal python/tk by talking to tk interpreter back and forth
Planet Python
by
6h ago
Last time I exposed an old way learned in physical labs to do C or python/tk like in the old days: by summoning a tcl/tk interpreter and piping commands to it. But what fun is it? It's funnier if the tcl/tk interperpreter talks back to python :D as an hommage to the 25 years awaited TK9 versions that solves a lot of unicode trouble. Beforehand, to make sense to the code a little warning is required : this code targets only POSIX environment and loses portability because I chose to use a way that is not the « one best way » for enabling bidirectionnal talks. First and foremost, the Popen no ..read more
Visit website
Real Python: Quiz: Iterators and Iterables in Python: Run Efficient Iterations
Planet Python
by
14h ago
In this quiz, you’ll test your understanding of Python’s Iterators and Iterables. By working through this quiz, you’ll revisit how to create and work with iterators and iterables, understand the differences between them, and review how to use generator functions and the yield statement. [ Improve Your Python With ? Python Tricks ? – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ..read more
Visit website
Chris Rose: uv, direnv, and simple .envrc files
Planet Python
by
1d ago
I have adopted uv for a lot of Python development. I'm also a heavy user of direnv, which I like as a tool for setting up project-specific environments. Much like Hynek describes, I've found uv sync to be fast enough to put into the chdir path for new directories. Here's how I'm doing it. Direnv Libraries First, it turns out you can pretty easily define custom direnv functions like the built-in ones (layout python, etc...). You do this by adding functions to ~/.config/direnv/direnvrc or in ~/.config/direnv/lib/ as shell scripts. I use this extensively to make my .envrc files easier to maintain ..read more
Visit website
Julien Tayon: Simpler than PySimpleGUI and python tkinter: talking directly to tcl/tk
Planet Python
by
1d ago
Well, the PySimpleGUI pull rug of licence reminded me how much dependencies are not a good thing. Even though FreeSimpleGUI is a good approach to simpler tk/tcl binding in python : we can do better, especially if your linux distro split the python package and you don't have access to tkinter. I am watching you debian, splitting ALL packages and breaking them including ... tcl from tk (what a crime). Under debian this stunt requires you to install tk : apt install tk8.6 How hard is it to remove when tcl/tk is installed to do GUI programming in tk without tkinter? Well, it's fairly easy ..read more
Visit website
Python Engineering at Microsoft: Python in Visual Studio Code – October 2024 Release
Planet Python
by
2d ago
We’re excited to announce the October 2024 release of the Python and Jupyter extensions for Visual Studio Code! This release includes the following announcements: Run Python tests with coverage Default Python problem matcher Python language server mode If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions. Run Python tests with coverage You can now run Python tests with coverage in VS Code! Test coverage is a measure of how much of your code is covered by your tests, which can help you identify areas of your code th ..read more
Visit website
Real Python: Quiz: Python import: Advanced Techniques and Tips
Planet Python
by
2d ago
In this quiz, you’ll test your understanding of Python’s import statement and related topics. By working through this quiz, you’ll revisit how to use modules in your scripts and import modules dynamically at runtime. [ Improve Your Python With ? Python Tricks ? – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ..read more
Visit website
Seth Michael Larson: EuroPython 2024 talks about security
Planet Python
by
2d ago
EuroPython 2024 talks about security About • Blog • Newsletter • Links EuroPython 2024 talks about security Published 2024-10-04 by Seth Larson Reading time: minutes EuroPython 2024 which occurred back in July 2024 has published the talk recordings to YouTube earlier this week. I've been under the weather for most of this week, but have had a chance to listen to a few of the security-related talks in-between resting. Counting down for Cyber Resilience Act: Updates and expectations This talk was delivered by Python Software Foundation Executive Director Deb Nicholson and and Board Member C ..read more
Visit website
Trey Hunner: Switching from virtualenvwrapper to direnv, Starship, and uv
Planet Python
by
3d ago
Earlier this week I considered whether I should finally switch away from virtualenvwrapper to using local .venv managed by direnv. I’ve never seriously used direnv, but I’ve been hearing Jeff and Hynek talk about their use of direnv for a while. After a few days, I’ve finally stumbled into a setup that works great for me. I’d like to note the basics of this setup as well as some fancy additions that are specific to my own use case. My old virtualenvwrapper workflow First, I’d like to note my old workflow that I’m trying to roughly recreate: I type mkvenv3 <project_name> to create a new ..read more
Visit website
Real Python: Quiz: When to Use a List Comprehension in Python
Planet Python
by
3d ago
In this quiz, you’ll test your understanding of List Comprehension in Python. By working through this quiz, you’ll revisit how to rewrite loops as list comprehensions, how to choose when to use list comprehensions, how you can use conditional logic in your comprehensions, and how to profile your code to resolve performance questions. [ Improve Your Python With ? Python Tricks ? – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ..read more
Visit website
Scikit-learn
Planet Python
by
3d ago
We are excited to announce the launch of the scikit-learn user survey! Scikit-learn continues to evolve thanks to contributions from its diverse user community. As we plan for future releases, we want to ensure we are focusing on what matters most to you — our users. The goal of this survey is to better understand how users interact with the library, identify any pain points, learn about the features you find most useful, and what’s missing. This is your chance to have a say in how the library grows and adapts to meet the evolving needs of the machine learning community. The survey will take a ..read more
Visit website

Follow Planet Python on FeedSpot

Continue with Google
Continue with Apple
OR