Questions tagged as 'python'

2
answers

Variable creation via user response in Python

I would like to have the user enter a response of that response would create a "variable" or not. I do not know if creating a new variable would be the best way, for example: a = str(input('Existe mais produtos para serem adicionados?: '))...
asked by 20.03.2018 / 01:57
1
answer

Python - How to keep list item decimal places for variable?

I'm using Python within SPSS to read some values within a dataset. These values are stored in a list. I am using 15 decimal places and in the list the values appear with 15 houses. However when I copy the value to a variable this stores with up...
asked by 23.06.2018 / 05:39
2
answers

Doubt with Lists

When I type this command in the console, it returns me an empty list. But if I create a file and have it run, nothing appears, what happens? How should I do it? lista = [] x = 1 while x > 0: x = int(input('digite um numero inteiro: ')...
asked by 23.06.2018 / 01:03
2
answers

How to separate similar images (Pyhton / Machine Learning)

Purpose: To separate images with equal characteristics of a folder with several images (exp: photo1, photo2, photo3, photo4, photo5>> photo1.Copo1 photo2.Copo2 photo3.Copo3; photo4.Cachorro1, photo5.Cachorro2 ...) I would like a light on t...
asked by 25.06.2018 / 01:17
1
answer

PYTHON - Value store, line by line, in txt

How do I store different values, line by line, in a txt file without deleting the old one?     
asked by 16.03.2018 / 17:59
2
answers

Debug with Flask / Python

I'm studying the Flask framework. It happens that I need debugar a request object with form data. I also need to stop at a certain point, like die() in PHP. How do I do this? I've already tried to os.exit(1) , but the Flask s...
asked by 17.03.2018 / 22:11
1
answer

Custom ordering in Python

I have a list foo = ["BCB", "CAB", "CBC"] and a specific alphabetical order bar = "ACB" . The result with this specific order should be resultado = ["CAB", "CBC", "BCB"] How do I sort this list?     
asked by 17.02.2018 / 18:15
1
answer

Friendly urls with flask [closed]

Good afternoon, I'm developing a system using the python Flask framework and would like to know how I can create friendly urls for the system? Do I have to use some other framework or something?     
asked by 11.02.2018 / 20:52
1
answer

How do I disable the text cursor?

I have a project in Gtk which uses a Gtk.Entry text input and I need to disable the text cursor, or leave it invisible. How can I do this? Or if you can not, can you disable the linux system cursor?     
asked by 09.02.2018 / 19:58
3
answers

How to have 'apt remove' response via shell_exec with PHP or Python?

With the shell_exec command I get a response if the result of the executed command is a single text: shel_exec('dpkg -l > list-softwares-dpkg.txt'); How to have the answer (in PHP or Python, would another command need to have an answer?)...
asked by 12.02.2018 / 22:43