Top "Python-3.x" questions

For questions about Python programming that are specific to version 3+ of the language.

How to flush output of print function?

How do I force Python's print function to output to the screen? This is not a duplicate of Disable output …

python python-3.x printing flush
Import Error: No module named numpy

I have a very similar question to this question, but still one step behind. I have only one version of …

python python-3.x numpy import scipy
TypeError: Missing 1 required positional argument: 'self'

I am new to python and have hit a wall. I followed several tutorials but cant get past the error: …

python python-3.x
Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)

I've installed Python 3.5 and while running pip install mysql-python it gives me the following error error: Microsoft Visual C++ 14.0 is …

python python-3.x visual-c++
What does "SyntaxError: Missing parentheses in call to 'print'" mean in Python?

When I try to use a print statement in Python, it gives me this error: >>> print "Hello, …

python python-3.x
Import error: No module name urllib2

Here's my code: import urllib2.request response = urllib2.urlopen("") html = print(html) Any help?

python python-3.x urllib2
UnicodeDecodeError: 'charmap' codec can't decode byte X in position Y: character maps to <undefined>

I'm trying to get a Python 3 program to do some manipulations with a text file filled with information. However, when …

windows python-3.x unicode file-io decode
Which is the preferred way to concatenate a string in Python?

Since Python's string can't be changed, I was wondering how to concatenate a string more efficiently? I can write like …

python string python-3.x concat
"Unicode Error "unicodeescape" codec can't decode bytes... Cannot open text files in Python 3

I am using python 3.1, on a windows 7 machines. Russian is the default system language, and utf-8 is the default encoding. …

python unicode python-3.x
List attributes of an object

Is there a way to grab a list of attributes that exist on instances of a class? class new_class(): …

python class python-3.x