Questions tagged [python-3.3]

For issues that are specific to Python 3.3. Use the more generic [python] and [python-3.x] tags where possible.

Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use.

Use this tag if your question is specifically about . If your question applies to Python in general, use the tag . If your question applies to Python 3.x but not to Python 2, use the tag . If you aren't sure, tag your question and mention which version you're using in the body of your question.

Python 3.3 was released on September 29, 2012, and has a number of new features:

Syntax:

  • The yield from expression for generator delegation is introduced.
  • The u'unicode' syntax (which disappeared in Python 3.0) returns.

New standard library modules:

  • faulthandler - helps debugging low-level crashes.
  • ipaddress - high-level objects representing IP addresses and masks.
  • lzma - compress data using the XZ / LZMA algorithm.
  • unittest.mock - replace parts of your system under test with mock objects.
  • venv - Python virtual environments, as in the popular virtualenv package.

... as well as a reworked I/O exception hierarchy, rewritten import machinery based on importlib, more compact unicode strings, and more compact attribute dictionaries.

The C Accelerator for the decimal module has also been significantly improved, as has the unicode handling in the email module.

Finally, for security reasons, hash randomization is now switched on by default.

1148 questions
6
votes
2 answers

PyQt4 cannot import QtGui but can import QtCore

I installed python3.3 x86 (official python.org installer) on this windows 7 32-bit then installed PyQt4-4.10 for python3.3 windows x86 from here PyQt4-4.10-gpl-Py3.3-Qt5.0.1-x32-2.exe, an official installer too, a full PyQt4 installation (including…
bahaelaila7
  • 83
  • 1
  • 6
6
votes
3 answers

Numpy-MKL for OS X

I love being able to use Christoph Gohlke's numpy-MKL version of NumPy linked to Intel's Math Kernel Library on Windows. However, I have been unable to find a similar version for OS X, preferably NumPy 1.7 linked for Python 3.3 on Mountain Lion.…
MattDMo
  • 100,794
  • 21
  • 241
  • 231
6
votes
1 answer

Will Distribute be outdated when new packaging comes with Python 3.3?

Python 3.3 will come with a new packaging tool called "packaging": The new "packaging" module, building upon the "distribute" and "distutils2" projects and deprecating "distutils" Does this mean that Distribute will be outdated with Python 3.3?
deamon
  • 89,107
  • 111
  • 320
  • 448
5
votes
0 answers

Make a memoryview read-only in Python pre-3.8

Python 3.8 added the memoryview.toreadonly() method. But is there a way to make a read-only memoryview in previous version of python -- specifically Python 3.5 and 3.3? For a little bit more background, I use memoryviews to share parts of large…
Sylvain Leroux
  • 50,096
  • 7
  • 103
  • 125
5
votes
3 answers

Pass extra optional arguments to callbacks without breaking existing callbacks

I have an API method that accepts a callback. The callback expects one argument. I would like this method to pass a second argument to callbacks that accept it. However, I must maintain compatibility with callbacks that accept only the original…
Thom Smith
  • 13,916
  • 6
  • 45
  • 91
5
votes
2 answers

pyodbc install does not support python 3.5.1

I am trying to install pyodbc for a specific project, but unfortunately when I try to do an install, no matter the command I end up with the following error: Command "/usr/local/bin/python3.5 -u -c "import…
Philippe Hebert
  • 1,616
  • 2
  • 24
  • 51
5
votes
2 answers

Skimage Python33 Canny

Long story short, I'm just simply trying to get a canny edged image of image.jpg. The documentation is very spotty so I'm getting very confused. If anyone can help that'd be greatly appreciated. from scipy import misc import numpy as np from…
user1985351
  • 4,589
  • 6
  • 22
  • 25
5
votes
4 answers

How to sort a list according to another list? Python

So if I have one list: name = ['Megan', 'Harriet', 'Henry', 'Beth', 'George'] And I have another list where each value represents the names in the right order score_list = [9, 6, 5, 6, 10] So Megan = 9 and Beth = 6 (this is from a dictionary by…
Goregius
  • 53
  • 2
  • 6
5
votes
2 answers

What happens when I multiprocessing.pool.apply_async more times than I have processors

I have the following setup: results = [f(args) for _ in range(10**3)] But, f(args) takes a long time to compute. So I'd like to throw multiprocessing at it. I would like to do so by doing: pool = mp.pool(mp.cpu_count() -1) # mp.cpu_count() ->…
inspectorG4dget
  • 110,290
  • 27
  • 149
  • 241
5
votes
1 answer

Choose which function to execute, based on a parameter - its name

I have different functions, but each takes different number of arguments and different arguments. I want to be able to execute only one of them and to do this based on the name of the function as string. I tried this: def…
Faery
  • 4,552
  • 10
  • 50
  • 92
5
votes
2 answers

How do I automate an environment variable dependent benchmark of BLAS in python/numpy?

I need some help in figuring out how to automate a benchmark effort in python. I'm testing the effects of threading on a BLAS library calls through numpy in python. In a linux environment, threading in OpenBLAS is controlled through the…
bpbrown
  • 53
  • 1
  • 3
5
votes
1 answer

Cannot install PIL due to a UnicodeDecodeError

When I tried to install Pillow using pip-3.3, I got an error instead, see the traceback below. File "/home/samsun/workspace/python/chat_environment/lib/python3.3/site-packages/pip/req.py", line 297, in egg_info_data data = fp.read() File…
Captain Kidd
  • 1,253
  • 2
  • 13
  • 20
5
votes
2 answers

Python3 pip installing globally when in a virtualenv

Attempting to finally make the jump to Python 3, but am running into some issues with virtualenvwrapper. I start out by creating the virtual environment like so: mkvirtualenv -p /usr/local/bin/python3 projectname which yields: Running virtualenv…
follyroof
  • 3,430
  • 2
  • 28
  • 26
5
votes
5 answers

Dynamically Create Static Variables (Enum hack)

I'm trying to create a set of states for a Node class. Normally, I would do this by setting each Node instance's state variable to an int, and document which int corresponds to which state (since I don't have enums). This time, I'd like to try…
inspectorG4dget
  • 110,290
  • 27
  • 149
  • 241
5
votes
2 answers

Proper use of Pip in Python3.3's venv

Just trying to figure out the intended use of Python3.3's implementation of PEP405, which is the venv spec. This is my first dive into Python3, as I've been in Python2 up until now. Running Linux Mint KDE, which is pretty much a Debian distro, I…
basicdays
  • 1,944
  • 1
  • 15
  • 16