I am not able to execute (or get the result) of commands executed in Windows by Python.
I got a code sample I saw on various sites and answers in the OS, but none worked well for me.
import subprocess
# Exception: [WinError 2] The system cann...
I have the following string == > "the guy with the mush he hit with the car in the car of so and so" I'm trying to extract starting from ^ ("the guy ...") and ending in ("... the car") $ Can someone help me with this RE
I am experiencing problems when trying to insert the values of my variables into the database I am trying to do as follows
import MySQLdb
id = 4
idade = 18
nome = 'cebolinha'
email = '[email protected]'
db = MySQLdb.connect("localhost","dev...
I'm breaking my head with this since yesterday I've done everything to insert the value in utf8 but it is not working and the following I have this code as an example
#!/usr/bin python
# -*- coding: utf-8 -*-
import MySQLdb
db = MySQLdb.conn...
I have a problem that is simple but I am not getting the solution.
I have a list of tuples, for example:
lista = [('x',2,3),('y',4,5),('x',6,7),('z',8,9)]
What I want is for him to tell me how many times x , y and z a...
I have this code:
donos=[]
def calcula_media():
lista_dicionario= [1,2,3]
donos.extend(lista_dicionario)
def funcao2():
print donos
How can I do to use the global variable in the 2nd function using what I used in 1º to make i...
I am creating a code that pings a list of ips. I got it to drip and give me the answer, but I can not do the condition I want, which is:
SE ping ok:
continuar os comandos
SENÃO:
faz outra coisa.
I do not know how to manipulate the pin...
I have this simple code available on the Flask page:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
When you upload the Service, everything wor...
I can test whether a user supplied string is a palindrome or not (word or phrase that can be read backwards ignoring spaces and uppercase and lowercase letters, for example: Help me get on the bus in Morocco), using the code:
string = raw_inpu...
In path /getAll I want to return a list of JSONs however I get an object is not callable , why does this occur and how can I return to my JSON list? MyList was called list and after reading the following definition of callable the e...