Questions tagged as 'python'

1
answer

Complex operations with Python (pygame.math.Vector2)

I'm learning Python and came across a complex expression that derives from pygame.Vector2 : import pygame x = pygame.math.Vector2(1,2) b = x * 5 - (1, 2) print(x) print(b) Result: [1, 2] [4, 8] In the above case, the same x *...
asked by 29.09.2018 / 03:13
1
answer

Batch File to access multiple directories and execute python script in different command prompts

Hello everyone, how are you? I'm trying to create a bat file to run python scripts in different directories, something like this: C:\Test | --- Test1\example.py | --- Test2\example.py | --- Test3\example.py | --run.bat I have...
asked by 01.10.2018 / 15:05
1
answer

runtime error - question

In this problem, you should read the code of a part 1, the number of parts 1, the unit value of each part 1, the code of a part 2, the number of parts 2 and the unit value of each part 2. After, calculate and show the amount to be paid. Entr...
asked by 29.09.2018 / 00:37
1
answer

pass input when executing bat

Good afternoon, I have a .bat to run a python file, it needs to receive an entry, but I can not run this input when running .bat, does anyone know how to do it? follows bat information: cd C:\Users\Jonathan Pereira\Desktop\ProjetoIruan\Robo...
asked by 26.09.2018 / 19:54
1
answer

with transformation [closed]

def eR(k,x): if k<=1: return 1 else: return (x**k)/eR(k-1,x)*k x=int(input("Insira o X:")) k=int(input("Insira o número de termos:")) print(eR(k,x))     
asked by 28.09.2018 / 21:47
1
answer

Wait page load for selenium in python

I created a program to log into the site, but it loads very slowly when it opens, and for that I need to put sleep (40), which waits 40 seconds to open, but has times that takes 50 seconds and the error and has hours it takes 20 seconds and it i...
asked by 22.10.2018 / 19:11
1
answer

How do I make a button draw something new on a screen with tkinter?

I tried to make a data simulator in Python with Tkinter that shows the layout of the die in the window after rolling. For this, I defined a function that generates a random number from 1 to 6 and draws the data side on a screen depending on the...
asked by 31.08.2018 / 02:37
1
answer

how do I put a Scrollbar in a window in python as if it were a web page, the more content I could get down through Scrollbar

I wanted to get into the program window using tkinter, it would be possible to use a Scrollbar to look for more items in the window so that it does not have its limited height, so you can drag the scrollbar down (Vertical Only) to find more item...
asked by 08.08.2018 / 11:31
1
answer

How to insert a row in a DataFrame Pandas in the middle of other rows?

I have a sensor data output that has the following structure: --- Home --- $ LAGM, Colar03, Yellow, 32262, -31226, -5120, -104,40,190,1662.00,1670.00,236.00, MGAL $ GPGGA, 113203,181,206,6812, S, 05443,4264, W, 1,03,3,4,0,0, M, 4.8, M ,...
asked by 31.07.2018 / 18:28
1
answer

pylint E1101: Class 'User' has no 'objects' member

I am using vscode together with DjangoRestFramework and the same is accusing error in the following line: res = User.objects.filter(user_nome=value) But the code runs correctly, the error that the editor shows is as follows: pylint E1101:...
asked by 18.07.2018 / 16:02