Questions tagged [python-2.7]
Python 2.7 is the last major version in the 2.x series, and is no longer maintained since January 1st 2020. Use the generic [python] tag on all Python questions. Do not add this tag simply to convey the version of Python you're using, unless the question concerns an issue specific to Python 2.7.
python-2.7
95,156
questions
1
vote
2
answers
51
views
Python Pandas data frame column split based on previous unique columns combination [duplicate]
I have a data frame like below:
TAG TAG_NAME METRIC METRIC_NAME CAPTURE_DATE MB
DB PRO SPACE A 2024-03-01 3
DB PRO SPACE B 2024-03-01 4
DB ...
0
votes
2
answers
69
views
List of lists (double [[) in Python
This is a really basic thing but after reading the documentation I am still not able to do. I just want to create a list of 9 sublists as follows
[[0, 0.05, 0.1, ..., 25],[0, 0.05, 0.1, ..., 25],[0, 0....
-1
votes
2
answers
65
views
can't find the page URL
I got the same error while writing code.
I started making this project using a video tutorial on YouTube. I think the problem is in the URLConf but I can’t find this problem myself.
Essentially the ...
0
votes
1
answer
20
views
Dict comprehension over multiple dicts with missing keys
I have a piece of legacy python2 code that looks like the following
# dict1 and dict2 are inputs. dict2 is where the value is a 4-tuple
return {
key: [
NamedTuple1(val1, ...
0
votes
0
answers
21
views
Error Building 'pycapnp' for AppScale on Ubuntu 18.04 with Python 2.7
As a Java Developer transitioning into the Python ecosystem, I've noticed a difference in how dependencies are handled between the two languages. In Java, project dependencies remain intact and the ...
0
votes
0
answers
31
views
SCRAM authentication method in Psycopg2 and Python 2.7
I have an old application based on python 2.7 which is currently using psycopg2 2.7.4 and using latest releases of postgresql I got the error "pg_connect(): Unable to connect to PostgreSQL server:...
1
vote
1
answer
33
views
Using Revit Python Shell, is it possible for the print statement to output colored text?
Using Revit Python Shell, is it possible to get a print statement to print colored text?
For example,
print "An Apple is red"
where the word "Apple" prints in red.
0
votes
0
answers
41
views
Django Tests Throw ORA-00942: table or view does not exist
I haven't found any questions with respect to Django tests and Oracle DB. I am trying to run a test on an existing application, but am running into the table or view doesn't exist error.
I am confused ...
1
vote
0
answers
30
views
simple python lambda sorting gives different results on different devices
this is my python code for apache hive udf:
#!/usr/bin/python
import sys
counter=0
delay={"carrier":0, "nas":0,"weather":0, "security":0, "late_aircraft&...
0
votes
0
answers
143
views
Problem with python server cert? - "There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed."
This command suddenly started failing on my centos image: RUN pip install --upgrade 'pip==20.3.4'.
This is the error message: Could not fetch URL https://pypi.python.org/simple/pip/: There was a ...
0
votes
0
answers
261
views
yarn global add windows-build-tools, GET https://npm.taobao.org/mirrors/python/2.7.15/python-2.7.15.amd64.msi returned 404
PS C:\Users\member2> yarn global add windows-build-tools
yarn global v1.22.22
[1/4] Resolving packages...
warning [email protected]: Node.js now includes build tools for Windows. You ...
0
votes
1
answer
38
views
Maya Python: Drop down menu align with button
I'm relatively new to using python in Maya. I am trying to figure out how to align the drop down menu with a button. I would like for both the drop down menu and both the buttons to be aligned with ...
0
votes
0
answers
23
views
how to get ripem160 from hashlib to work in python 2
I am modifying a script written in python2 that uses hashlib, the actual call is:
ripemd160 = hashlib.new('ripemd160')
I am doing this in a venv python2.
I checked the /usr/lib/python2.7/hashlib.py ...
1
vote
1
answer
54
views
How to replace \r or \n in \r\n python2.7
How to replace \r or \n in \r\n in Python 2.7?
Input string = 'hello\r\n\n world\n \r\r\n\r\n'
Output string = 'hello\r\n\r\n world\r\n \r\n\r\n\r\n'
0
votes
0
answers
10
views
I don't get my own email if I send it using Gmail to Mailman
I have a Python Mailing list using Mailman2
When subscribed people using gmail send and email to the list, they don't get their own email. But if they reply, they get it.
It works using any other ...