Questions tagged as 'python'

1
answer

Shodan implementation (Api) No return result

Good afternoon. So guys are doing a test with shodan to implement in another program. But when I type $: python python_test.py.py + ip or query It does not display the result and returns to the terminal without error as well. How can I arrange t...
asked by 23.11.2018 / 17:26
0
answers

Run a python script on redhat 7.4 [duplicate]

Good morning, fellows I made a script to integrate the telegram to zabbix and forward the incidents. The Problem, the script is executed at the prompt using #python telegram.py But when I run #. / telegram it gives me an error, I tran...
asked by 22.11.2018 / 09:19
1
answer

Save the contents of a file in another file - python

I'm trying to read information from a file and save it in a new file after passing all the information to lowercase and removing punctuation characters. For this I created a ReadFile () function that reads the file in question and saves it to a...
asked by 10.12.2018 / 15:54
2
answers

How to do string interpolation in Python?

For example, in PHP we can do this: $preco = 200; $unidades = 10; $texto_final = "O produto custa {$preco} reais e restam {$unidades} unidades."; Is it possible to do something similar in Python or do I need to concatenate always?     
asked by 22.12.2017 / 07:10
0
answers

Error: TemplateNotFound Pending

I'm trying to create a basic application, but I'm not able to render the template in the application Project Structure ├── Project │ ├── Controllers │ ├── __init__.py │ ├── __init__.pyc │ ├── Models │ │ └── Conexao │ ├── template...
asked by 24.11.2018 / 20:17
0
answers

Manually install packages

I am making a code in Python that uses multiple libraries. I tried installing pycrypto through pip and it always gives Microsoft Build Tools error pip install pycrypto Collecting pycrypto Using cached https://files.pythonhosted.org/pack...
asked by 20.11.2018 / 16:46
0
answers

How to change the indentation of Mkdocs to create nested lists using 2 spaces

I'm using MkDocs 1.0.4, however, in my repository lists are created with two spaces followed by a hyphen. The problem is that in MkDocs the subnets are not being generated, everything is being shown in a single level. To fix this, in theory w...
asked by 14.11.2018 / 17:41
1
answer

How to correct this error Json

I am collecting data from an Api that takes me back to the information in a Json dictionary to play in an appweb, so the server gives me this error, how can I do that to correct it? Error giving: Traceback (most recent call last): File "/...
asked by 14.11.2018 / 21:55
1
answer

Application with login and access control (Error: TypeError: 'NoneType' object is not subscriptable)

I'm putting together a basic application with login and access control, meaning not all users can access the same windows. However I have a problem loading the user information into the window after it has login . When I try to make a funct...
asked by 21.11.2018 / 09:52
0
answers

Django - CPF or CNPJ

Good afternoon, people. As a way of learning, I'm creating a system in Django with a Customer registry. Someone could help me in the logic so that in the register I can choose CPF or CNPJ. My Models is currently like this: class Clien...
asked by 13.11.2018 / 20:21