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

Python: How do you call an attribute from one function into another?

This is the code: from tkinter import * import os class App: charprefix = "character_" charsuffix = ".iacharacter" chardir = "data/characters/" charbioprefix = "character_biography_" def __init__(self, master): …
-1
votes
1 answer

TypeError: list of indices must be integers, not str

What is wrong in my code to give me the error: TypeError: List of indices must be integers, not str Here is my code: print("This programe will keep track of your TV schedule.") Finish = False Show = [] ShowStart = [] ShowEnd = [] while not…
Kieran Lavelle
  • 446
  • 1
  • 6
  • 22
-1
votes
4 answers

How to print something when a user gives a word?

My question can be understood below: goodvalue=False while (goodvalue==False): try: word=str(input("Please enter a word: ")) except ValueError: print ("Wrong Input...") else: …
-1
votes
1 answer

Call a Python function from Matlab

I am having problems calling a Python function in Matlab. I have already researched my question with little joy, the question has already been answered on this website, Call Python function from MATLAB, but I can't seem to get the solution to work…
user2519890
  • 157
  • 2
  • 14
-1
votes
1 answer

Using checkboxes in python to select which files to write/export

I have a UI with 8 checkboxes. The idea is that depending on which ones are checked, it will choose what commands to send to telnet and what data files to return. Currently I just have 8 IF statements. This is causing some of the files to be mixed…
mad5245
  • 394
  • 3
  • 8
  • 20
-1
votes
1 answer

fill out a webform that uses javascript with python

i am trying to fill out a webform using a python program by submitting specific values. the problem is it uses javascript. i will post an example of the value i want to fill.…
user2193004
  • 79
  • 1
  • 1
  • 7
-1
votes
4 answers

Is there a way to assign multiple variables for one input box - Python

How would I assign multiple variables to one GUI input box? Something like this: q1, q2, q3 = input() This isn't how the code would go, but this is just something I want it to be like: a, b, c = str(input("Type in a command")) But not like…
GotRiff
  • 87
  • 1
  • 3
  • 9
-2
votes
2 answers

How do I print 1st place, 2nd place, etc. up to 5th place?

I have a program that reads the top 5 (or all scores and usernames if there are less than 5 people on the leaderboard of a .csv file, called leaderboard2.csv. However, in the python shell it says this: Here is the Top 5 leaderboard: Username -…
Joe
  • 21
  • 6
-2
votes
3 answers

How do I create this loop?

How do I create this loop where if welcome is not equal to "yes" or "no", it repeats the question (if they have an account), but if welcome is equal to "yes" or "no", they create an account (for "no") or allow the user to login (for "yes")? Thanks…
Joe
  • 21
  • 6
-2
votes
1 answer

Python tkinter Make a return value from a function appear in a text box

I'm trying to get a value from a function and i want to put the returned value to a text box on my GUI. Label(master, text="Enter your message :").grid(column = 0, row = 0) Label(master, text="Corrected message is :").grid(column = 0, row = 1) e1 =…
Raja
  • 1
  • 2
-2
votes
2 answers

Global Constants on Python

Hi I've recently been asked to do an assignment where I have to create a python program which asks the user to enter their gross pay and then calculates net pay based on a number of deductions. Deductions should be represented as global constants…
-2
votes
1 answer

Python - NameError name [variable] is not defined

Original question for context: I was working on a quick little password program and came across the error: NameError name 'confirm' is not defined. I am using Python 3.3, I am trying to use a password then enter no (2) it then supplys me with the…
qwerty77asdf
  • 93
  • 3
  • 11
-2
votes
1 answer

Finding and adding to a record in a File

I am fairly new to python and I need to make a program to ask 10 questions, save the score into a file and allow someone to read the scores in from the file. My problem: I need to check if the person who has done the quiz already has a record in…
-2
votes
4 answers

Python-why does it print out "dessert"

I'm new to programming, and obviously I can easily run a program to get the answer, but I want to get a clearer and better understanding of why this code runs "dessert". I understand len(s) is the length of the number, but what about the three…
Nicole Arnone
  • 37
  • 1
  • 3
-2
votes
2 answers

list comprehension to repeat element in a list by element value

I can't quite figure out the code to do this, there are similar posts: Repeating elements in list comprehension but I want to repeat a value in the list by the value in the list In [219]: l = [3,1] [i for x in range(i) for i in…
EdChum
  • 376,765
  • 198
  • 813
  • 562