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
1 answer

Python Server Client program error: "OSError: [WinError 10048]"

So I'm studying Python from the book Fundamentals of Python by Kenneth Lambert and I'm having trouble with an error from one of the programs in the book. Here in chapter 10 talks about Clients and Servers. My professor asked us to key those programs…
user3451338
  • 89
  • 1
  • 1
  • 7
6
votes
1 answer

Python 3.3 with Pillow - ImportError: No module named 'Image'

I have this code: import Image import pygame, sys from pygame.locals import * pygame.init() catImg = Image.open("cat.jpg") I am using Python 3.3 and latest version of Pillow. But when I run this code I get: ImportError: No module named…
Tsvetelina Borisova
  • 417
  • 1
  • 4
  • 14
6
votes
1 answer

Python 3.3: DeprecationWarning when using nose.tools.assert_equals

I am using nosetest tools for asserting a python unittest: ... from nose.tools import assert_equals, assert_almost_equal class TestPolycircles(unittest.TestCase): def setUp(self): self.latitude = 32.074322 self.longitude =…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
6
votes
4 answers

Listing attributes of namedtuple subclass

I have a tiny class that extends a namedtuple, but the __dict__ property of its instances is always returning empty. Point = namedtuple('Point', 'x y') p1 = Point(20, 15) print(p1, p1.__dict__) # Point(x=20, y=15) OrderedDict([('x', 20), ('y', 15)])…
BoppreH
  • 8,014
  • 4
  • 34
  • 71
6
votes
1 answer

cx_freeze creates multiple instances of program

I'm trying to compile some Python 3.3 code using cx_freeze and, after compiling, the resulting test.exe file will create an indefinite number of instances of the program, causing my Windows 7 system to become unstable. It works just as intended when…
Brickmastr
  • 101
  • 1
  • 7
6
votes
1 answer

Decompile Python 3.3 .pyc using unpyc3

Accedentely I lost all my project source code. But I still have my .pyc files. I need help decompiling them. I downloaded unpyc3 script that can decompile python 3.2 files. And made a change to allow it read python 3.3 pyc files correctly: def…
Michael M.
  • 61
  • 1
  • 3
6
votes
3 answers

While generating all possible combinations itertools.combinations_with_replacement() vs itertools.product()?

While writing a program that finds all the different combos for a list, I found a lot of threads about using intertools.product() instead of intertools.combinations_with_replacement(), as I have been doing. No one explained why you should use…
Torkoal
  • 457
  • 5
  • 17
6
votes
2 answers

Tkinter - How to create submenus in menubar

Is it possible? By looking at the options I'm stumped. Searching on the web hasn't lead me anywhere. Can I create a submenu in the menubar. I'm referring to doing something similar to Idle Shell when I click on File and go down to Recent Files and…
confused
  • 1,283
  • 6
  • 21
  • 37
6
votes
4 answers

Pygame attribute, init()

I'm trying to use Pygame with Python 3.3 on my windows 8 laptop. Pygame installed fine and when I import pygame it imports fine as well. Although when I try to execute this small code: import…
user2387537
  • 361
  • 3
  • 9
  • 17
6
votes
3 answers

Sending WM_COPYDATA with Python 3

I'm trying to write a python script that will interface with my copy of stickies. I'm having trouble with how Python interacts with the WM_COPYDATA struct, and unfortunately I haven't been able to find many examples online. Using the code: import…
Jacobm001
  • 4,431
  • 4
  • 30
  • 51
6
votes
5 answers

Using the crypt module in Windows?

In IDLE and Python version 3.3.2, I try and call the python module like so: hash2 = crypt(word, salt) I import it at the top of my program like so: from crypt import * The result I get is the following: Traceback (most recent call last): File…
codaamok
  • 717
  • 3
  • 11
  • 21
6
votes
1 answer

Python - Is the grammar for 3.0 the same as 3.3?

I noticed when setting up a PyDev project in Eclipse that the latest grammar version available is 3.0. However, I noticed in this question/answer that the grammar from 3.0 doesn't change when moving to 3.1. Is the same true between 3.0 and 3.3?…
golmschenk
  • 11,736
  • 20
  • 78
  • 137
6
votes
2 answers

Why am I getting an import error upon importing multiprocessing?

I have a script which requires multiprocessing. What I found from this script is that there is a problem with the multiprocessing module. To test this theory, I copied and pasted from multiprocessing import Process def f(name): print('hello',…
user1876508
  • 12,864
  • 21
  • 68
  • 105
6
votes
3 answers

New column based on conditional selection from the values of 2 other columns in a Pandas DataFrame

I've got a DataFrame which contains stock values. It looks like this: >>>Data Open High Low Close Volume Adj Close Date 2013-07-08 76.91 77.81 76.85 77.04 5106200 77.04 When I try to make…
Uninvited Guest
  • 1,865
  • 4
  • 19
  • 17
6
votes
1 answer

Creating a WebSocket Client in Python

I am trying to learn about socket programming as well as the WebSocket protocol. I know that there are python web socket clients in existence but I am hoping to just build a toy version for my own learning. To do this I have created an extremely…
Bear
  • 486
  • 2
  • 8
  • 16