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

Python grabbing pages source with PHP in it

I know how to grab a sources HTML but not PHP is it possible with the built in functions?
TrevorPeyton
  • 629
  • 3
  • 10
  • 22
0
votes
1 answer

Python hide error

Alright, I am fairly new to python and I am making a console witch will allow multiple features, one of those is to grab a page source and either print it on the page, or if they have another arg then name the file of that arg... The first arg would…
TrevorPeyton
  • 629
  • 3
  • 10
  • 22
0
votes
2 answers

Loop keeps going after being carried out

def Help(string): while True: if string == 'Manifest': return Manifest() break elif string == 'Intent': return Intent() break else: print('The options available…
Dobz
  • 1,213
  • 1
  • 14
  • 36
0
votes
1 answer

Find all the indexes of a number in a list

I have the following list: lista = [1,2,3,5,0,5,6,0] I know that print(lista.index(0)) will print the first index where it found the number i.e. 4 How do I get it to print the next index which should be 7 etc?
Alwina
  • 1
0
votes
1 answer

python3 - os.path changes

I am using python 3.3 in Windows 7. The python file, main.py is in D:\my proj\$MY\1 I wrote the following code in that file: import os file_usage = "usage.txt" p1 = os.getcwd() print ("os.getcwd(): ", p1) p5 = os.path.join(p1,"report") print…
magneto
  • 113
  • 2
  • 13
0
votes
1 answer

Python says: "IndexError: string index out of range."

I am making some practice code for a game similar to the board game, MasterMind-- and It keeps coming out with this error, and I can't figure out why it's doin it. Here's the code: def Guess_Almost (Guess, Answer): a = ''.join([str(v) for v in…
user2072826
  • 528
  • 1
  • 5
  • 12
0
votes
1 answer

How do I use a variable foo in a function to reference some class bar.foo when foo changes?

I just started an introduction to CS course that is teaching us python. I've been fooling around trying to make a program that will generate a character sheet for an rpg game. I was wondering how to use classes to define items and a function later…
Nyrocthul
  • 1
  • 2
0
votes
1 answer

Can't send correct value over a socket using Python

I'm new to using Python and sockets in general (only started yesterday) so I've been having a lot of issues trying to set up a TCP client and server. The issue I'm having is that I want to send a key from the server to the client. I know that the…
Metagen
  • 41
  • 1
  • 2
  • 9
0
votes
1 answer

PyQT4/Python33 issues

I have installed PyQt 4 for use with Python33 on my windows 7 machine, I followed the instructions on riverbank and everything seems to have be done correctly, however, I tried a simple example to create a basic found online, which compiled but…
user1978826
  • 203
  • 1
  • 9
  • 14
0
votes
1 answer

Viewing pyqt4 export before adding code

I am new to python 3.3 and am having some trouble with random simple tasks. I made a gui in qt designer and exported the py code. I added def show(self): self.QtGui.show() sys.exit(self.exec_()) and MainWindow =…
mad5245
  • 394
  • 3
  • 8
  • 20
0
votes
2 answers

python 3.3 basic error

I have python 3.3 installed. i use the example they use on their site: import urllib.request response = urllib.request.urlopen('http://python.org/') html = response.read() the only thing that happens when I run it is I get this…
teddy
  • 63
  • 3
  • 11
0
votes
1 answer

'int' object is not callable: Type error

Ok, so I made a basic calculator today, (and today is my first day of learning programming) and I'm getting this error with the following code: Traceback (most recent call last): File "C:\Users\Stone\Desktop\unfinished calculator.py", line 42, in…
0
votes
1 answer

Can getMouse act on one specific object in Python?

I am trying to make a Tic Tac Toe game in Python using the Zellegraphics module. I want to use getMouse for mouse input but I am unable to figure out how to make getMouse to work on one cell of the board. I defined 9 different squares and what I…
user1946564
  • 47
  • 1
  • 6
0
votes
3 answers

Is there a shorter way to remove the first two values in a list?

I want to find the sum of a list not including the first two values: values.remove(min(values)) values.remove(min(values)) avg = sum(values) / len(values) Is there a simpler way to do this?
Alex Mollberg
  • 231
  • 3
  • 5
  • 9
0
votes
2 answers

Score Doesn't work here? - Python

I am trying to keep a score in this game, so I set a score variable and every time an answer is answered correctly, it adds + 1 point to score and if you get an incorrect answer, it will deduct a point. When i print score at the end, it is still…
GotRiff
  • 87
  • 1
  • 3
  • 9