Questions tagged [python]
Python is an interpreted, general, high-level programming language. Programming questions are off topic. Questions about the use of Python should be asked at Stack Overflow (https://www.stackoverflow.com) instead.
3,212 questions
1
vote
1
answer
158
views
How to open Windows snipping tool (snippingtool.exe) in Python?
I would like to open snippingtool.exe immediately ready to snip, similar to the function you get when you press the Win-key + Shift + S key combination (i.e. not the application window) from within ...
-2
votes
1
answer
24
views
How to install Python2 zlib on Ubuntu 24?
I am trying to set up my Python2 virtualenv on Ubuntu 24. The following script worked on Ubuntu 16-20. It would set up a virtualenv named _py.
mkdir -p _py
git clone https://github.com/pypa/virtualenv....
0
votes
0
answers
24
views
What are the best options to generate infogprapics for a video with an iPad? I have done similar things with Python [closed]
I’m generating infographics for sports (scores and players names) with Python and it works.
Now I have tablet (iPad) and I edit some videos with that.
I was wondering, is Python best/good option for ...
0
votes
1
answer
78
views
How to stop indentation with spaces for python files in vim
I have done all i can in .vimrc:
$ cat ~/.vimrc
set nocompatible
syntax enable
filetype plugin on
" Allow recursive file find
set path+=**
set wildmenu
" stop using spaces for tabs!
...
0
votes
1
answer
78
views
How can I configure agents in Cursor to use a specific Python virtual environment?
I am using Cursor and I am working on a Python project that relies on a virtual environment (conda).
When an agent runs code, installs dependencies, or executes Python commands, it does not use my ...
1
vote
2
answers
97
views
How to install python app with specific python version by uv
I'm trying to install DisplayCAL by uv pip install. But also, I'm in Fedora with native python 3.14. App won't run because it ask python version in range 3.8 → 3.13 only.
So how can I install it with ...
0
votes
0
answers
7
views
Python, $PYTHONPATH, sys.path.add() [migrated]
This code indicates what I wish to do, i.e.
- have a variable to hold the name of a file to import,
- with hsutil.which() used to look up the FOLDER it resides in (via $PATH),
- and automatically get ...
0
votes
1
answer
40
views
How to comment some code in PyCharm using Swiss/German keyboard?
I am trying to learn Python using PyCharm and my Swiss/German keyboard. The usual shortcut to comment some code (line or block) is ⌘ + / which should become ⇧ + ⌘ + 7 on a Swiss/German keyboard since ...
1
vote
2
answers
176
views
Windows 11: Permissions differ running program from CMD or from Python script - how to fix?
I want to run an executable from Python, using subprocess.run(), piping its output to Python to interpret it. When running the Python script, Windows tells me "[WinError 5] Zugriff verweigert&...
0
votes
0
answers
104
views
Decrypting Old PDF with Adobe.PubSec (RC2-40-CBC) DRM - All Standard Methods Failed
I'm seeking expert help with a very stubborn DRM issue on some high school textbooks I own. My goal is to remove the DRM so I can read them on my iPad. I have the required .pfx certificate and its ...
1
vote
0
answers
146
views
Python 3.13: How to enable history-search-backward
In the interactive Python interpreter.
Short TLDR:
How to have history-search-backward and Multiline editing at the same time.
What I currently have:
A ~/.inputrcwith this content:
## arrow up
"\...
2
votes
0
answers
65
views
After killing python3 in subshell with `Ctrl+\`, bash stops echoing prompts
I save this shell script as test.sh and then run bash test.sh:
python3
When the prompt appears I press Ctrl+\ (in reality I have more complicated Python commands and Ctrl+C/Ctrl+D doesn't work). ...
-1
votes
1
answer
569
views
How to remove python.exe from App execution aliases?
I have uninstalled Python 3.12, and these two items remained in Windows 11 Settings > Apps > Advanced app settings > App execution aliases: python.exe, python3.exe.
How to remove them form ...
0
votes
1
answer
379
views
Running python selenium script from Powershell
BLUF:Help me figure out how to run a selenium python script from PowerShell.
Forgive the wordy post, adding some back story...Ok, so my at my job I have been tasked with automating the startup and ...
0
votes
2
answers
77
views
Why does Cursor/VS Code's Python Terminal sometimes loop forever?
Sometimes when I click Cursor's Play button, instead of running the selected file it just loops the terminal forever until I force close it.
It’s not consistent though, usually it doesn’t happen. But ...