Questions tagged as 'python'

1
answer

How to insert legend in a linear graph with 3 vectors in the Y axis?

x=['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'] y=[] z=[] w=[] for i in range (0,12,1): soma=np.sum(mprod[:,i]) y.append(int(soma)) for j in range (0,12,1): estoque=np.sum(resultado[:,j]) w.append(int(e...
asked by 12.07.2018 / 22:23
1
answer

What do you use to format a string,%, or format?

Use "%" or "format" ? I think the latter is more recent, but is there any other aspect to be taken into account when deciding which one to use?     
asked by 11.12.2017 / 22:40
1
answer

How to check the latest file in a folder with Python?

Assuming you have a folder with several TXT files with different names and need to know the latest file, how do I do this using Python?     
asked by 20.04.2018 / 14:13
0
answers

How to change the password of an Ips list?

How do I change the user and password of a large number of servers with different ips, rather than an ip only? Follow the code: # Copyright 2016 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0...
asked by 12.07.2018 / 21:08
1
answer

Hangman Game - Hit Check

I have a problem with finishing the game in Python, I can not make a schematic to check if the letters were correct or wrong, could you help me? from random import randint lista_palavras = ["casa", "mercado", "palio", "palmeiras", "lakers", "...
asked by 11.07.2018 / 22:58
1
answer

placeholder for varchar sql

I'm doing a program that reads the Arduino output and sends it to a SQLITE3 database. You're giving me this error: cursor.execute("INSERT INTO reciclagem_data (personID, nome) VALUES (%s,%s)", (pieces[0], pieces[1])) OperationalError: near...
asked by 12.07.2018 / 03:13
2
answers

Error when using Selenium WebDriver in Python

I'm trying to develop a script in Python that simply opens the browser as shown in this Selenium with Chrome , but every time I try to run the program I come across the following error:    navigator = webdriver.Chrome () AttributeError: mo...
asked by 20.07.2018 / 09:48
2
answers

Python code too slow ?? Access to Access database with pyodbc

I need to get some data from a huge access database (two, actually, depending on which input I have). I have a function that calls that bank by chunks (if I try a fetchall gives memory problem). This function is sometimes called by my main funct...
asked by 20.07.2018 / 18:48
1
answer

Python WebDriver Selenium does not find the item on the page after loading

I'm having a problem fetching an item from within a page, this item loads after loading the page via ajax or iframe , is there any way to to create a condition for the script to wait until the item appears? To exemplify my problem I did th...
asked by 13.07.2018 / 13:52
0
answers

how to call a django application through wordpress

I have a website created in wordpress and I have an application created in django. On the site, there is an option on the menu that should call the django application. In this case, I need the django application to appear inside the site. How to...
asked by 11.07.2018 / 16:34