Top "Python-2.7" questions

Python 2.7 is the last major version in the 2.x series, and is no longer maintained since January 1st 2020.

Python script to do something at the same time every day

I have a long running python script that I want to do someting at 01:00 every morning. I have been looking …

python python-2.7 scheduler
Why does using from __future__ import print_function breaks Python2-style print?

I am new at programming with python, and I am trying to print out with a separator and end but …

python python-2.7 loops vim python-import
AttributeError: 'datetime' module has no attribute 'strptime'

Here is my Transaction class: class Transaction(object): def __init__(self, company, num, price, date, is_buy): self.company = company …

python class python-2.7
Setting Camera Parameters in OpenCV/Python

I am using OpenCV (2.4) and Python (2.7.3) with a USB camera from Thorlabs (DC1545M). I am doing some image analysis …

python opencv camera python-2.7
Backporting Python 3 open(encoding="utf-8") to Python 2

I have a Python codebase, built for Python 3, which uses Python 3 style open() with encoding parameter: https://github.com/miohtama/…

python python-2.7 python-3.x
Insert an element at a specific index in a list and return the updated list

I have this: >>> a = [1, 2, 4] >>> print a [1, 2, 4] >>> print a.insert(2, 3) None >&…

python python-2.7 list insert
How to use pip with Python 3.x alongside Python 2.x

I installed Python 3.x (besides Python 2.x on Ubuntu) and slowly started to pair modules I use in Python 2.x. …

python python-3.x python-2.7 pip
Adding value labels on a matplotlib bar chart

I got stuck on something that feels like should be relatively easy. The code I bring below is a sample …

python python-2.7 pandas matplotlib data-visualization
python JSON only get keys in first level

I have a very long and complicated json object but I only want to get the items/keys in the …

python json python-2.7 iterator key
"OSError: [Errno 1] Operation not permitted" when installing Scrapy in OSX 10.11 (El Capitan) (System Integrity Protection)

I'm trying to install Scrapy Python framework in OSX 10.11 (El Capitan) via pip. The installation script downloads the required modules …

python macos python-2.7 scrapy