1
vote
1answer
22 views
Implement Python 3's round function in Python 2.7
I am using some old codes written in Python 3 in my Google-App-Engine project which is using Python 2.7. The different round() algorithms in Python 3 and Python 2 gives me a headache. Is there any ...
0
votes
2answers
14 views
Pickling multiple dictionaries
So I'm new to python and I'll most likely be asking many noob questions throughout my learning process (If they haven't already been asked/answered of course).
One question I have is if there is a ...
0
votes
1answer
19 views
List comprehension/list creating loop in python 3.x
I've been trying to make a loop or list comprension thingy that does the following:
prints "Please give me the number of bread sold at ", self.bakeryname[k], ":"
then prompts the user for the number ...
0
votes
2answers
27 views
Python IDLE 3.3.2 “expected an indent block” error
My first Python code.
So, I just started coding about 45 minutes ago, and after trying to resolve this issue myself I decided to ask for some help. Please feel free to leave some constructive ...
-1
votes
2answers
34 views
sorting numbers using recursion
The purpous of using recursion instead of using for i in range(11): is because its advantagous to start from the top trying to solve a specific mathematical problem. The function will be changed so ...
0
votes
2answers
35 views
reading an array with multiple items (working on two items not three)
Code below reads from a text file (containing different arrays)
and breaks down into separate elements.
I have it working fine with arrays with TWO sub items, but not a third.
For example - This file ...
0
votes
2answers
29 views
Import statement doesn't work as expected with Python 3.3
I recently ported a django application from Python 2.7 to Python 3.3 with Django1.6b1.
My import statements wouldn't work anymore for custom module imports (User, views...) and I had to add a dot ...
0
votes
1answer
16 views
wait for button click on button click move button to a slot in tkinter
I get the title wasn't the best but I don't quite know how to explain it. I tkinter I want to make square widgets with "slots on them. When the app is run I want buttons to show up at the top of the ...
0
votes
1answer
20 views
Is it possible in tkinter to have two columns of labels with one label below and in the middle of them?
While the picture shows basically what I want to do, however:
All labels supposed to be perfect squares of the same size
labels in the 2 columns should be perfectly aligned
The label at the bottom ...
0
votes
2answers
39 views
Python multiprocessing closes too early
I'm trying to integrate multiprocessing into a project but I can't get it working.
This is what I've got:
import time
import winsound
from multiprocessing import Process
winsound.MessageBeep()
def ...
0
votes
5answers
50 views
break string and arrays down intro separate items
I have data in a file that has two sets of values and then an unspecified series of arrays
(each with 3 sub items in them)
For example:
('January', 2, [('curly', 30), ('larry',10), ('moe',20)])
I ...
0
votes
2answers
25 views
remove specific characters from text file string
I have a text file with the following line in it: ('larry', 3, 100)
I need to assign the three parts of it to different variables using a
method close to what I have below. So far I can split it ...
-3
votes
2answers
61 views
Are the basic primitive types immutable? [on hold]
In Python 3, the basic primitive types such as int, float, and bool are mutable or immutable?
0
votes
4answers
44 views
find pattern , count and print
i have a file for which i have to do 2 things. first count a particular pattern and if count is more than 5 i have to print all the lines containing.
input file:
0- 0: 2257042_7 ...
0
votes
0answers
14 views
Safetkinter RuntimeError: Recursion Limit
So I've been trying to get a threadsafe adapter for tkinter (I'm using Python 3.3) to help with some of my projects. I stumbled upon a recipe called "safetkinter" (recipe 578153), which promises to ...