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 2.7: Print to File

Why does trying to print directly to a file instead of sys.stdout produce the following syntax error: Python 2.7.2+ (default, …

python file python-2.7
Python - Extracting and Saving Video Frames

So I've followed this tutorial but it doesn't seem to do anything. Simply nothing. It waits a few seconds and …

python python-2.7 opencv
Linux command-line call not returning what it should from os.system?

I need to make some command line calls to linux and get the return from this, however doing it as …

python linux python-2.7 command-line os.system
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

... soup = BeautifulSoup(html, "lxml") File "/Library/Python/2.7/site-packages/bs4/__init__.py", line 152, in __init__ % ",".join(features)) bs4.FeatureNotFound: Couldn't find …

python python-2.7 beautifulsoup lxml
How to send a "multipart/form-data" with requests in python?

How to send a multipart/form-data with requests in python? How to send a file, I understand, but how to …

python python-2.7 multipartform-data python-requests
How to sort a dataFrame in python pandas by two or more columns?

Suppose I have a dataframe with columns a, b and c, I want to sort the dataframe by column b …

python pandas python-2.7 sorting data-analysis
Using both Python 2.x and Python 3.x in IPython Notebook

I use IPython notebooks and would like to be able to select to create a 2.x or 3.x python notebook …

python python-2.7 python-3.x ipython ipython-notebook
How do I install PyCrypto on Windows?

I've read every other google source and SO thread, with nothing working. Python 2.7.3 32bit installed on Windows 7 64bit. Download, extracting, …

python windows python-2.7 pycrypto
sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype('float64')

I am using sklearn and having a problem with the affinity propagation. I have built an input matrix and I …

python python-2.7 scikit-learn valueerror
Python - 'ascii' codec can't decode byte

I'm really confused. I tried to encode but the error said can't decode.... >>> "你好".encode("utf8") Traceback (most …

python python-2.7 unicode python-2.x python-unicode