Questions tagged as 'python'

0
answers

can not import name routes in a Flask app

I tried to test my Flask application following this blog but I said: (venv) mike@mike-Inspiron-3543:~/Documents/programming/microblog$ flask shell Usage: flask shell [OPTIONS] Error: While importing "microblog", an ImportError was raised: Tr...
asked by 22.09.2018 / 11:14
1
answer

Read format or style of cells in Excel with Python

as with Python it is possible to detect, validate, read, compare or know the format or style of one or several cells in Excel, to be able to filter and / or discard by color.     
asked by 22.09.2018 / 06:14
0
answers

Problems importing JS files in flask

I am using a package called flask_material to be able to use materialize in my flask project, and it loads perfectly the css and the components that I use, however when importing my JS file it is in which I have to import the init of my componen...
asked by 23.09.2018 / 06:42
1
answer

how does it convert from str to float?

I have the following code: #!/usr/bin/env python from suds.client import Client import time import json class ClassName(object): fecha = time.strftime('%Y-%m-%d') def trm(self, fecha): try: wsdl_url = 'https://...
asked by 23.09.2018 / 04:04
0
answers

pip broken and impossible to create an environment

I can not install a package or create a virtual environment: mike@mike-Inspiron-3543:~/Documents/programming/recordwrite$ python -m pip install pyaudio --user Collecting pyaudio Using cached https://files.pythonhosted.org/packages/ab/42/b4f0...
asked by 21.09.2018 / 15:26
1
answer

Visualization world map with pygal - No data

I'm with the book Python Crash Course and I can not visualize the World population map. When I open the .svg file in Chrome I receive the error of 'No Data'. I do not receive any errors when I run the program. Printing the cc_populations...
asked by 24.09.2018 / 13:03
0
answers

calculate the% of ampoule saves, its previous consumption and the new consumption - Python

You must tell me how many ampules of so many watts I need. Your test cases are: import sys Ampolletas = int (raw_input("Ingrese el numero de ampolletas: ")) Watts = int (raw_input("Ingrese el consumo de la ampolleta en watts: ")) Mult...
asked by 20.09.2018 / 04:34
1
answer

How do I make a code that resets an output line when it is occupied by a print

Let's say: I have a code with pygame print(pygame.mouse.pos) #se iprime un nuevo texto cada vez que la posicion de lursor dentro de la ventana cambie I need to know how to make the text print in one place 30, 50, then in its place it com...
asked by 19.09.2018 / 02:50
1
answer

TypeError: can not multiply sequence by non-int of type 'float'

How do I fix that error? Traceback (most recent call last): File "main.py", line 7, in AreaL = (PI *(Generatriz * Radio)) TypeError: can not multiply sequence by non-int of type 'float' import math PI = 3,1415 Diametro = int (raw_i...
asked by 19.09.2018 / 06:42
1
answer

Change background color in Matplotlib

I am generating some graphics in a desktop application made with Tkinter. The problem I have is that it generates very simple graphics, with a white background, and I am finding it hard to find information on the Internet about how I can play wi...
asked by 18.09.2018 / 12:06