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.

Convert Python dictionary to JSON array

Currently I have this dictionary, printed using pprint: {'AlarmExTempHum': '\x00\x00\x00\x00\x00\x00\x00\x00', 'AlarmIn': 0, …

python python-2.7
Python reading from a file and saving to utf-8

I'm having problems reading from a file, processing its string and saving to an UTF-8 File. Here is the code: …

python python-2.7 utf-8
ln (Natural Log) in Python

In this assignment I have completed all the problems except this one. I have to create a python script to …

python python-2.7 natural-logarithm
No module named setuptools

I want to install setup file of twilio. When I install it through given command it is given me an …

python python-2.7 setup.py
how to update spyder on anaconda

I have Anaconda installed (Python 2.7.11 |Anaconda custom (64-bit)| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)] on win32) and I am using …

python python-2.7 anaconda spyder
Get exception description and stack trace which caused an exception, all as a string

I've seen a lot of posts about stack trace and exceptions in Python. But haven't found what I need. I …

python python-2.7 exception-handling stack-trace
python socket.error: [Errno 98] Address already in use

when i setup application.py, it shows that socket.error: [Errno 98] Address already in use. Traceback (most recent call last): …

python python-2.7
Rounding to two decimal places in Python 2.7?

Using Python 2.7 how do I round my numbers to two decimal places rather than the 10 or so it gives? print "…

python python-2.7 rounding
How to hide output of subprocess in Python 2.7

I'm using eSpeak on Ubuntu and have a Python 2.7 script that prints and speaks a message: import subprocess text = 'Hello …

python python-2.7 subprocess espeak
How to convert a hex string to hex number

I want to convert a hex string (ex: 0xAD4) to hex number, then to add 0x200 to that number and …

python string python-2.7 hex