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
0
votes
2 answers

create a .zip file for backup in python 3 with os x

I am new to programing python (5 days now) and have ran into a problem that i can't seem to find the answer to in this forum. i would appreciate any help and a detailed explaination would be very much appreciated. To being. i'm using python 3 on a…
0
votes
2 answers

Simple:Python asks for input twice

Here is my code: def calculator(value1,value2): function=input("Function?") if function=="*": return value1*value2 if function=="/": return value1/value2 if function=="+": return value1+value2 if function=="-": …
kuan
  • 415
  • 1
  • 9
  • 16
0
votes
1 answer

Passing Gtk.Window to a class?

I'm learning interface design in Python 3 and Glade with GObject introspection, and I don't understand how you can pass another variable (or class?) to another class, like this: from gi.repository import Gtk class DemoWindow(Gtk.Window): And what…
Marco Scannadinari
  • 1,774
  • 2
  • 15
  • 24
0
votes
2 answers

Object is not iterable

Here is the error I get: Traceback (most recent call last): File "C:\Users\Mendel Hornbacher\My programs\Spaceblaster\SpaceBlaster0.0.2b.py", line 95, in animate() File "C:\Users\Mendel Hornbacher\My…
Menachem Hornbacher
  • 2,080
  • 2
  • 24
  • 36
0
votes
1 answer

unable to send status message to twitter using python3.3 and its package twitter-1.9.0

Using the twitter-1.9.0 (http://pypi.python.org/pypi/twitter/1.9.0) I am trying to send a status message but unable to do it. below is the code snippet. import twitter as t # consumer and authentication key values are provided here. def…
Tanmaya Meher
  • 1,438
  • 2
  • 16
  • 27
0
votes
3 answers

this is written in python 3.3 and i''m getting error as syntax error. Can any one fix this?

while True: n=int(raw_input()) if n!=42: print n else: break
0
votes
1 answer

Separate strings from other iterables in python 3

I'm trying to determine whether a function argument is a string, or some other iterable. Specifically, this is used in building URL parameters, in an attempt to emulate PHP's ¶m[]=val syntax for arrays - so duck typing doesn't really help here,…
Monchoman45
  • 517
  • 1
  • 7
  • 17
0
votes
1 answer

Compile and split a string from file using python

How can I compile a string from selected rows of a file, run some operations on the string and then split that string back to the original rows into that same file? I only need certain rows of the file. I cannot do the operations to the other parts…
eonhelm
  • 229
  • 1
  • 4
  • 8
0
votes
1 answer

use a function on every item in a list python

Hello I am trying to build a tool that will compress a list of folders and rename the compressed file, this list of the names of folders I want to compress are located in a .txt file, the .txt is something like this: james, 5005 kyle, 02939 Betty,…
Nick
  • 102
  • 8
-1
votes
1 answer

Using custom-build C-API Python 3.3.5 module

I am trying to import a C-API Python module for a game (Assetto Corsa) that uses Python 3.3.5 as scripting extension. I am using MSVC 10.0 as described here for building the extension which works fine. Importing the produced *.pyd file works in the…
chriszo
  • 1
  • 1
  • 4
-1
votes
4 answers

Allow the user to input the list position of the word to RETURN to 2nd and 3rd element from the list

I need someone to help me code this WITHOUT using external libraries panda imports exceptions counters lineList = [['Cat', 'c', 1, x],['Cat', 'a', 2, x],['Cat', 't', 3, x],['Bat', 'b', 1, 3],['Bat', 'b', 1, 2],['Mat', 'm', 1, 1],['Fat', 'f', 1,…
user11964292
-1
votes
1 answer

How to install pip for python 3.3 on Windows?

I have to install python 3.3.5 particularly to use the api for OriginPro. However, when I try to install pip installation manager by downloading the get-pip.py and run it in python from cmd prompt, I get the following…
Harshad Surdi
  • 23
  • 1
  • 6
-1
votes
2 answers

File writing in Python 3.3

Can anyone give me advice on writing in files. This is in python 3.3. This error message just keeps on popping up. Traceback (most recent call last):Line 28, in file.write(name_1,"and",name_2,"have a",loveness_2,"percent chance of falling in…
-1
votes
1 answer

Don't see images on my buttons if I create them with a loop

I'm trying to make a program in Python 3.3.0 to train with Tkinter, but when I try to put images on buttons which are created in a loop, I obtain a few buttons that don't work (I can't click on them and they don't have images), and the last one is…
vladi
  • 48
  • 5
-1
votes
1 answer

Python for absolute beginners chapter 7 challenge 2

I am currently working through the python for absolute beginners 3rd addition. I am struggling with the 2nd challenge in the 7th chapter of the book, as i keep getting an error i don't understand. The challenge is to: "improve triva challenge game…