Questions tagged as 'python-3.x'

2
answers

How to consult data in MySQL and be able to save in SQL Server? (Python)

Good morning I have a doubt, I have a code generated in Python which what it does is to consult a MySQL table named INFORMATION_SCHEMA.PROCESSLIST in the following way: SELECT *, IF(time >= 10,"Bad","Good") AS Estado FROM INFORMATION...
asked by 08.06.2017 / 17:11
1
answer

Problem when making inquiries in psycopg2

good day I'm working on a project where I need to consult different databases and for that I use the psycopg2 extension of python, however at the time of making a query it only shows me the first data of it , despite the fact that there is a lot...
asked by 03.05.2017 / 22:37
1
answer

Help in Python files

I have this code: import sys import time import fileinput from os import system from os.path import isfile class Student: def fill(self): self.id = input("ID: ") self.name = input("Nombre: ") self.age = int(input("Edad: "))...
asked by 18.04.2017 / 00:02
1
answer

create a server capable of serving multiple clients in python 3.6

At the moment my server can only serve a client with whom I can send text messages, I would like to connect with another client and do the same #cliente import socket host = "127.0.0.1" port = 6666 sock = socket.socket() sock.connect((host,...
asked by 14.04.2017 / 23:18
2
answers

Help with: NoReverseMatch at!

help with this error: Reverse for 'pedido_sub' with arguments '()' and keyword arguments '{'cod_experto': 'AA-0002', 'id_pedido': 53}' not found. 1 pattern(s) tried: ['solicitar/aprobar/(?P<id_pedido>\d+)/(?P<cod_experto>\d+)$'...
asked by 17.02.2017 / 03:47
1
answer

Error message: "io.UnsupportedOperation: not readable" in Python

I want to make a little program that reads a txt file and generates a list of lines of that file. The code that I have is the following: f = open("rutas de archivos.txt","w",encoding="utf8") linesfilelist = f.readlines() f.close() When exec...
asked by 21.01.2017 / 19:31
1
answer

Receive data every time through API using websockets

I am working with the API of a platform to receive currency quotes minute by minute, I have a way of doing it but it is not very functional and I wanted to check if someone could help me, this is my code: from iqoptionapi.api import IQOptionAP...
asked by 25.01.2017 / 08:27
1
answer

Python multiprocessing (Pool) error

I have a problem with multiprocessing my program. This is the code of the program and below I insert the error: Program: import argparse import sys import multiprocessing from multiprocessing import Pool import time def main(): parser...
asked by 24.01.2017 / 22:12
1
answer

The while loop never ends and I do not print the result generated in each iteration

I'm new to Python and I have to solve this exercise:    Develop a program for the check function that calculates and returns the REGISTRATION_TIME_TIME_DATE_LABORATE of a worker in a day starting from the parameters TIME_IN_ENTERED AND TIME_I...
asked by 11.12.2016 / 22:56
1
answer

TypeError: can not multiply sequence by non-int of type 'str'

I am developing a small exercise of the implementation of a class oriented to handling fractions with their respective methods, then I must use it to make a small calculator, the module with the class works perfect and I have tested each of the...
asked by 21.11.2016 / 03:43