Posts by Sarutobi sama • 51 points
7 posts
-
1
votes2
answers1874
viewsA: Problem importing a class from another folder and using it. (Python)
The solution is as follows: create a folder called pasteGenerate and put classGerar.py inside hers. in the file classPrint swap the first line with: "from . pastureGerar import classGerar" This…
-
0
votes2
answers1874
viewsQ: Problem importing a class from another folder and using it. (Python)
I’m going crazy here. I’m facing a problem that should have been solved by logic already. The problem is this: I have two folders: Novapasta/ Novafolder/classes In the first folder there is a file:…
-
-2
votes2
answers146
viewsQ: Transform String into Algorithm
Can anyone tell me if there’s a way I can turn a string into an algorithm ? for example: a = "1 + 1" => b = 1 + 1. For simple examples it’s easy to create a string interpreter, the problem is…
-
0
votes1
answer770
viewsQ: Turn two data lists into a graph with two parallel lines
Guys. I am since yesterday trying to do something that is very simple in Excel, but not in Python. I have two lists. Flap1 = [1,1,0,1,0,1] and Flap2 = [0,0,0,0,1,1,1] What I need to do is create a…
-
1
votes2
answers2238
viewsA: Timeout in Python input function
I had this doubt a while ago. The way I found it was this. import time print('Pausa de 5 segundos (Aperte Ctrl-C para inserir algo)') try: for i in range(0,5): time.sleep(1) except…
pythonanswered Sarutobi sama 51 -
2
votes1
answer1859
viewsA: A solution to break/continue a Python loop?
Good guys. It’s 4:31 in the morning and I solved. = D I’ll post on Google drive since they are almost identical codes. The solution was I put the thread(deletes one) inside a while with a for. That…
-
-1
votes1
answer1859
viewsQ: A solution to break/continue a Python loop?
The point is, I can’t find a solution that replaces using the console for my small application. What happens is: My app runs in eternal loop, but after it runs the loop, it should stop to ask if I…