Questions tagged as 'python'

0
answers

'NoneType' object has no attribute '_nserie' - Python Collections

I have the following classes: class Contenedor: def __init__(self, nserie, categoria, peso): self._nserie = nserie self._categoria = categoria self._peso = peso @property def categoria(self):...
asked by 07.11.2018 / 23:17
0
answers

Problem when compiling with kivy with Buildozer

Hi, I'm new with kivy and with Buildozer. I want to compile a button and pass it to Android, phone. but it does not compile me. #!/usr/bin/python import kivy from kivy.app import App from kivy.uix.label import Label from kivy.uix.button import...
asked by 08.11.2018 / 20:28
0
answers

Tkinter OptionMenu is too big

municipio=tk.StringVar() tk.Label(raiz, text='Municipio', foreground='blue', font=('Times',15,"normal")).grid(row=11, column=0, sticky='w,e', padx=5, pady=5) tk.OptionMenu(raiz, municipio, *listamunicipios).grid(row=11,column=1, sticky='w,e', pad...
asked by 11.11.2018 / 14:19
1
answer

django-python order json

django and I do not know how to sort this list by title order. I'm using: nuevo_json_array = sorted(json_array, key=itemgetter('oportunidad_json')) [ { 'pk': 1 'oportunidad_json':OrderedDict([ ('id',38441),...
asked by 07.11.2018 / 17:41
0
answers

open netcdf files in python

I want to open an .nc file in python but I get the following problem, which I do not understand what it means.         from netCDF4 import Dataset           rootgrp = Dataset ("cdd_ACCESS1-3_OND_1979-2005_2.5bilineal.nc", format="NETCDF4")...
asked by 07.11.2018 / 15:55
0
answers

Python Program to separate terminal and non-terminal symbols?

A few days ago I left another question about it, back then I did not have any code, but now I have something done and I need help. The idea is the following: I have this in a txt: program > begin statementlist end statementlist > stateme...
asked by 06.11.2018 / 23:54
1
answer

Sum of vectors does not give the expected result

I want to do the sum of two vectors and the truth is that I would not be walking the code. Can you help me? This is the code I'm using: """ Dados dos arreglos A y b N<15 elementos cada uno, calcular un arreglo C tal que c=a+b y Mostrar...
asked by 07.11.2018 / 00:16
2
answers

Create a table in sqlite using a variable

I want to program a function in python that creates tables in a sqlite database from a variable. This code does not work: def creartabla(nombretabla): connectionObject = sqlite3.connect("jez") cursorObject = connectionObject.cursor()...
asked by 06.11.2018 / 20:45
0
answers

Resolve Error NoneType Qpython, AndroidWebView Sl4a

Good morning. I have a problem I have these two files. try: import androidhelper as android except: import android droid = android.Android() droid.webViewShow('file:///sdcard/WebViewPython/index.html') while True: result = droid.wai...
asked by 06.11.2018 / 15:39
1
answer

how do the elements of a list go from one function to another?

I would like to know how to pass the list of the function "repeat_question" to the function "main". I try with "return name" but it does not happen. In what failure? def main(): print('escribe algunos nombres y luego presiona enter:')...
asked by 07.11.2018 / 05:07