Questions tagged as 'python'

2
answers

I can not import any Python module

I want to import the requests module from Python into a program I am doing, but it does not stop giving the following error, as soon as I run the program: ModuleNotFoundError: No module named 'requests' I have the latest version of P...
asked by 02.08.2017 / 18:12
1
answer

What is wrong here? I can not understand [closed]

from tkinter import * import random import time import math ''' Isso foi uma tentativa de criar uma inteligencia artificial. Não consegui encontrar os erros :( ''' #Variaveis: velx=1 vely=0...
asked by 06.08.2017 / 09:44
2
answers

list index out of range Python

I have lists with numbers in string format and empty spaces. First I want to clear the blanks, and then I want to convert to float. But soon in the first for the error appears:    if (x [i] == '' or y [i] == ''): IndexError: list index...
asked by 08.09.2017 / 20:00
1
answer

Questions about functions

This my code simulates banking using functions, but I am not able to return the values of the function, when I hedge the value of the return in a variable it calls the whole function. In the program when I call the 'balance' function, it returns...
asked by 22.09.2017 / 07:16
1
answer

raise KeyError (key) from None KeyError: 'TCL_LIB (.Py for Exe)

I'm trying to convert a Python script to exe to run on Windows machines, I have the following code in setup.py import sys from cx_Freeze import setup, Executable import subprocess import socket import os base = None if sys.platform == "win3...
asked by 21.09.2017 / 16:49
1
answer

Change color of a node in a graph of Neo4J

I created an example graph in Neo4J with one parent and two children. I would like to know how to change the color of all nodes that have level equal to 1. WhenIclickonthenodeitappearsatthebottomtomodifythesizeandcolorbutthechangeaffectsalla...
asked by 26.07.2017 / 19:38
1
answer

Is it possible to use pyad (module for active directory) in linux?

If you can use this module in linux, would you like to know how to install it? I tried with "pip install pyad", however I get the message below:    Could not find a version that satisfies the requirement pywin32 (from pyad) (from versions:)  ...
asked by 25.07.2017 / 21:07
1
answer

Know years, months, days, hours, etc ... That have passed since a certain date

I would like to know how I make the output of the difference between two dates stay the way I want, in this case I would like it to be:    Since 16 - 07 - 2014 23:00:00 have passed: X years, Y months, K days, Z hours, W minutes, S secs Wh...
asked by 28.07.2017 / 15:54
1
answer

How to print a particular list from a string of a .csv using python

The first part that is to detect the position of the list I have already achieved, the problem is at the time of the else , I would like to know a method that causes the else not to be printed together with if . Code and the "database" below...
asked by 08.08.2017 / 22:04
1
answer

How to remove special character and column point string from a data frame?

raw_data = {'NAME': ['José L. da Silva', 'Ricardo Proença', 'Antônio de Morais']} df = pd.DataFrame(raw_data, columns = ['NAME']) How to make NAME column names into: Jose L da Silva (no point...
asked by 04.07.2017 / 15:32