94,527 questions
Best practices
0
votes
3
replies
134
views
What is the proper way to integrate YubiHSM to Python 2.7 on Windows?
I am new to YubiCo and reading docs while waiting for my YubiHSM2. I need to add HSM support to a legacy (since 2004) Windows program written in Python 2.7. I can't use the Yubico Python interface ...
1
vote
1
answer
55
views
Are GTK2 default translations accessible from Python
When using GTK2 with Python, there are some things like 'gtk-yes', 'gtk-open' which help in getting e.g. button names translated to the according user language.
What I am searching for are more of ...
0
votes
0
answers
63
views
Why does Python 2 forbid implicit __hash__ on old-style classes only?
When I override equality on a class in any language I have to be careful not to create an inconsistent hash function.
Python 3 and Python 2 with old-style classes help here by deleting the __hash__ ...
0
votes
1
answer
34
views
Python: problem with multiprocessing.Pool and deleting files (WindowsError: [Error 32])
I'm writing code in Python 2.7 (bigger framework compatibility reasons) that does the following:
Takes an ID_something.py file, opens it, reads the lines from it, then closes the file.
Creates an ...
2
votes
0
answers
227
views
Python code to get direct download file link from mediafire
I have updated my code to download files from mediafire like
https://app.mediafire.com/folder/cdmen9tqtpwxk.
if self.teamName == "BlackHole":
if boxtype == "dm920":
key ...
0
votes
0
answers
119
views
How do install pip/math module from configured python2.7 source
Ubuntu 25 (plucky)
how do I include the math and other modules when compiling from source?
https://docs.posit.co/resources/install-python-source.html
Compiling 2.7.4
Wasn’t able to use deadsnakes:ppa ...
1
vote
0
answers
48
views
How to manually trigger each NAO robot speech command one by one in a Python script (in VSCode)?
I’m running a Python script controlling four NAO robots using the naoqi API. The script runs in VSCode on my local machine, connected to each robot.
My goal is to have:
Robot 1 speak first with a ...
0
votes
1
answer
114
views
Running older versions of pylint in VS Code possible?
I need to run pylint 1.9.5 with a Python 2.7 environment in VS Code 2025, but I have not found a way to do so. Both of them are also not supported by the pylint extension.
I tried pointing VS Code's ...
1
vote
1
answer
277
views
python -v results zsh: command not found: python MacOS Sequoia 15.5 Beta
Why does the command "python -v" result in "zsh: command not found: python" on Mac, even though Python 2 used to come installed with the device?
I am working on an 2020 MacBook Pro ...
0
votes
1
answer
214
views
How to read metadata information from a file using SMB Protocol?
I need to determine the last modification date of a file obtained via the SMB Protocol. I am using a machine running RHEL 7.5, Python 2.7.5, and SMB Protocol version 1.5.1.
I tried the following, but ...
-2
votes
2
answers
201
views
Unable to install get-pip.py 2.7 due to SSL error
We are using Python 2.7.3 and trying to install the compatible pip. Downloaded from https://bootstrap.pypa.io/pip/2.7/get-pip.py. When installing getting the below error.
Can someone help how to fix ...
0
votes
1
answer
188
views
Power Automate Desktop - import azure.storage.blob for Python 2.7/3.4
I am trying to perform the import of the azure.storage.blob module into a python script defined within the “Run Python Script” activity of Power Automate Desktop.
# Python 2.7 code
from azure.storage....
-1
votes
3
answers
126
views
can't install pillow neither packtools in Python 2.7.17
I mark articles for SciELO and I need to use Python 2.7.X to work with it, but when i try to install pillow, packtools and lxml the cmd points to "Could not find a version that satisfies the ...
0
votes
1
answer
71
views
Can you make a class variable that calls an instance of the class?
I am working with a class which does some math and stores the result, and then a line that sets a "noresult" to that class but initiated with zeroes, like so (I'm leaving out the math, this ...
0
votes
1
answer
133
views
Xarray.open_dateset uses more than double the size of the file itself
All,
I am opening NetCDF files from Copernicus data center using xarray version 2024-11-0, using open_dataset function as the following:
import xarray as xr
file1=xr.open_dataset("2021-04.nc"...