Questions tagged as 'python'

1
answer

DIbugraf graphic in Canvas. Tkinter, Python 3.6

Hello, I have a problem when it comes to representing graphics, I'm using Python, specifically the Tkinter library. I have a series of data in an excel file that I export with python to a dataframe: file = pd.read_excel('Usuarios.xlsx') df = p...
asked by 27.08.2018 / 16:55
0
answers

Error when I try to assign a value to a key in a dict Python-Django

I'm doing a function and I'm taking out values from the request. I made a response variable which has 3 nodes to fill. This is the function from django.http import HttpResponse as hres import json def go( req ): res = { 'success':...
asked by 28.08.2018 / 22:54
1
answer

ignore an xml file using python?

I need help, the code that I have in python reads the xml files inside a predetermined folder, once these files are found it reads them and pulls out the required data inside it, the detail is that I found several xml that contain errors and the...
asked by 22.10.2018 / 22:33
1
answer

Generate csv file from matrix (nested lists)

I have a 1000x5 matrix, in the format ['1', 'Visa', '4539897685939002', '116', '5/2022\n'] All values within each row are strings and are sorted increasingly by the first index of each row, something like this: ['1', 'Visa', '453989768593...
asked by 16.08.2018 / 01:28
1
answer

Incorrect format in list output

I have the following query: sqlLote = ("select lot.idLote from Lote lot \ inner join [dbo].[Usuario] u on lot.idUsuario = u.idUsuario \ where u.userName = '%s'") % \ (usuario) The result of this query per sql gives    1 4 5 6...
asked by 15.08.2018 / 20:27
1
answer

Consume webservice, problem with datetime

I have this code to consume a webservice # -*- coding: utf-8 -*- import zeep import datetime from zeep import Client from zeep.transports import Transport from zeep import xsd from zeep.wsse.username import UsernameToken from requests import S...
asked by 24.08.2018 / 05:19
1
answer

Parameters step notation in python

Hello the following code fragment belongs to tkinter python, however I find a step notation of parameters that I can not find in the documentation. You can offer me help. The syntax is the following config (text = format% args) and the context i...
asked by 31.08.2018 / 16:21
0
answers

How to align elements in win32ui, win32print

Good afternoon I have the following code to print an image in this case: import sys import win32print import win32ui from PIL import Image, ImageWin printer = win32print.EnumPrinters(2) for prin in printer: print(prin[2]) PHYSICALHEIGHT...
asked by 31.08.2018 / 20:59
0
answers

Formula to cancel debit tickets [closed]

I have the following data in sql. idImporte idmovimientotipo idcuentacorriente importe saldoInicial ----------- ------------------- -------------------- --------------------------------------- --...
asked by 31.08.2018 / 00:41
1
answer

How to Choose Grupo django when registering

I would like to know how I can choose the group to which the user belongs when I am creating it, at this moment I can only create users but not define the group to which they belong. VIEWS.PY class RegistroUsuario(CreateView): model = Use...
asked by 10.08.2018 / 23:19