Questions tagged as 'python'

1
answer

how to go back to a specific line of the code?

Hi, I'm working on the following menu, in which when option 1 is chosen and the patient identifier that is entered is> 3500, that error will be printed on the screen and a new identifier will be requested again I tried to do it with label and...
asked by 06.01.2018 / 11:33
1
answer

Problem with the Connection to BD Postgresql with python

import psycopg2 class BaseDeDatos: def _init_(self): try: self.conexion=psycopg2.connect( "host='localhost' port='5432' dbname='Inversiones' user='postgres' password='xxxxxx'") self.conex...
asked by 18.02.2018 / 04:12
2
answers

Practice palindrome

I have a question on how to do the extra of the following exercise Write a palindrome method (phrase) that receives a phrase or word and returns if it is palindrome or not. Then, write a main program that asks the user for a word, sends the w...
asked by 18.02.2018 / 05:43
2
answers

Comparison List of lists and list python

I am looking to make a comparison of a list with a list of lists. With this code I can do it between 2 lists but the problem happens when it is a list with a list of lists. I am looking to edit my code to be corrected. lista1=["paco","pepe"...
asked by 11.12.2017 / 21:29
1
answer

Convert to polygons and points the values of a file in Python

I have a file on my PC, text.txt that contains these values 5 0, 6 1, 5 2, 4 1 | 5 1 1 1, 4 1, 4 4, 1 4 | 3 3 1 1, 3 3, 4 1, 3 0 | 3 4 and I need to convert to polygons all the values before the symbol |, and to points the last 2 values, co...
asked by 18.12.2017 / 15:15
1
answer

Problem removing elements from an array: "can not delete array elements"

I have a problem to which I can not find a solution for more laps I give it. I have a program in which I generate a series of data and store them in a list. Later I have to remove some of the elements from the list so that its size is smaller. I...
asked by 22.11.2017 / 11:21
1
answer

Error installing Supervisor in Raspbian

I have a Raspberry Pi 3 Model B In which I have installed Raspbian via NOOBS in its current version that the date is 2.4.4 I'm following a tutorial on how to configure Django + Ngnix + Gunicorn in the following Link , the drawba...
asked by 17.10.2017 / 03:08
1
answer

How do I add text to a Text widget in Tkinter?

For reasons of simplicity, my "form" looks something like this: import tkinter as tk ventana = tk.Tk() mensaje = tk.Text(ventana, background="white", width=165, height=25) mensaje.config(state="disable") mensaje.pack(padx=0, pady=125) mensa...
asked by 28.09.2017 / 00:21
1
answer

Running Python script from vb.net by passing VB varialbes as Python parameters

I'm trying to run a python script by clicking a button in visual basic. I need to pass variables from visual basic to python. try the following: Shell("path\programa.py arg1 arg2") But in doing it I get the error    System.IO.FileNotF...
asked by 21.09.2017 / 06:22
2
answers

XLSX Python Search

With this code I can convert a certain column of an xlsx into a list. I need a function that looks in the directory where I am if there is any file with the values that are in my list called to: >>> [u'Jose', u'Martin', u'Pedro'] prin...
asked by 21.12.2017 / 02:57