Questions tagged as 'python'

0
answers

pyodb package connects to SQLSERVER 2008 and does not get data

I am working with python 3.5.4 and django 1.11.13 install pyodbc and pyodbc-azure, it connects but it does not make any sql, here I put an image of the code and the debugging with the answer , also probe with 'DATABASES = { 'default': {...
asked by 15.08.2018 / 16:51
0
answers

Variable is not defined Python

This is a simple program that adds two numbers but in two separate modules: Main program : import aritmetica as ar print ("Introdusca 2 numeros para sumarlos ") print ("Introdusca el primer numero : ") num_a = int (input()) print ("") pr...
asked by 22.08.2018 / 19:38
1
answer

Connecting Python with the MySQL database provided by WAMP Server [duplicated]

In the last days I have been learning PHP and MySQL, and I have supported the WAMP package which comes with the Apache web server, the MySQL GBD and the PHP libraries. I wanted to know if it is possible, having installed both the WAMP package...
asked by 08.08.2018 / 09:10
1
answer

Create TCP packets in Python

I need to create TCP packets from an apache log file in Python. To do this, I get the HTTP request from the apache log and put it as a payload for the package in question. With the created packages, I create a PCAP file that contains all the pac...
asked by 01.09.2018 / 20:54
0
answers

show a field knowing its name in a django template

if I have a "person" model with a "name" field to show the field in a template I use {{person.name}} But as it is done when I have the name of the field in a variable. For example: nombrecampo='nombre' {{persona[nombrecampo]}}...
asked by 30.07.2018 / 15:38
0
answers

Why can not I send the value of the qlineedit

from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import uic, QtCore, Qt import threading from Inicio import * class Principal(QMainWindow): def __init__(self): QMainWindow.__init__(self) uic.loadUi("C:/Users/A...
asked by 05.08.2018 / 18:15
1
answer

How to use Tkinter ProgressBar

Hi, I have a very simple application where I load an .xlsx file in a dataframe with the pandas library and then generate a treeview to show it in table mode. With a file of 100 or 200 rows it takes very little, the problem comes wh...
asked by 05.09.2018 / 20:30
0
answers

How to execute function in an interval?

I am trying to execute a function in the background every 5 seconds in which I check the data of an object and modify it. I have found this form (see code) but I can not get it to run when I deploy the Django server. Code import threadin...
asked by 20.07.2018 / 12:18
0
answers

How to translate a queryset to subquery in django?

This is my problem I want to group by a field which is a result of an annotate, but I can not do it. from django.db.models import Max, Sum queryset = queryset.values('period', 'cell').annotate(x=Max('total')) result = queryset.values('period')...
asked by 19.07.2018 / 21:24
1
answer

Select intervals of a column in a DataFrame

I have a DataFrame made with pandas, formed by the columns ['x','y','z0','z','arbol'] , attached screen of its structure: From the data of that general DataFrame I have extracted all those whose tree value is equal to 1 creating a...
asked by 13.07.2018 / 11:03