Questions tagged as 'python'

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

recursive Knapsack in Python

I have a list called self.items : items = [dict(id=0, w=4, v=12), dict(id=1, w=6, v=10), dict(id=2, w=5, v=8), dict(id=3, w=7, v=11), dict(id=4, w=3, v=14), dict(id=5, w=1,...
asked by 08.11.2016 / 23:49
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
2
answers

Python attribute error in Split

Someone knows why it appears in the following code:    ERROR in line 6 "tuple" object has no attribute 'split' The code is as follows: import time with open('FicheroEntrada.csv') as infile1, open('Diferencias.txt', 'w') as outfile:...
asked by 23.11.2016 / 11:32
1
answer

Erro when importing ttk, indicates that it is not defined

I have this program #importo las librerias from Tkinter import * from ttk import * class Aplicacion(): def __init__(self): self.raiz = Tk() self.raiz.title("Alta Velocidad") # Declara variables de control...
asked by 23.11.2016 / 18:43
1
answer

How to use TAB or ENTER when using raw_input? Python

Hi, I would like to know how to use ENTER and Tab when telling the user to enter something with raw_input Code: #!/usr/bin/env python # -*- coding: utf-8 -*- outfile = open('codehero.txt', 'w') # Indicamos el valor 'w'. outfile.wri...
asked by 09.10.2016 / 07:27
1
answer

CreateView does not save in the database with save ()

Yesterday I asked something about the form where they helped me quickly. Today I come, with the same subject, for that form that what I put in that form is not saved in the database and redirects me to the url but you do not show them to me....
asked by 10.08.2016 / 14:40
1
answer

Question about sockets

Hi, I have a question about sockets, I am going to try to explain everything to you so that you can solve this doubt I have, I hope not to disappoint you with my question. Well, the problem I have is that when I'm using a client I can put as man...
asked by 11.08.2016 / 18:01
1
answer

Use no-ip on server and client

I have made a client-server application in python. But when, for example, I turn off the router, the ip is no longer useful. I need to know how to implement no-ip in my server and client programmed in python and know if it is possible, since to...
asked by 12.08.2016 / 22:16
1
answer

Python Selenium Message: Unable to locate element

I am developing a web scraper in python that what it does is to take users and passwords from a database and then go to an external web page and fill out the form to later log in, it works perfect with the first username and password, but when i...
asked by 12.07.2016 / 21:34