Questions tagged as 'python'

0
answers

How to check the tty ports connected in Python?

I have a device that is connected to the computer and I need to check which devices are connected and information about the device, then get the name of the port and start a communication. How can I do this in Python? Or at least check which por...
asked by 01.03.2018 / 15:11
3
answers

How to create a "* .exe" executable in python?

I need to turn ".py" files into ".exe" executables to run on any Windows desktop. Currently use 3.3     
asked by 24.04.2014 / 04:27
0
answers

Doubt Python platform [closed]

I am perfecting my knowledge for the job market and decided to study the Python language and wanted to know the market and the "advantage" of the language to which side I would focus, if I study Python more focused for WEB or if I study more for...
asked by 23.01.2018 / 15:57
1
answer

How to use Python ChatterBot in HTML page?

I'm developing a Chatbot in python, using the ChatterBot library. I would like to know how I can "embed" this chatbot into an HTML page. I'm a beginner. I use USB Web Server Follow the code: # -*- coding: utf-8 -*- from chatterbot.tra...
asked by 14.01.2018 / 14:22
0
answers

Python3.5 - Import multiple files from a folder

I have the following code: __author__ = 'Jones_Santos' # !/usr/bin/python3 import os from __init__ import mycursor, connection import csv import os from datetime import datetime, date, timedelta, datetime # Caminho do arquivo a ser importado...
asked by 28.12.2017 / 13:40
1
answer

Python- Mainloop Not working

I need some help, I'm starting now and have been catching kkk, The situation is as follows: I'm making a simple screen, but the mainloop function does not work. If I use the terminal and use class it creates the "..." for the indentation ......
asked by 05.02.2018 / 11:34
1
answer

Dictionary and repetition structure

The problem asks me to count the size of holes in the text exp: A, D, R, O, P has only one hole, and B has two I made the following code: qnt = int(input()) cont = 0 l = [] for i in range(qnt): txt = input() dic = {'A':1, 'D':1, 'O':...
asked by 24.12.2017 / 19:19
1
answer

Can not import X

I have two files within a project of which one has the import of the other and vice versa, in this case the main_server.py has the from Servidor.skeletons.Threads import Thread to be able to create an instance of the class Threads...
asked by 25.12.2017 / 22:39
0
answers

Limit response time of a function

I made a script in python 3 that performs speed tests on my internet every 60 seconds and writes these results to a .txt file. Within this script I have a function called get_results which is the function responsible for performing the...
asked by 15.12.2017 / 02:53
2
answers

Accept only numeric input

nota = -1 while nota < 0 or nota > 10: nota = int(input("Informe a nota entre 0 e 10: ")) if nota < 0 or nota > 10: print("Valor inválido") I need to include in this validation code for, if the user types string (a,...
asked by 09.10.2017 / 21:28