Questions tagged as 'python'

1
answer

Error showing variable in messagebox

I am doing a unit converter and I would like to press the button to show the number that I have written in the text box in messagebox , but it does not work. The messagebox always shows no content no matter what is entered in Ent...
asked by 12.03.2018 / 12:13
2
answers

Take result Print and execute program

Dear users of the community, I have a code that allows me to search the path of a file within the system, plus what I need is to take the route that prints in order to run the program automatically, that is, if the user does not have the progr...
asked by 16.03.2018 / 18:04
2
answers

Using Django with an existing Sql Sever database

I'm trying to test Django with a database in Sql Server that already exists. I have searched for documentation, and everything points to using the Inspectdb ( python mysite/manage.py inspectdb > mysite/myapp/models.py ) comman...
asked by 01.03.2018 / 19:45
1
answer

Create a dictionary from text from a dataframe

I have a DataFrame that is created from a txt file. I need to go through each row, find pairs of repeated words and calculate the frequency of appearance. I thought to create a dictionary that stores the pairs of words and with a counter go c...
asked by 28.02.2018 / 23:46
1
answer

Python Recursion Tkinter

I have the following code to generate circles recursively one inside the other. My problem is that only 2 circles are generated import tkinter as tk import sys def dibujar_circulo(inicio, fin, delta): c.create_oval(inicio,inicio,fin,fin,f...
asked by 13.02.2018 / 22:31
1
answer

K_UP is not defined

I have a problem with the following lines: keys = pygame.key.get_pressed() if keys[K_LEFT]: When I run the code it gives me an error that says: File "HardGame1.1.0.py", line 49, in <module> if evento_tecla[K_UP]: NameError: nam...
asked by 14.02.2018 / 02:02
2
answers

Calculator with an Input - Python

I want to do a basic calculator in Python3 but I have only seen that it works using methods and conditions. But is it possible that entering the whole operation in an Iput, obtain the same result? Example: input("Ingresa tu...
asked by 15.02.2018 / 21:15
2
answers

Share variables between .py and different .kv and properties between .kv and .kv in kivy

Community, I have a problem when I want to share variables and properties between different .kv files or different classes in the kv program. Does anyone have an idea of how I could do it directly in kv programming? Then I show the test I'm doin...
asked by 05.02.2018 / 17:38
0
answers

How can I upload the map.py to the app.py using html and python?

I am trying to upload my game to the local host 5002, but after the welcome of the user who has just connected, I can not upload the scenes and choices that have to be made. I have this: from flask import Flask, session, request from flask...
asked by 05.02.2018 / 17:04
0
answers

ImportError: No module named 'matplotlib' because there are two Python

Using Python 3, in a jupyter notebook I try to import matplotlib #!/usr/bin/env python import pandas as pd import numpy as np import matplotlib.pyplot as plt plt.style.use("ggplot") %matplotlib inline But he answers: ImportError...
asked by 05.02.2018 / 19:28