Questions tagged as 'python'

1
answer

Press 'infinitely' keypad button

I'm doing a test in python3.5 using the pyautogui library. My goal is for the algorithm to push buttons for me. import pyautogui while True: pyautogui.press('f1') In this case, he is pressing f1. I ran several tests and it really works on...
asked by 25.08.2016 / 14:17
0
answers

Apache interpreting python script as file

I'm setting up a website and want it to run a python script in html action the question is that my browser is interpreting the script as if it were a .py file for download. <!DOCTYPE html> <html lang="en"> <head> <meta...
asked by 09.08.2016 / 00:47
1
answer

Problem with urls and views inside the server

I was studying python and django, and I decided to make my wedding website in django. The project runs perfectly on my local pc, the problem is when I deploy to digital ocean and it gives this error here. The admin works right. The prob...
asked by 10.08.2016 / 14:15
1
answer

Error executing application with graphical interface in Python 3

Error executing application with graphical interface in Python 3. File "/home/nexide/PycharmProjects/untitled1/.idea/testew.py", line 1, in <module> from tkinter import * ImportError: No module named tkinter Process finished with ex...
asked by 08.08.2016 / 17:29
1
answer

Python reinstallation in Ubuntu 14.04

I'm new to linux and trying to make an example using Scrapy. I did the installation of Python 3, but I already had Python 2 installed on my machine and I thought I would have to delete Python 2 or at least replace it. Looking at the intern...
asked by 30.08.2016 / 14:58
1
answer

Select specific day in an np.array containing datetime

I have a np.array.astype ('Datetime [s]') called T with several days at random times. I need to select a few days for separation. I tried: for i in np.arange(MinTime,MaxTime,np.timedelta64(1, 'D')): mask = (T > i) & (T < (...
asked by 05.08.2016 / 01:32
0
answers

How to edit files and compile them in Python + Django

I edited a .py file, compiled the same but says I am not allowed. [Error 13] Permission denied: 'models.pyc'     
asked by 23.08.2016 / 18:44
1
answer

Python Compare months list with base list and show the two

I have a list of months from January to December. I have another list that has the month and a value. For example: Jan = 12.00 Fev = 15.00 Ago = 10.00 I want to show all year and show every month. Months that have no value should appear a...
asked by 22.08.2016 / 23:25
1
answer

Implementing a TCP traceroute

I'm trying to understand the code below (found on the internet): #!/usr/bin/python3 from scapy.all import * target = input("Informe um alvo: ") destport = input("Porta de destino: ") port = int(destport) ans,unans=sr(IP(dst=target,ttl=(1,3...
asked by 11.08.2016 / 01:18
1
answer

make string append and looping 'for'

def conf_dir_exist(lines): temp = '' print(lines) #isso é uma tuple. for line_a in lines: for line_b in line_a: if(os.path.exists(line_b) != False): pass else: temp += ''...
asked by 25.07.2016 / 21:37