Questions tagged as 'python'

1
answer

How to send multiple requests at the same time

Well my program takes URLs from a text file, enters them and checks to see if it has a certain text in its HTML code, it would be possible to read all the lines of the file, and instead of making a request at a time, does it all at once?     
asked by 18.09.2016 / 20:58
2
answers

Program that uses input (). split ("") and does not run in Python 3.5.1

I have to do several exercises in Python that the input values should be on the same line and indicated the input().split(" ") , but the program does not run, it gives error. Ex.: C, Q = input().split(" ") C = int(C) Q = int(Q) if(C==1)...
asked by 21.09.2016 / 05:59
1
answer

Subtract 2 weeks from a complete date in pyhton

I'm thinking of a date in this format: time.strftime("%d/%m/%Y") // 00/00/0000 I want to subtract two weeks from that date, but I do not know how to do it.     
asked by 20.01.2017 / 18:48
1
answer

Sending emails at scheduled time

I would like to know how I can send my log.txt file to a desired email at a defined time (eg 15 min)? And after being sent, the process restarts and creates a new log.txt. import pythoncom, pyHook, def registrar(evento): arquivo = open('l...
asked by 15.06.2017 / 16:57
1
answer

How to execute arbitrary code in Python?

I use an xBase language that has macro replacement as in the original Clipper. Is there something equivalent in Python? We use a lot of command line assembly via menus at runtime. For example, making filters.     
asked by 01.07.2016 / 14:28
1
answer

How can I change file attributes in windows with python?

I'm trying to leave a hidden .txt file. How can I do this using python command line?     
asked by 17.12.2016 / 17:41
1
answer

What is the difference between type and dtype?

Based on a previous question , I saw that it is possible to identify a variable using type . For example: print(type(3.1415).__name__) #retorno >> float Doing some research, I saw that dtype exists. What is the differenc...
asked by 23.03.2017 / 17:29
1
answer

Why does the input work in Python 3.x and not in 2.7?

I ran this same code with only a few minor differences in syntax to fit the right script mode in Python version 2.7.9 and also in Python 3.4.2 Script that I rode in Python 2: name=input("tell me your name:") print 'Hello',str(name),'!'...
asked by 13.05.2017 / 23:51
2
answers

How to skip the line in writing the files?

Well, basically, I need to skip a line after a certain writing. insira o código aqui print("+---------------------+") print("|DEMONSTRAÇÃO DA LINHA|") print("+---------------------+") print() arqTeste = open("ArquivoTeste.txt", "w") arqTe...
asked by 21.01.2017 / 21:58
1
answer

What is the difference between __init__ and __new__?

What is the difference between the special methods __init__ and __new__ in Python?     
asked by 17.01.2017 / 11:51